Passed
Push — master ( 07f956...4820b9 )
by Arthur
32:21 queued 26:57
created
Database/Migrations/2018_10_27_121133_create_authorization_tables.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -16,71 +16,71 @@  discard block
 block discarded – undo
16 16
         $tableNames = config('permission.table_names');
17 17
         $columnNames = config('permission.column_names');
18 18
 
19
-        Schema::create($tableNames['permissions'], function (Blueprint $table) {
19
+        Schema::create($tableNames[ 'permissions' ], function(Blueprint $table) {
20 20
             $table->increments('id');
21 21
             $table->string('name');
22 22
             $table->string('guard_name');
23 23
             $table->timestamps();
24 24
         });
25 25
 
26
-        Schema::create($tableNames['roles'], function (Blueprint $table) {
26
+        Schema::create($tableNames[ 'roles' ], function(Blueprint $table) {
27 27
             $table->increments('id');
28 28
             $table->string('name');
29 29
             $table->string('guard_name');
30 30
             $table->timestamps();
31 31
         });
32 32
 
33
-        Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) {
33
+        Schema::create($tableNames[ 'model_has_permissions' ], function(Blueprint $table) use ($tableNames, $columnNames) {
34 34
             $table->unsignedInteger('permission_id');
35 35
 
36 36
             $table->string('model_type');
37
-            $table->unsignedBigInteger($columnNames['model_morph_key']);
38
-            $table->index([$columnNames['model_morph_key'], 'model_type']);
37
+            $table->unsignedBigInteger($columnNames[ 'model_morph_key' ]);
38
+            $table->index([ $columnNames[ 'model_morph_key' ], 'model_type' ]);
39 39
 
40 40
             $table->foreign('permission_id')
41 41
                 ->references('id')
42
-                ->on($tableNames['permissions'])
42
+                ->on($tableNames[ 'permissions' ])
43 43
                 ->onDelete('cascade');
44 44
 
45 45
             $table->primary(
46
-                ['permission_id', $columnNames['model_morph_key'], 'model_type'],
46
+                [ 'permission_id', $columnNames[ 'model_morph_key' ], 'model_type' ],
47 47
                 'model_has_permissions_permission_model_type_primary'
48 48
             );
49 49
         });
50 50
 
51
-        Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) {
51
+        Schema::create($tableNames[ 'model_has_roles' ], function(Blueprint $table) use ($tableNames, $columnNames) {
52 52
             $table->unsignedInteger('role_id');
53 53
 
54 54
             $table->string('model_type');
55
-            $table->unsignedBigInteger($columnNames['model_morph_key']);
56
-            $table->index([$columnNames['model_morph_key'], 'model_type']);
55
+            $table->unsignedBigInteger($columnNames[ 'model_morph_key' ]);
56
+            $table->index([ $columnNames[ 'model_morph_key' ], 'model_type' ]);
57 57
 
58 58
             $table->foreign('role_id')
59 59
                 ->references('id')
60
-                ->on($tableNames['roles'])
60
+                ->on($tableNames[ 'roles' ])
61 61
                 ->onDelete('cascade');
62 62
 
63 63
             $table->primary(
64
-                ['role_id', $columnNames['model_morph_key'], 'model_type'],
64
+                [ 'role_id', $columnNames[ 'model_morph_key' ], 'model_type' ],
65 65
                 'model_has_roles_role_model_type_primary'
66 66
             );
67 67
         });
68 68
 
69
-        Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
69
+        Schema::create($tableNames[ 'role_has_permissions' ], function(Blueprint $table) use ($tableNames) {
70 70
             $table->unsignedInteger('permission_id');
71 71
             $table->unsignedInteger('role_id');
72 72
 
73 73
             $table->foreign('permission_id')
74 74
                 ->references('id')
75
-                ->on($tableNames['permissions'])
75
+                ->on($tableNames[ 'permissions' ])
76 76
                 ->onDelete('cascade');
77 77
 
78 78
             $table->foreign('role_id')
79 79
                 ->references('id')
80
-                ->on($tableNames['roles'])
80
+                ->on($tableNames[ 'roles' ])
81 81
                 ->onDelete('cascade');
82 82
 
83
-            $table->primary(['permission_id', 'role_id']);
83
+            $table->primary([ 'permission_id', 'role_id' ]);
84 84
 
85 85
             app('cache')->forget('spatie.permission.cache');
86 86
         });
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $tableNames = config('permission.table_names');
97 97
 
98
-        Schema::drop($tableNames['role_has_permissions']);
99
-        Schema::drop($tableNames['model_has_roles']);
100
-        Schema::drop($tableNames['model_has_permissions']);
101
-        Schema::drop($tableNames['roles']);
102
-        Schema::drop($tableNames['permissions']);
98
+        Schema::drop($tableNames[ 'role_has_permissions' ]);
99
+        Schema::drop($tableNames[ 'model_has_roles' ]);
100
+        Schema::drop($tableNames[ 'model_has_permissions' ]);
101
+        Schema::drop($tableNames[ 'roles' ]);
102
+        Schema::drop($tableNames[ 'permissions' ]);
103 103
     }
104 104
 }
Please login to merge, or discard this patch.
src/Modules/Schedule/Entities/Schedule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     /**
38 38
      * @var array
39 39
      */
40
-    protected $guarded = [];
40
+    protected $guarded = [ ];
41 41
 
42 42
     protected $casts = [
43 43
         'monitor' => 'boolean',
Please login to merge, or discard this patch.
src/Modules/Schedule/Database/factories/WeekDayFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@
 block discarded – undo
3 3
 use Faker\Generator as Faker;
4 4
 use Modules\Schedule\Entities\WeekDay;
5 5
 
6
-$factory->define(WeekDay::class, function (Faker $faker) {
6
+$factory->define(WeekDay::class, function(Faker $faker) {
7 7
     for ($h = 0; $h < 24; $h++) {
8
-        $times[$h] = $faker->boolean;
8
+        $times[ $h ] = $faker->boolean;
9 9
     }
10 10
 
11 11
     $inInterval = false;
12
-    $interval = [];
13
-    $intervals = [];
12
+    $interval = [ ];
13
+    $intervals = [ ];
14 14
     for ($h = 0; $h < 24; $h++) {
15 15
         // if(sizeof($interval)
16 16
     }
17
-    return [];
17
+    return [ ];
18 18
 });
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/SeedMakeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     protected function getArguments()
39 39
     {
40 40
         return [
41
-            ['name', InputArgument::REQUIRED, 'The name of seeder will be created.'],
42
-            ['module', InputArgument::OPTIONAL, 'The name of module will be used.'],
41
+            [ 'name', InputArgument::REQUIRED, 'The name of seeder will be created.' ],
42
+            [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ],
43 43
         ];
44 44
     }
45 45
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function getTemplateContents()
67 67
     {
68
-        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
68
+        $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName());
69 69
 
70 70
         return (new Stub('/seeder.stub', [
71 71
             'NAME' => $this->getSeederName(),
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $this->clearCache();
84 84
 
85
-        $path = $this->laravel['modules']->getModulePath($this->getModuleName());
85
+        $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName());
86 86
 
87 87
         $seederPath = GenerateConfigReader::read('seeder');
88 88
 
@@ -108,6 +108,6 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function getDefaultNamespace() : string
110 110
     {
111
-        return $this->laravel['modules']->config('paths.generator.seeder.path', 'Database/Seeders');
111
+        return $this->laravel[ 'modules' ]->config('paths.generator.seeder.path', 'Database/Seeders');
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/FactoryMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
     protected function getModelName(): string
46 46
     {
47
-        return once(function () {
48
-            return $this->option('model') ?? $this->anticipate('For what model would you like to generate a factory?', [$this->getModuleName()], $this->getModuleName());
47
+        return once(function() {
48
+            return $this->option('model') ?? $this->anticipate('For what model would you like to generate a factory?', [ $this->getModuleName() ], $this->getModuleName());
49 49
         });
50 50
     }
51 51
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     protected function getOptions()
72 72
     {
73 73
         return [
74
-            ['model', null, InputOption::VALUE_OPTIONAL, 'The Model name for the factory.', null],
74
+            [ 'model', null, InputOption::VALUE_OPTIONAL, 'The Model name for the factory.', null ],
75 75
         ];
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/CommandMakeCommand.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
     protected function getOptions()
60 60
     {
61 61
         return [
62
-            ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null],
62
+            [ 'command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null ],
63 63
         ];
64 64
     }
65 65
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/TestMakeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function getDefaultNamespace() : string
20 20
     {
21
-        return $this->laravel['modules']->config('paths.generator.test.path', 'Tests');
21
+        return $this->laravel[ 'modules' ]->config('paths.generator.test.path', 'Tests');
22 22
     }
23 23
 
24 24
     /**
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     protected function getArguments()
30 30
     {
31 31
         return [
32
-            ['name', InputArgument::REQUIRED, 'The name of the form request class.'],
33
-            ['module', InputArgument::OPTIONAL, 'The name of module will be used.'],
32
+            [ 'name', InputArgument::REQUIRED, 'The name of the form request class.' ],
33
+            [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ],
34 34
         ];
35 35
     }
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     protected function getTemplateContents()
41 41
     {
42
-        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
42
+        $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName());
43 43
 
44 44
         return (new Stub('/unit-test.stub', [
45 45
             'NAMESPACE' => $this->getClassNamespace($module),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     protected function getDestinationFilePath()
54 54
     {
55
-        $path = $this->laravel['modules']->getModulePath($this->getModuleName());
55
+        $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName());
56 56
 
57 57
         $testPath = GenerateConfigReader::read('test');
58 58
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/RuleMakeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function getDefaultNamespace() : string
37 37
     {
38
-        return $this->laravel['modules']->config('paths.generator.rules.path', 'Rules');
38
+        return $this->laravel[ 'modules' ]->config('paths.generator.rules.path', 'Rules');
39 39
     }
40 40
 
41 41
     /**
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     protected function getArguments()
47 47
     {
48 48
         return [
49
-            ['name', InputArgument::REQUIRED, 'The name of the rule class.'],
50
-            ['module', InputArgument::OPTIONAL, 'The name of module will be used.'],
49
+            [ 'name', InputArgument::REQUIRED, 'The name of the rule class.' ],
50
+            [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ],
51 51
         ];
52 52
     }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function getTemplateContents()
58 58
     {
59
-        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
59
+        $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName());
60 60
 
61 61
         return (new Stub('/rule.stub', [
62 62
             'NAMESPACE' => $this->getClassNamespace($module),
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function getDestinationFilePath()
71 71
     {
72
-        $path = $this->laravel['modules']->getModulePath($this->getModuleName());
72
+        $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName());
73 73
 
74 74
         $rulePath = GenerateConfigReader::read('rules');
75 75
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/PolicyMakeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function getDefaultNamespace() : string
37 37
     {
38
-        return $this->laravel['modules']->config('paths.generator.policies.path', 'Policies');
38
+        return $this->laravel[ 'modules' ]->config('paths.generator.policies.path', 'Policies');
39 39
     }
40 40
 
41 41
     /**
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     protected function getArguments()
47 47
     {
48 48
         return [
49
-            ['name', InputArgument::REQUIRED, 'The name of the policy class.'],
50
-            ['module', InputArgument::OPTIONAL, 'The name of module will be used.'],
49
+            [ 'name', InputArgument::REQUIRED, 'The name of the policy class.' ],
50
+            [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ],
51 51
         ];
52 52
     }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function getTemplateContents()
58 58
     {
59
-        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
59
+        $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName());
60 60
 
61 61
         return (new Stub('/policy.plain.stub', [
62 62
             'NAMESPACE' => $this->getClassNamespace($module),
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function getDestinationFilePath()
71 71
     {
72
-        $path = $this->laravel['modules']->getModulePath($this->getModuleName());
72
+        $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName());
73 73
 
74 74
         $policyPath = GenerateConfigReader::read('policies');
75 75
 
Please login to merge, or discard this patch.