Completed
Push — master ( 02f92d...9c9507 )
by Sebastian
15:38
created
app/Services/Html/FormBuilder.php 3 patches
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -60,6 +60,10 @@  discard block
 block discarded – undo
60 60
         ]);
61 61
     }
62 62
 
63
+    /**
64
+     * @param string $fieldName
65
+     * @param string $locale
66
+     */
63 67
     public function getTranslatedFieldName($fieldName, $locale)
64 68
     {
65 69
         if ($locale == '') {
@@ -85,6 +89,9 @@  discard block
 block discarded – undo
85 89
         return Form::getValueAttribute($locale == '' ? $propertyName : Form::getTranslatedFieldName($propertyName, $locale), $value);
86 90
     }
87 91
 
92
+    /**
93
+     * @param string $type
94
+     */
88 95
     public function tags($subject, $type = null)
89 96
     {
90 97
         $allTags = app()->make(TagRepository::class)->getAllWithType($type)->lists('name', 'name');
@@ -97,6 +104,9 @@  discard block
 block discarded – undo
97 104
         );
98 105
     }
99 106
 
107
+    /**
108
+     * @param string $type
109
+     */
100 110
     public function category($subject, $type = null)
101 111
     {
102 112
         $allCategories = app()->make(TagRepository::class)->getAllWithType($type)->lists('name', 'name')->toArray();
@@ -118,6 +128,10 @@  discard block
 block discarded – undo
118 128
         return Form::select('locale', $list, $current, ['data-select' => 'select']);
119 129
     }
120 130
 
131
+    /**
132
+     * @param string $collection
133
+     * @param string $type
134
+     */
121 135
     public function media($subject, $collection, $type, $associated = [])
