Completed
Pull Request — master (#28)
by Jolita
04:57
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/Repositories/DbRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         $model = static::MODEL;
36 36
 
37
-        if (! isset((new $model)->translatedAttributes)) {
37
+        if (!isset((new $model)->translatedAttributes)) {
38 38
             return $this->query()->online()->where('url', $url)->first();
39 39
         }
40 40
 
Please login to merge, or discard this patch.