Skip to content

Commit

Permalink
forgot to inlucde illuminate\support\optional in file
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-xz committed Jul 4, 2024
1 parent 207dfda commit 6d13c96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Urls/Analyze.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use GuzzleHttp\Exception\TransferException;
use DiDom\Document;
use Illuminate\Support\Arr;
use Illuminate\Support\Optional;
use Hexlet\Code\Urls\UrlCheck;

class Analyze
Expand Down
3 changes: 2 additions & 1 deletion src/Urls/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static function validate(string $url): string|array
$v->rule('url', 'lengthMax', 255)->message('Некорректный URL');

if (!$v->validate()) {
return $v->errors()['url'];
$errors = $v->errors();
return $errors['url'];
}

return $normalizedUrl;
Expand Down

0 comments on commit 6d13c96

Please sign in to comment.