Completed
Push — master ( a9059c...5ce9aa )
by Dmitry
01:45
created
src/Schema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
     public function once($name, $callback)
92 92
     {
93
-        $key = 'once' . $name;
93
+        $key = 'once'.$name;
94 94
 
95 95
         $rows = $this->mapper->find('_schema', ['key' => $key]);
96 96
         if (!count($rows)) {
Please login to merge, or discard this patch.
src/Mapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public function addPlugin($class)
21 21
     {
22 22
         if (!is_subclass_of($class, Plugin::class)) {
23
-            throw new Exception("Plugin should extend " . Plugin::class . " class");
23
+            throw new Exception("Plugin should extend ".Plugin::class." class");
24 24
         }
25 25
 
26 26
         $plugin = is_object($class) ? $class : new $class($this);
Please login to merge, or discard this patch.
src/Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             if (!is_object($migration)) {
25 25
                 $migration = new $migration;
26 26
             }
27
-            $schema->once(get_class($migration), function () use ($migration) {
27
+            $schema->once(get_class($migration), function() use ($migration) {
28 28
                 $migration->migrate($this->mapper);
29 29
             });
30 30
         }
Please login to merge, or discard this patch.
src/Plugin/UserClasses.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         if (!is_subclass_of($class, Entity::class)) {
39
-            throw new Exception("Entity should extend " . Entity::class . " class");
39
+            throw new Exception("Entity should extend ".Entity::class." class");
40 40
         }
41 41
 
42 42
         $this->entityMapping[$space] = $class;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         if (!is_subclass_of($class, Repository::class)) {
54
-            throw new Exception("Repository should extend " . Repository::class . " class");
54
+            throw new Exception("Repository should extend ".Repository::class." class");
55 55
         }
56 56
 
57 57
         $this->repositoryMapping[$space] = $class;
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function disableRequest($class)
26 26
     {
27 27
         if (!is_subclass_of($class, Request::class)) {
28
-            throw new Exception("Invalid request type: " . $class);
28
+            throw new Exception("Invalid request type: ".$class);
29 29
         }
30 30
         $this->disabledRequests[] = $class;
31 31
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function sendRequest(Request $request)
34 34
     {
35 35
         if (in_array(get_class($request), $this->disabledRequests)) {
36
-            throw new Exception(get_class($request) . ' is disabled');
36
+            throw new Exception(get_class($request).' is disabled');
37 37
         }
38 38
         $start = microtime(1);
39 39
         $response = parent::sendRequest($request);
Please login to merge, or discard this patch.
src/Plugin/Annotation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                         $space->addIndex($index);
140 140
                     } catch (Exception $e) {
141 141
                         $presentation = json_encode($properties['indexes'][$i]);
142
-                        throw new Exception("Failed to add index $presentation. ". $e->getMessage(), 0, $e);
142
+                        throw new Exception("Failed to add index $presentation. ".$e->getMessage(), 0, $e);
143 143
                     }
144 144
                 }
145 145
             }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         foreach ($schema->getSpaces() as $space) {
149 149
             if (!count($space->getIndexes())) {
150 150
                 if (!$space->hasProperty('id')) {
151
-                    throw new Exception("No primary index on ". $space->getName());
151
+                    throw new Exception("No primary index on ".$space->getName());
152 152
                 }
153 153
                 $space->addIndex(['id']);
154 154
             }
Please login to merge, or discard this patch.
src/Entity.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
             }
39 39
         }
40
-        throw new BadMethodCallException("Call to undefined method ". get_class($this).'::'.$name);
40
+        throw new BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name);
41 41
     }
42 42
 
43 43
     public function __debugInfo()
Please login to merge, or discard this patch.
src/Plugin/Temporal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                 'entityId' => $id,
325 325
                 'parent'   => $node ? $node->id : 0,
326 326
             ];
327
-            if (count($config) == $i+1) {
327
+            if (count($config) == $i + 1) {
328 328
                 $params['begin'] = $link['begin'];
329 329
                 $params['timestamp'] = 0;
330 330
             }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
             $this->mapper->addPlugin(Sequence::class);
400 400
         }
401 401
 
402
-        $this->mapper->getSchema()->once(__CLASS__.'@entity', function (Mapper $mapper) {
402
+        $this->mapper->getSchema()->once(__CLASS__.'@entity', function(Mapper $mapper) {
403 403
             $this->mapper->getSchema()
404 404
                 ->createSpace('_temporal_entity', [
405 405
                     'id'   => 'unsigned',
Please login to merge, or discard this patch.
src/Plugin/Temporal/Schema.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private function initLink()
33 33
     {
34
-        $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) {
34
+        $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
35 35
             $mapper->getSchema()
36 36
                 ->createSpace('_temporal_link', [
37 37
                     'id'        => 'unsigned',
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 ->addIndex(['entity', 'id', 'begin']);
63 63
         });
64 64
 
65
-        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function (Mapper $mapper) {
65
+        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function(Mapper $mapper) {
66 66
             $mapper->getSchema()->getSpace('_temporal_link')->addProperty('idle', 'unsigned');
67 67
         });
68 68
     }
69 69
 
70 70
     private function initOverride()
71 71
     {
72
-        $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) {
72
+        $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
73 73
             $mapper->getSchema()
74 74
                 ->createSpace('_temporal_override', [
75 75
                     'entity'     => 'unsigned',
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
                 ->addIndex(['entity', 'id', 'begin']);
94 94
         });
95 95
 
96
-        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function (Mapper $mapper) {
96
+        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) {
97 97
             $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned');
98 98
         });
99 99
     }
100 100
 
101 101
     private function initReference()
102 102
     {
103
-        $this->mapper->getSchema()->once(__CLASS__.'@reference', function (Mapper $mapper) {
103
+        $this->mapper->getSchema()->once(__CLASS__.'@reference', function(Mapper $mapper) {
104 104
             $mapper->getSchema()
105 105
                 ->createSpace('_temporal_reference', [
106 106
                     'idle'       => 'unsigned',
Please login to merge, or discard this patch.