Passed
Push — master ( 33b7c5...79b25d )
by Quentin
10:58 queued 05:02
created
src/ValidationServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,23 +16,23 @@
 block discarded – undo
16 16
      */
17 17
     public function boot()
18 18
     {
19
-        Validator::extend('absolute_or_relative_url', function ($attribute, $value, $parameters, $validator) {
19
+        Validator::extend('absolute_or_relative_url', function($attribute, $value, $parameters, $validator) {
20 20
             return Str::startsWith($value, '/') || Validator::make([$attribute => $value], [$attribute => 'url'])->passes();
21 21
         }, 'The :attribute should be a valid url (absolute or relative)');
22 22
 
23
-        Validator::extend('relative_or_secure_url', function ($attribute, $value, $parameters) {
23
+        Validator::extend('relative_or_secure_url', function($attribute, $value, $parameters) {
24 24
             return Str::startsWith($value, '/') || filter_var($value, FILTER_VALIDATE_URL) !== false && Str::startsWith($value, 'https');
25 25
         }, 'The :attribute should be a valid url (relative or https)');
26 26
 
27
-        Validator::extend('web_color', function ($attribute, $value, $parameters, $validator) {
27
+        Validator::extend('web_color', function($attribute, $value, $parameters, $validator) {
28 28
             return preg_match('/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i', $value);
29 29
         });
30 30
 
31
-        Validator::extend('phone_number', function ($attribute, $value, $parameters) {
31
+        Validator::extend('phone_number', function($attribute, $value, $parameters) {
32 32
             return preg_match("/^[+]?[0-9\-\ ]*$/", $value);
33 33
         });
34 34
 
35
-        Validator::extend('validBlocks', function ($attribute, $value, $parameters, $validator) {
35
+        Validator::extend('validBlocks', function($attribute, $value, $parameters, $validator) {
36 36
             foreach ($value as $block) {
37 37
                 $cmsBlock = $this->app->make(BlockRepository::class)->buildFromCmsArray($block, false);
38 38
 
Please login to merge, or discard this patch.