Passed
Pull Request — master (#172)
by Yassine
15:30 queued 11:27
created
src/MailEclipseServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     private function registerRoutes()
36 36
     {
37
-        Route::group($this->routeConfiguration(), function () {
37
+        Route::group($this->routeConfiguration(), function() {
38 38
             $this->loadRoutesFrom(__DIR__.'/Http/routes.php');
39 39
         });
40 40
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->mergeConfigFrom(__DIR__.'/../config/maileclipse.php', 'maileclipse');
64 64
 
65 65
         // Register the service the package provides.
66
-        $this->app->singleton('maileclipse', function ($app) {
66
+        $this->app->singleton('maileclipse', function($app) {
67 67
             return new MailEclipse;
68 68
         });
69 69
     }
Please login to merge, or discard this patch.
src/Http/Controllers/MailablesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     {
60 60
         $templateData = MailEclipse::getMailableTemplateData($name);
61 61
 
62
-        if (! $templateData) {
62
+        if (!$templateData) {
63 63
             return redirect()->route('viewMailable', ['name' => $name]);
64 64
         }
65 65
 
Please login to merge, or discard this patch.
src/MailEclipseMailables.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $fqcns = [];
32 32
 
33
-        if (! file_exists(config('maileclipse.mailables_dir'))) {
33
+        if (!file_exists(config('maileclipse.mailables_dir'))) {
34 34
             return;
35 35
         } else {
36 36
             $allFiles = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(config('maileclipse.mailables_dir')));
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 $tokens = token_get_all($content);
44 44
                 $namespace = '';
45 45
                 for ($index = 0; isset($tokens[$index]); $index++) {
46
-                    if (! isset($tokens[$index][0])) {
46
+                    if (!isset($tokens[$index][0])) {
47 47
                         continue;
48 48
                     }
49 49
                     if (T_NAMESPACE === $tokens[$index][0]) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
                         $mailableClass = $namespace.'\\'.$tokens[$index][1];
61 61
 
62
-                        if (! MailEclipse::mailable_exists($mailableClass)) {
62
+                        if (!MailEclipse::mailable_exists($mailableClass)) {
63 63
                             continue;
64 64
                         }
65 65
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
                         $mailable_data = MailEclipse::buildMailable($mailableClass);
73 73
 
74
-                        if (! is_null(MailEclipse::handleMailableViewDataArgs($mailableClass))) {
74
+                        if (!is_null(MailEclipse::handleMailableViewDataArgs($mailableClass))) {
75 75
                             $mailable_view_data = MailEclipse::getMailableViewData(MailEclipse::handleMailableViewDataArgs($mailableClass), $mailable_data);
76 76
                         } else {
77 77
                             $mailable_view_data = MailEclipse::getMailableViewData(new $mailableClass, $mailable_data);
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
                         $fqcns[$i]['view_path'] = null;
93 93
                         $fqcns[$i]['text_view_path'] = null;
94 94
 
95
-                        if (! is_null($fqcns[$i]['markdown']) && View::exists($fqcns[$i]['markdown'])) {
95
+                        if (!is_null($fqcns[$i]['markdown']) && View::exists($fqcns[$i]['markdown'])) {
96 96
                             $fqcns[$i]['view_path'] = View($fqcns[$i]['markdown'])->getPath();
97 97
                         }
98 98
 
99
-                        if (! is_null($fqcns[$i]['data'])) {
100
-                            if (! is_null($fqcns[$i]['data']->view) && View::exists($fqcns[$i]['data']->view)) {
99
+                        if (!is_null($fqcns[$i]['data'])) {
100
+                            if (!is_null($fqcns[$i]['data']->view) && View::exists($fqcns[$i]['data']->view)) {
101 101
                                 $fqcns[$i]['view_path'] = View($fqcns[$i]['data']->view)->getPath();
102 102
                             }
103 103
 
104
-                            if (! is_null($fqcns[$i]['data']->textView) && View::exists($fqcns[$i]['data']->textView)) {
104
+                            if (!is_null($fqcns[$i]['data']->textView) && View::exists($fqcns[$i]['data']->textView)) {
105 105
                                 $fqcns[$i]['text_view_path'] = View($fqcns[$i]['data']->textView)->getPath();
106 106
                                 $fqcns[$i]['text_view'] = $fqcns[$i]['data']->textView;
107 107
                             }
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
                 }
115 115
             }
116 116
 
117
-            $collection = collect($fqcns)->map(function ($mailable) {
117
+            $collection = collect($fqcns)->map(function($mailable) {
118 118
                 return $mailable;
119
-            })->reject(function ($object) {
120
-                return ! method_exists($object['namespace'], 'build');
119
+            })->reject(function($object) {
120
+                return !method_exists($object['namespace'], 'build');
121 121
             });
122 122
 
123 123
             return $collection;
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 Route::get('/', 'MailablesController@toMailablesList');
6 6
 
7
-Route::group(['prefix' => 'templates'], function () {
7
+Route::group(['prefix' => 'templates'], function() {
8 8
     Route::get('/', 'TemplatesController@index')->name('templateList');
9 9
     Route::get('new', 'TemplatesController@select')->name('selectNewTemplate');
10 10
     Route::get('new/{type}/{name}/{skeleton}', 'TemplatesController@new')->name('newTemplate');
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     Route::post('preview', 'TemplatesController@previewTemplateMarkdownView')->name('previewTemplateMarkdownView');
16 16
 });
17 17
 
18
-Route::group(['prefix' => 'mailables'], function () {
18
+Route::group(['prefix' => 'mailables'], function() {
19 19
     Route::get('/', 'MailablesController@index')->name('mailableList');
20 20
     Route::get('view/{name}', 'MailablesController@viewMailable')->name('viewMailable');
21 21
     Route::get('edit/template/{name}', 'MailablesController@editMailable')->name('editMailable');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     Route::post('new', 'MailablesController@generateMailable')->name('generateMailable');
26 26
     Route::post('delete', 'MailablesController@delete')->name('deleteMailable');
27 27
 
28
-    Route::group(['prefix' => 'preview'], function () {
28
+    Route::group(['prefix' => 'preview'], function() {
29 29
         Route::post('template', 'MailablesPreviewController@markdownView')->name('previewMarkdownView');
30 30
         Route::get('template/previewerror', 'MailablesPreviewController@previewError')->name('templatePreviewError');
31 31
         Route::get('{name}', 'MailablesPreviewController@mailable')->name('previewMailable');
Please login to merge, or discard this patch.
src/Http/Controllers/MailablesPreviewController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $instance = new $resource['namespace'];
49 49
         }
50 50
 
51
-        $view = ! is_null($resource['markdown'])
51
+        $view = !is_null($resource['markdown'])
52 52
             ? $resource['markdown']
53 53
             : $resource['data']->view;
54 54
 
Please login to merge, or discard this patch.
src/Actions/DeleteMailable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         $mailableFile = config('maileclipse.mailables_dir').'/'.$request['mailablename'].'.php';
12 12
 
13
-        if (! File::exists($mailableFile)) {
13
+        if (!File::exists($mailableFile)) {
14 14
             return [
15 15
                 'status' => 'error',
16 16
                 'message' => 'Mailable '.$request['mailablename'].' does not exist',
Please login to merge, or discard this patch.
src/Actions/CreateMailable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             ];
26 26
         }
27 27
 
28
-        if (! MailEclipse::getMailable('name', $parameters['name'])->isEmpty() && ! isset($parameters['force'])) {
28
+        if (!MailEclipse::getMailable('name', $parameters['name'])->isEmpty() && !isset($parameters['force'])) {
29 29
             return [
30 30
                 'status' => 'error',
31 31
                 'message' => 'This mailable name already exists. names should be unique! to override it, enable "force" option.',
Please login to merge, or discard this patch.
src/Utils/Replacer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,20 +97,20 @@
 block discarded – undo
97 97
     {
98 98
         $components = config('maileclipse.components');
99 99
 
100
-        $this->bladeMatchPatterns = array_map(function ($component) {
100
+        $this->bladeMatchPatterns = array_map(function($component) {
101 101
             return "/@${component}/i";
102 102
         }, $components);
103 103
 
104
-        $this->bladeReplacePatterns = array_map(function ($component) {
104
+        $this->bladeReplacePatterns = array_map(function($component) {
105 105
             return "[${component}]: # ";
106 106
         }, $components);
107 107
 
108 108
 
109
-        $this->editorMatchPatterns = array_map(function ($component) {
109
+        $this->editorMatchPatterns = array_map(function($component) {
110 110
             return "/\[${component}]:\s?#\s?/i";
111 111
         }, $components);
112 112
 
113
-        $this->editorReplacePatterns = array_map(function ($component) {
113
+        $this->editorReplacePatterns = array_map(function($component) {
114 114
             return "@${component}";
115 115
         }, $components);
116 116
     }
Please login to merge, or discard this patch.
src/MailEclipse.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             ->where('template_slug', $templateSlug)->first();
77 77
 
78 78
         if ($template !== null) {
79
-            self::saveTemplates(self::getTemplates()->reject(function ($value) use ($template) {
79
+            self::saveTemplates(self::getTemplates()->reject(function($value) use ($template) {
80 80
                 return $value->template_slug === $template->template_slug;
81 81
             }));
82 82
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
     public static function getTemplatesFile()
105 105
     {
106 106
         $file = config('maileclipse.mailables_dir').'templates.json';
107
-        if (! file_exists($file)) {
108
-            if (! file_exists(config('maileclipse.mailables_dir'))) {
109
-                if (! mkdir($concurrentDirectory = config('maileclipse.mailables_dir')) && ! is_dir($concurrentDirectory)) {
107
+        if (!file_exists($file)) {
108
+            if (!file_exists(config('maileclipse.mailables_dir'))) {
109
+                if (!mkdir($concurrentDirectory = config('maileclipse.mailables_dir')) && !is_dir($concurrentDirectory)) {
110 110
                     throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
111 111
                 }
112 112
             }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             ->where('template_slug', $request->templateslug)->first();
137 137
 
138 138
         if ($template !== null) {
139
-            if (! preg_match("/^[a-zA-Z0-9-_\s]+$/", $request->title)) {
139
+            if (!preg_match("/^[a-zA-Z0-9-_\s]+$/", $request->title)) {
140 140
                 return response()->json([
141 141
                     'status' => 'failed',
142 142
                     'message' => 'Template name not valid',
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             }
156 156
 
157 157
             // Update
158
-            $oldForm = self::getTemplates()->reject(function ($value) use ($template) {
158
+            $oldForm = self::getTemplates()->reject(function($value) use ($template) {
159 159
                 return $value->template_slug === $template->template_slug;
160 160
             });
161 161
             $newForm = array_merge($oldForm->toArray(), [array_merge((array) $template, [
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     public static function createTemplate($request): JsonResponse
240 240
     {
241
-        if (! preg_match("/^[a-zA-Z0-9-_\s]+$/", $request->template_name)) {
241
+        if (!preg_match("/^[a-zA-Z0-9-_\s]+$/", $request->template_name)) {
242 242
             return response()->json([
243 243
                 'status' => 'error',
244 244
                 'message' => 'Template name not valid',
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $view = self::VIEW_NAMESPACE.'::templates.'.$request->template_name;
250 250
         $templateName = Str::camel(preg_replace('/\s+/', '_', $request->template_name));
251 251
 
252
-        if (! view()->exists($view) && ! self::getTemplates()->contains('template_slug', '=', $templateName)) {
252
+        if (!view()->exists($view) && !self::getTemplates()->contains('template_slug', '=', $templateName)) {
253 253
             self::saveTemplates(self::getTemplates()
254 254
                 ->push([
255 255
                     'template_name' => $request->template_name,
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
             $dir = resource_path('views/vendor/'.self::VIEW_NAMESPACE.'/templates');
264 264
 
265
-            if (! File::isDirectory($dir)) {
265
+            if (!File::isDirectory($dir)) {
266 266
                 File::makeDirectory($dir, 0755, true);
267 267
             }
268 268
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
         $replaced = Replacer::toBlade($content);
304 304
 
305
-        if (! $save) {
305
+        if (!$save) {
306 306
             return $replaced;
307 307
         }
308 308
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
             ]);
400 400
         }
401 401
 
402
-        if (! $request->has('force') && ! self::getMailable('name', $name)->isEmpty()) {
402
+        if (!$request->has('force') && !self::getMailable('name', $name)->isEmpty()) {
403 403
             return response()->json([
404 404
                 'status' => 'error',
405 405
                 'message' => 'This mailable name already exists. names should be unique! to override it, enable "force" option.',
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     {
453 453
         $fqcns = [];
454 454
 
455
-        if (! file_exists(config('maileclipse.mailables_dir'))) {
455
+        if (!file_exists(config('maileclipse.mailables_dir'))) {
456 456
             return;
457 457
         } else {
458 458
             $allFiles = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(config('maileclipse.mailables_dir')));
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                 $tokens = token_get_all($content);
466 466
                 $namespace = '';
467 467
                 for ($index = 0; isset($tokens[$index]); $index++) {
468
-                    if (! isset($tokens[$index][0])) {
468
+                    if (!isset($tokens[$index][0])) {
469 469
                         continue;
470 470
                     }
471 471
                     if (T_NAMESPACE === $tokens[$index][0]) {
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 
482 482
                         $mailableClass = $namespace.'\\'.$tokens[$index][1];
483 483
 
484
-                        if (! self::mailable_exists($mailableClass)) {
484
+                        if (!self::mailable_exists($mailableClass)) {
485 485
                             continue;
486 486
                         }
487 487
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 
494 494
                         $mailable_data = self::buildMailable($mailableClass);
495 495
 
496
-                        if (! is_null(self::handleMailableViewDataArgs($mailableClass))) {
496
+                        if (!is_null(self::handleMailableViewDataArgs($mailableClass))) {
497 497
                             $mailable_view_data = self::getMailableViewData(self::handleMailableViewDataArgs($mailableClass), $mailable_data);
498 498
                         } else {
499 499
                             $mailable_view_data = self::getMailableViewData(new $mailableClass, $mailable_data);
@@ -514,16 +514,16 @@  discard block
 block discarded – undo
514 514
                         $fqcns[$i]['view_path'] = null;
515 515
                         $fqcns[$i]['text_view_path'] = null;
516 516
 
517
-                        if (! is_null($fqcns[$i]['markdown']) && View::exists($fqcns[$i]['markdown'])) {
517
+                        if (!is_null($fqcns[$i]['markdown']) && View::exists($fqcns[$i]['markdown'])) {
518 518
                             $fqcns[$i]['view_path'] = View($fqcns[$i]['markdown'])->getPath();
519 519
                         }
520 520
 
521
-                        if (! is_null($fqcns[$i]['data'])) {
522
-                            if (! is_null($fqcns[$i]['data']->view) && View::exists($fqcns[$i]['data']->view)) {
521
+                        if (!is_null($fqcns[$i]['data'])) {
522
+                            if (!is_null($fqcns[$i]['data']->view) && View::exists($fqcns[$i]['data']->view)) {
523 523
                                 $fqcns[$i]['view_path'] = View($fqcns[$i]['data']->view)->getPath();
524 524
                             }
525 525
 
526
-                            if (! is_null($fqcns[$i]['data']->textView) && View::exists($fqcns[$i]['data']->textView)) {
526
+                            if (!is_null($fqcns[$i]['data']->textView) && View::exists($fqcns[$i]['data']->textView)) {
527 527
                                 $fqcns[$i]['text_view_path'] = View($fqcns[$i]['data']->textView)->getPath();
528 528
                                 $fqcns[$i]['text_view'] = $fqcns[$i]['data']->textView;
529 529
                             }
@@ -536,10 +536,10 @@  discard block
 block discarded – undo
536 536
                 }
537 537
             }
538 538
 
539
-            $collection = collect($fqcns)->map(function ($mailable) {
539
+            $collection = collect($fqcns)->map(function($mailable) {
540 540
                 return $mailable;
541
-            })->reject(function ($object) {
542
-                return ! method_exists($object['namespace'], 'build');
541
+            })->reject(function($object) {
542
+                return !method_exists($object['namespace'], 'build');
543 543
             });
544 544
 
545 545
             return $collection;
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 
564 564
             $eloquentFactory = app(EloquentFactory::class);
565 565
 
566
-            $args = collect($params)->map(function ($param) {
566
+            $args = collect($params)->map(function($param) {
567 567
                 if ($param->getType() !== null) {
568 568
                     if (class_exists($param->getType()->getName())) {
569 569
                         $parameters = [
@@ -643,17 +643,17 @@  discard block
 block discarded – undo
643 643
         $reflection = collect($params)->where('name', $arg)->first()->getType();
644 644
 
645 645
         if (version_compare(phpversion(), '7.1', '>=')) {
646
-            $type = ! is_null($reflection)
646
+            $type = !is_null($reflection)
647 647
                 ? self::TYPES[$reflection->getName()]
648 648
                 : null;
649 649
         } else {
650
-            $type = ! is_null($reflection)
650
+            $type = !is_null($reflection)
651 651
                 ? self::TYPES[/** @scrutinizer ignore-deprecated */ $reflection->__toString()]
652 652
                 : null;
653 653
         }
654 654
 
655 655
         try {
656
-            return ! is_null($type)
656
+            return !is_null($type)
657 657
                     ? $type
658 658
                     : new Mocked($arg, \ReeceM\Mocker\Utils\VarStore::singleton());
659 659
         } catch (\Exception $e) {
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 
685 685
         foreach ($properties as $prop) {
686 686
             if ($prop->class == $data->getName() || $prop->class == get_parent_class($data->getName()) &&
687
-                    get_parent_class($data->getName()) != 'Illuminate\Mail\Mailable' && ! $prop->isStatic()) {
687
+                    get_parent_class($data->getName()) != 'Illuminate\Mail\Mailable' && !$prop->isStatic()) {
688 688
                 $allProps[] = $prop->name;
689 689
             }
690 690
         }
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 
704 704
         $mailableData = collect($classProps)->merge($withFuncData);
705 705
 
706
-        $data = $mailableData->map(function ($parameter) use ($mailable_data) {
706
+        $data = $mailableData->map(function($parameter) use ($mailable_data) {
707 707
             return [
708 708
                 'key' => $parameter,
709 709
                 'value' => property_exists($mailable_data, $parameter) ? $mailable_data->$parameter : null,
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
      */
751 751
     protected static function mailable_exists($mailable): bool
752 752
     {
753
-        if (! class_exists($mailable)) {
753
+        if (!class_exists($mailable)) {
754 754
             return false;
755 755
         }
756 756
 
@@ -808,17 +808,17 @@  discard block
 block discarded – undo
808 808
      */
809 809
     public static function renderPreview($simpleview, $view, $template = false, $instance = null)
810 810
     {
811
-        if (! View::exists($view)) {
811
+        if (!View::exists($view)) {
812 812
             return;
813 813
         }
814 814
 
815
-        if (! $template) {
815
+        if (!$template) {
816 816
             $obj = self::buildMailable($instance);
817 817
             $viewData = $obj->viewData;
818 818
             $_data = array_merge($instance->buildViewData(), $viewData);
819 819
 
820 820
             foreach ($_data as $key => $value) {
821
-                if (! is_object($value)) {
821
+                if (!is_object($value)) {
822 822
                     $_data[$key] = '<span class="maileclipse-key" title="Variable">'.$key.'</span>';
823 823
                 }
824 824
             }
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
         /**
885 885
          * Removal of reserved keywords.
886 886
          */
887
-        if (! preg_match('/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/', $name) ||
887
+        if (!preg_match('/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/', $name) ||
888 888
             substr_compare($name, $suffix, -strlen($suffix), strlen($suffix), true) !== 0
889 889
         ) {
890 890
             return false;
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
      */
906 906
     private static function resolveFactory($eloquentFactory, $model): ?object
907 907
     {
908
-        if (! config('maileclipse.factory')) {
908
+        if (!config('maileclipse.factory')) {
909 909
             return app($model);
910 910
         }
911 911
 
@@ -953,9 +953,9 @@  discard block
 block discarded – undo
953 953
         collect((new ReflectionClass($factoryModel))->getMethods())
954 954
             ->pluck('name')
955 955
             ->diff(collect($model->getMethods())->pluck('name'))
956
-            ->filter(function ($method) use ($factoryModel) {
956
+            ->filter(function($method) use ($factoryModel) {
957 957
                 return rescue(
958
-                    function () use ($factoryModel, $method) {
958
+                    function() use ($factoryModel, $method) {
959 959
                         $parents = class_parents($factoryModel->$method());
960 960
 
961 961
                         return isset($parents["Illuminate\Database\Eloquent\Relations\Relation"]);
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
                     false
965 965
                 );
966 966
             })
967
-            ->each(function ($relationName) use (&$factoryModel, $eloquentFactory) {
967
+            ->each(function($relationName) use (&$factoryModel, $eloquentFactory) {
968 968
                 $factoryModel = self::loadRelations($relationName, $factoryModel, $eloquentFactory);
969 969
             });
970 970
 
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
                 $relatedFactory = self::resolveFactory($eloquentFactory, get_class($related));
995 995
 
996 996
                 if (self::$traversed <= config('maileclipse.relation_depth')) {
997
-                    if (! $loadIfIterable) {
997
+                    if (!$loadIfIterable) {
998 998
                         $relatedFactory = self::hydrateRelations($eloquentFactory, $relatedFactory);
999 999
                     } else {
1000 1000
                         $models = collect();
Please login to merge, or discard this patch.