122 136
     {
123 137
         $initialMedia = htmlspecialchars(fractal()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
             $associated['locales'] = config('app.locales');
132 132
         }
133 133
 
134
-        $associatedData = collect($associated)->map(function ($data, $key) {
134
+        $associatedData = collect($associated)->map(function($data, $key) {
135 135
             $json = htmlspecialchars(json_encode($data));
136 136
 
137 137
             return "data-{$key}=\"{$json}\"";
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use App\Models\Enums\TagType;
6 6
 use App\Models\Tag;
7 7
 use App\Models\Transformers\MediaTransformer;
8
-use App\Repositories\TagRepository;
9 8
 use Carbon\Carbon;
10 9
 use Illuminate\Html\FormBuilder as BaseFormBuilder;
11 10
 use HTML;
Please login to merge, or discard this patch.
app/Console/Commands/ClearBeanstalkdQueue.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
     public function fire()
43 43
     {
44 44
         $queue = ($this->argument('queue')) ?
45
-            $this->argument('queue') :
46
-            config('queue.connections.beanstalkd.queue');
45
+            $this->argument('queue') : config('queue.connections.beanstalkd.queue');
47 46
 
48 47
         $this->info(sprintf('Clearing queue: %s', $queue));
49 48
 
Please login to merge, or discard this patch.
app/Console/Commands/DeleteOldDrafts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function handle()
32 32
     {
33
-        array_map(function ($draftableModelClass) {
33
+        array_map(function($draftableModelClass) {
34 34
                 $this->deleteOldDraftsForModelClass($draftableModelClass);
35 35
         }, $this->getAllDraftableModelClassNames());
36 36
 
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 
40 40
     private function getAllDraftableModelClassNames()
41 41
     {
42
-        return array_filter($this->getAllModelClassNames(), function ($modelClass) {
42
+        return array_filter($this->getAllModelClassNames(), function($modelClass) {
43 43
             return  (in_array(Draftable::class, class_uses($modelClass)));
44 44
         });
45 45
     }
46 46
 
47 47
     private function getAllModelClassNames()
48 48
     {
49
-        return array_map(function ($path) {
49
+        return array_map(function($path) {
50 50
             $modelPath = str_replace(base_path().'/', '', $path);
51 51
             $modelClass = '\\'.ucfirst(str_replace(['/', '.php'], ['\\', ''], $modelPath));
52 52
 
Please login to merge, or discard this patch.
app/Models/FormResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 
12 12
     public static function downloadAll()
13 13
     {
14
-        Excel::create('Responses '.date('Y-m-d'), function ($excel) {
14
+        Excel::create('Responses '.date('Y-m-d'), function($excel) {
15 15
 
16
-            $excel->sheet('Responses', function ($sheet) {
16
+            $excel->sheet('Responses', function($sheet) {
17 17
 
18 18
                 $sheet->freezeFirstRow();
19 19
 
20
-                $sheet->cells('A1:Z1', function ($cells) {
20
+                $sheet->cells('A1:Z1', function($cells) {
21 21
                     $cells->setFontWeight('bold');
22 22
                     $cells->setBorder('node', 'none', 'solid', 'none');
23 23
                 });
Please login to merge, or discard this patch.
app/Services/Mailers/Mailer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         }
36 36
 
37 37
         foreach ($email as $singleEmailAddress) {
38
-            $this->mail->queue($view, $data, function ($message) use ($singleEmailAddress, $subject) {
38
+            $this->mail->queue($view, $data, function($message) use ($singleEmailAddress, $subject) {
39 39
                 $message->to($singleEmailAddress)->subject($subject);
40 40
             });
41 41
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Back/MediaLibraryApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
         $collectionName = $request->get('collectionName');
58 58
 
59
-        $media = $model->getMedia($collectionName)->reduce(function (Collection $collection, Media $media) {
59
+        $media = $model->getMedia($collectionName)->reduce(function(Collection $collection, Media $media) {
60 60
             return $collection->push([
61 61
                 'thumb' => $media->getUrl('admin'),
62 62
                 'image' => $media->getUrl('redactor'),
Please login to merge, or discard this patch.
app/Services/Mailers/AdminMailer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $passwords = app(PasswordBroker::class);
37 37
 
38
-        $passwords->sendResetLink(['email' => $user->email], function (Message $message) {
38
+        $passwords->sendResetLink(['email' => $user->email], function(Message $message) {
39 39
             $message->subject(trans('passwords.subjectEmailNewUser', [], 'nl'));
40 40
         });
41 41
     }
Please login to merge, or discard this patch.
app/Providers/RepositoryServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         foreach ($this->cacheRepositories as $repositoryName) {
32 32
             $events->listen(
33 33
                 "eloquent.saved: App\\Models\\{$repositoryName}",
34
-                function () {Cache::flush();}
34
+                function() {Cache::flush(); }
35 35
             );
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
app/Foundation/helpers.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Get the app's current locale.
4
- */
3
+     * Get the app's current locale.
4
+     */
5 5
 function locale() : string
6 6
 {
7 7
     return app()->getLocale();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         return $constants;
124 124
     }
125 125
 
126
-    return array_filter($constants, function ($key) use ($startsWithFilter) {
126
+    return array_filter($constants, function($key) use ($startsWithFilter) {
127 127
         return starts_with(strtolower($key), strtolower($startsWithFilter));
128 128
     }, ARRAY_FILTER_USE_KEY);
129 129
 }
@@ -146,14 +146,13 @@  discard block
 block discarded – undo
146 146
 function current_user()
147 147
 {
148 148
     return app(App\Services\Navigation\Section::class)->isFront() ?
149
-        current_front_user() :
150
-        current_back_user();
149
+        current_front_user() : current_back_user();
151 150
 }
152 151
 
153 152
 /** @return \App\Services\Auth\Front\User|null */
154 153
 function current_front_user()
155 154
 {
156
-    if (! auth()->guard('front')->check()) {
155
+    if (!auth()->guard('front')->check()) {
157 156
         return null;
158 157
     }
159 158
 
@@ -163,7 +162,7 @@  discard block
 block discarded – undo
163 162
 /** @return \App\Services\Auth\Back\User|null */
164 163
 function current_back_user()
165 164
 {
166
-    if (! auth()->guard('back')->check()) {
165
+    if (!auth()->guard('back')->check()) {
167 166
         return null;
168 167
     }
169 168
 
@@ -173,15 +172,13 @@  discard block
 block discarded – undo
173 172
 function login_url() : string
174 173
 {
175 174
     return app(App\Services\Navigation\Section::class)->isFront() ?
176
-        action('Front\AuthController@getLogin') :
177
-        action('Back\AuthController@getLogin');
175
+        action('Front\AuthController@getLogin') : action('Back\AuthController@getLogin');
178 176
 }
179 177
 
180 178
 function logout_url() : string
181 179
 {
182 180
     return app(App\Services\Navigation\Section::class)->isFront() ?
183
-        action('Front\AuthController@getLogout') :
184
-        action('Back\AuthController@getLogout');
181
+        action('Front\AuthController@getLogout') : action('Back\AuthController@getLogout');
185 182
 }
186 183
 
187 184
 function register_url() : string
@@ -212,7 +209,7 @@  discard block
 block discarded – undo
212 209
 
213 210
 function lang_to_fragments(string $namespace, array $names, array $defaults = []) : array
214 211
 {
215
-    return array_reduce($names, function ($carry, $name) use ($namespace) {
212
+    return array_reduce($names, function($carry, $name) use ($namespace) {
216 213
         $carry[$name] = fragment("{$namespace}.{$name}");
217 214
 
218 215
         return $carry;
Please login to merge, or discard this patch.