Completed
Push — master ( acf543...534925 )
by Dmitry
01:42
created
src/Plugin/Procedure.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function register($class)
36 36
     {
37 37
         if (!is_subclass_of($class, BaseProcedure::class)) {
38
-            throw new Exception("Procedure should extend " . BaseProcedure::class . ' class');
38
+            throw new Exception("Procedure should extend ".BaseProcedure::class.' class');
39 39
         }
40 40
         $this->initSchema();
41 41
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     private function initSchema()
71 71
     {
72
-        $this->mapper->getSchema()->once(__CLASS__, function ($mapper) {
72
+        $this->mapper->getSchema()->once(__CLASS__, function($mapper) {
73 73
             $mapper->getSchema()
74 74
                 ->createSpace('_procedure')
75 75
                 ->addProperties([
Please login to merge, or discard this patch.
src/Plugin/Annotation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 $tags = $description->getTags('var');
159 159
 
160 160
                 if (!count($tags)) {
161
-                    throw new Exception("No var tag for " . $entity . '::' . $property->getName());
161
+                    throw new Exception("No var tag for ".$entity.'::'.$property->getName());
162 162
                 }
163 163
 
164 164
                 $byTypes = [];
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 }
168 168
 
169 169
                 if (!array_key_exists('var', $byTypes)) {
170
-                    throw new Exception("No var tag for " . $entity . '::' . $property->getName());
170
+                    throw new Exception("No var tag for ".$entity.'::'.$property->getName());
171 171
                 }
172 172
 
173 173
                 $propertyName = $property->getName();
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                         $space->addIndex($index);
239 239
                     } catch (Exception $e) {
240 240
                         $presentation = json_encode($properties['indexes'][$i]);
241
-                        throw new Exception("Failed to add index $presentation. " . $e->getMessage(), 0, $e);
241
+                        throw new Exception("Failed to add index $presentation. ".$e->getMessage(), 0, $e);
242 242
                     }
243 243
                 }
244 244
             }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             }
250 250
             if (!count($space->getIndexes())) {
251 251
                 if (!$space->hasProperty('id')) {
252
-                    throw new Exception("No primary index on " . $space->getName());
252
+                    throw new Exception("No primary index on ".$space->getName());
253 253
                 }
254 254
                 $space->addIndex(['id']);
255 255
             }
Please login to merge, or discard this patch.
src/Plugin/Temporal/Schema.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             throw new InvalidArgumentException("Nothing to initialize");
24 24
         }
25 25
 
26
-        $method = 'init' . ucfirst($name);
26
+        $method = 'init'.ucfirst($name);
27 27
         if (!method_exists($this, $method)) {
28 28
             throw new InvalidArgumentException("No initializer for $name");
29 29
         }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     private function initLink()
35 35
     {
36
-        $this->mapper->getSchema()->once(__CLASS__ . '@link', function (Mapper $mapper) {
36
+        $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
37 37
             $mapper->getSchema()
38 38
                 ->createSpace('_temporal_link', [
39 39
                     'id'        => 'unsigned',
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
                 ->addIndex(['entity', 'id', 'begin']);
65 65
         });
66 66
 
67
-        $this->mapper->getSchema()->once(__CLASS__ . '@link-idle', function (Mapper $mapper) {
67
+        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function(Mapper $mapper) {
68 68
             $mapper->getSchema()->getSpace('_temporal_link')->addProperty('idle', 'unsigned');
69 69
         });
70 70
     }
71 71
 
72 72
     private function initOverride()
73 73
     {
74
-        $this->mapper->getSchema()->once(__CLASS__ . '@states', function (Mapper $mapper) {
74
+        $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
75 75
             $mapper->getSchema()
76 76
                 ->createSpace('_temporal_override', [
77 77
                     'entity'     => 'unsigned',
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
                 ->addIndex(['entity', 'id', 'begin']);
96 96
         });
97 97
 
98
-        $this->mapper->getSchema()->once(__CLASS__ . '@override-idle', function (Mapper $mapper) {
98
+        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) {
99 99
             $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned');
100 100
         });
101 101
     }
102 102
 
103 103
     private function initReference()
104 104
     {
105
-        $this->mapper->getSchema()->once(__CLASS__ . '@reference', function (Mapper $mapper) {
105
+        $this->mapper->getSchema()->once(__CLASS__.'@reference', function(Mapper $mapper) {
106 106
             $mapper->getSchema()
107 107
                 ->createSpace('_temporal_reference', [
108 108
                     'idle'       => 'unsigned',
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
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             if (!is_object($migration)) {
34 34
                 $migration = new $migration();
35 35
             }
36
-            $schema->once(get_class($migration), function () use ($migration) {
36
+            $schema->once(get_class($migration), function() use ($migration) {
37 37
                 $migration->migrate($this->mapper);
38 38
             });
39 39
         }
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         foreach ($this->keys as $_) {
89 89
             if ($this->keys[$_] == $key) {
90
-                throw new Exception($this->space->getName() . ' ' . json_encode($key) . ' exists');
90
+                throw new Exception($this->space->getName().' '.json_encode($key).' exists');
91 91
             }
92 92
         }
93 93
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $entity = $this->findOne($params);
152 152
         if (!$entity) {
153
-            throw new Exception("No " . $this->getSpace()->getName() . ' found using ' . json_encode($params));
153
+            throw new Exception("No ".$this->getSpace()->getName().' found using '.json_encode($params));
154 154
         }
155 155
         return $entity;
156 156
     }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $space = $this->space;
199 199
         $index = $space->castIndex($params);
200 200
         if ($index === null) {
201
-            throw new Exception("No index for params " . json_encode($params));
201
+            throw new Exception("No index for params ".json_encode($params));
202 202
         }
203 203
 
204 204
         $criteria = Criteria::index($index)
Please login to merge, or discard this patch.