Passed
Pull Request — master (#5)
by Maksim
05:00
created
src/Scopes/CompositeKeyScope.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function apply($query)
42 42
     {
43
-        $query->where(function ($query) {
43
+        $query->where(function($query) {
44 44
             foreach ($this->ids as $compositeKey) {
45 45
                 // try to parse normalized key
46 46
                 if (!is_array($compositeKey)) {
47 47
                     $compositeKey = $this->parseNormalizedKey($compositeKey);
48 48
                 } else {
49
-                    if(method_exists($query->getModel(), 'hexBinaryColumns') && $query->getModel()->hexBinaryColumns()) {
49
+                    if (method_exists($query->getModel(), 'hexBinaryColumns') && $query->getModel()->hexBinaryColumns()) {
50 50
                         foreach ($compositeKey as $key => $value) {
51 51
                             $compositeKey[$key] = in_array($key, $this->getBinaryColumns()) ? $this->recoverBinaryKey(
52 52
                                 $key,
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     }
57 57
                 }
58 58
 
59
-                $queryWriter = function ($query) use ($compositeKey) {
59
+                $queryWriter = function($query) use ($compositeKey) {
60 60
                     /*
61 61
                      * @var \Illuminate\Database\Query\Builder $query
62 62
                      */
Please login to merge, or discard this patch.
tests/CompositeKeyBaseUnit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         if (env('DEBUG_QUERY_LOG', true)) {
39 39
             DB::listen(
40
-                function (QueryExecuted $queryExecuted) {
40
+                function(QueryExecuted $queryExecuted) {
41 41
                     var_dump($queryExecuted->sql);
42 42
                     var_dump($queryExecuted->bindings);
43 43
                 }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     protected function loadMigrationsFrom($paths): void
59 59
     {
60 60
         $paths = (is_array($paths)) ? $paths : [$paths];
61
-        $this->app->afterResolving('migrator', function ($migrator) use ($paths) {
61
+        $this->app->afterResolving('migrator', function($migrator) use ($paths) {
62 62
             foreach ((array) $paths as $path) {
63 63
                 $migrator->path($path);
64 64
             }
Please login to merge, or discard this patch.
tests/Stubs/TestRole.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
         'name',
18 18
     ];
19 19
 
20
-    public function users(){
20
+    public function users() {
21 21
         return $this->hasMany(TestBinaryUser::class, 'role_id', 'role_id');
22 22
     }
23 23
 
24
-    public function hex_users(){
24
+    public function hex_users() {
25 25
         return $this->hasMany(TestBinaryUserHex::class, 'role_id', 'role_id');
26 26
     }
27 27
 
Please login to merge, or discard this patch.
tests/Stubs/TestBinaryRole.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
         'name',
25 25
     ];
26 26
 
27
-    public function users(){
27
+    public function users() {
28 28
         return $this->hasMany(TestBinaryUser::class, 'binary_role_id', 'role_id');
29 29
     }
30 30
 
31
-    public function hex_users(){
31
+    public function hex_users() {
32 32
         return $this->hasMany(TestBinaryUserHex::class, 'binary_role_id', 'role_id');
33 33
     }
34 34
 
Please login to merge, or discard this patch.
tests/SingleKeyBinaryModelTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function validateEagerRelations(TestBinaryRole $model)
51 51
     {
52
-        $model->loadMissing(['users','hex_users']);
52
+        $model->loadMissing(['users', 'hex_users']);
53 53
         $this->assertNotNull($model->toArray()['users']);
54 54
         $this->assertNotNull($model->toArray()['hex_users']);
55 55
         $this->assertNotNull($model->users);
Please login to merge, or discard this patch.
tests/SingleKeyBinaryModelHexTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function validateEagerRelations(TestBinaryRoleHex $model)
51 51
     {
52
-        $model->loadMissing(['users','hex_users']);
52
+        $model->loadMissing(['users', 'hex_users']);
53 53
         $this->assertNotNull($model->toArray()['users']);
54 54
         $this->assertNotNull($model->toArray()['hex_users']);
55 55
         $this->assertNotNull($model->users);
Please login to merge, or discard this patch.
tests/database/migrations/2014_10_12_000004_create_roles_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function up()
13 13
     {
14
-        Schema::create('roles', function (Blueprint $table) {
14
+        Schema::create('roles', function(Blueprint $table) {
15 15
             $table->increments('role_id');
16 16
             $table->string('name');
17 17
         });
Please login to merge, or discard this patch.
tests/database/migrations/2014_10_12_000004_create_binary_roles_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function up()
13 13
     {
14
-        Schema::create('binary_roles', function (Blueprint $table) {
14
+        Schema::create('binary_roles', function(Blueprint $table) {
15 15
             $table->binary('role_id');
16 16
             $table->string('name');
17 17
         });
Please login to merge, or discard this patch.
tests/BinaryKeysTestWithMutators.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     protected function getEnvironmentSetUp($app)
14 14
     {
15 15
         $app['config']->set('database.default', 'testing');
16
-        $app['router']->get('binary-users/{binaryUser}', function (TestBinaryUserHex $binaryUser) {
16
+        $app['router']->get('binary-users/{binaryUser}', function(TestBinaryUserHex $binaryUser) {
17 17
             return $binaryUser->toJson();
18 18
         })->middleware(SubstituteBindings::class);
19 19
     }
Please login to merge, or discard this patch.