Passed
Branch 1.1 (4d5846)
by Quentin
07:36
created
Category
src/ValidationServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
 
12 12
     public function boot()
13 13
     {
14
-        Validator::extend('absolute_or_relative_url', function ($attribute, $value, $parameters, $validator) {
14
+        Validator::extend('absolute_or_relative_url', function($attribute, $value, $parameters, $validator) {
15 15
             return starts_with($value, '/') || Validator::make([$attribute => $value], [$attribute => 'url'])->passes();
16 16
         }, 'The :attribute should be a valid url (absolute or relative)');
17 17
 
18
-        Validator::extend('relative_or_secure_url', function ($attribute, $value, $parameters) {
18
+        Validator::extend('relative_or_secure_url', function($attribute, $value, $parameters) {
19 19
             return starts_with($value, '/') || filter_var($value, FILTER_VALIDATE_URL) !== false && starts_with($value, 'https');
20 20
         }, 'The :attribute should be a valid url (relative or https)');
21 21
 
22
-        Validator::extend('web_color', function ($attribute, $value, $parameters, $validator) {
22
+        Validator::extend('web_color', function($attribute, $value, $parameters, $validator) {
23 23
             return preg_match('/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i', $value);
24 24
         });
25 25
 
26
-        Validator::extend('phone_number', function ($attribute, $value, $parameters) {
26
+        Validator::extend('phone_number', function($attribute, $value, $parameters) {
27 27
             return preg_match("/^[+]?[0-9\-\ ]*$/", $value);
28 28
         });
29 29
 
30
-        Validator::extend('validBlocks', function ($attribute, $value, $parameters, $validator) {
30
+        Validator::extend('validBlocks', function($attribute, $value, $parameters, $validator) {
31 31
             foreach ($value as $block) {
32 32
                 $cmsBlock = app(BlockRepository::class)->buildFromCmsArray($block, false);
33 33
 
Please login to merge, or discard this patch.
src/Helpers/frontend_helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
     {
6 6
         if (!app()->environment('local', 'development')) {
7 7
             try {
8
-                $manifest = Cache::rememberForever('rev-manifest', function () {
8
+                $manifest = Cache::rememberForever('rev-manifest', function() {
9 9
                     return json_decode(file_get_contents(config('twill.frontend.rev_manifest_path')), true);
10 10
                 });
11 11
 
Please login to merge, or discard this patch.
src/Helpers/i18n_helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $manageMultipleLanguages = count(getLocales()) > 1;
14 14
         if ($manageMultipleLanguages && $translate) {
15
-            $allLanguages = collect(config('translatable.locales'))->map(function ($locale, $index) use ($form_fields) {
15
+            $allLanguages = collect(config('translatable.locales'))->map(function($locale, $index) use ($form_fields) {
16 16
                 return [
17 17
                     'shortlabel' => strtoupper($locale),
18 18
                     'label' => getLanguageLabelFromLocaleCode($locale),
Please login to merge, or discard this patch.
routes/admin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 }
6 6
 
7 7
 if (config('twill.enabled.media-library')) {
8
-    Route::group(['prefix' => 'media-library', 'as' => 'media-library.'], function () {
8
+    Route::group(['prefix' => 'media-library', 'as' => 'media-library.'], function() {
9 9
         Route::post('sign-s3-upload', ['as' => 'sign-s3-upload', 'uses' => 'MediaLibraryController@signS3Upload']);
10 10
         Route::put('medias/single-update', ['as' => 'medias.single-update', 'uses' => 'MediaLibraryController@singleUpdate']);
11 11
         Route::put('medias/bulk-update', ['as' => 'medias.bulk-update', 'uses' => 'MediaLibraryController@bulkUpdate']);
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 }
17 17
 
18 18
 if (config('twill.enabled.file-library')) {
19
-    Route::group(['prefix' => 'file-library', 'as' => 'file-library.'], function () {
19
+    Route::group(['prefix' => 'file-library', 'as' => 'file-library.'], function() {
20 20
         Route::post('sign-s3-upload', ['as' => 'sign-s3-upload', 'uses' => 'FileLibraryController@signS3Upload']);
21 21
         Route::put('files/single-update', ['as' => 'files.single-update', 'uses' => 'FileLibraryController@singleUpdate']);
22 22
         Route::put('files/bulk-update', ['as' => 'files.bulk-update', 'uses' => 'FileLibraryController@bulkUpdate']);
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 }
32 32
 
33 33
 if (config('twill.enabled.buckets')) {
34
-    $bucketsRoutes = config('twill.bucketsRoutes') ?? collect(config('twill.buckets'))->mapWithKeys(function ($bucketSection, $bucketSectionKey) {
34
+    $bucketsRoutes = config('twill.bucketsRoutes') ?? collect(config('twill.buckets'))->mapWithKeys(function($bucketSection, $bucketSectionKey) {
35 35
         return [$bucketSectionKey => 'featured'];
36 36
     })->toArray();
37 37
 
38 38
     foreach ($bucketsRoutes as $bucketSectionKey => $routePrefix) {
39
-        Route::group(['prefix' => str_replace(".","/",$routePrefix), 'as' => $routePrefix . '.'], function () use ($bucketSectionKey) {
39
+        Route::group(['prefix' => str_replace(".", "/", $routePrefix), 'as' => $routePrefix . '.'], function() use ($bucketSectionKey) {
40 40
             Route::get($bucketSectionKey, ['as' => $bucketSectionKey, 'uses' => 'FeaturedController@index']);
41
-            Route::group(['prefix' => $bucketSectionKey, 'as' => $bucketSectionKey . '.'], function () {
41
+            Route::group(['prefix' => $bucketSectionKey, 'as' => $bucketSectionKey . '.'], function() {
42 42
                 Route::post('save', ['as' => 'save', 'uses' => 'FeaturedController@save']);
43 43
             });
44 44
 
Please login to merge, or discard this patch.