Completed
Push — master ( fbe2cf...425095 )
by Samuel
11:56
created
src/Exception/RepositoryException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace SimpleMapper\Exception;
5 5
 
Please login to merge, or discard this patch.
src/Behaviour/Behaviour.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace SimpleMapper\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Behaviour/DateBehaviour.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace SimpleMapper\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace SimpleMapper;
6 6
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public static function prefixColumn(string $column): string
74 74
     {
75
-        return static::getTableName() . '.' . $column;
75
+        return static::getTableName().'.'.$column;
76 76
     }
77 77
 
78 78
     /**
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
             $scopeName = lcfirst(substr($name, 5));
100 100
             $scope = $this->structure->getScope(static::$tableName, $scopeName);
101 101
             if (!$scope) {
102
-                throw new RepositoryException('Scope ' . $scopeName . ' is not defined for table ' . static::$tableName);
102
+                throw new RepositoryException('Scope '.$scopeName.' is not defined for table '.static::$tableName);
103 103
             }
104 104
 
105
-            $scopeNameToCall = 'scope' . ucfirst($scope->getName());
105
+            $scopeNameToCall = 'scope'.ucfirst($scope->getName());
106 106
             return call_user_func_array([$this->findAll(), $scopeNameToCall], $arguments);
107 107
         }
108 108
 
109
-        throw new RepositoryException('Call to undefined method ' . get_class($this) . '::' . $name . '()');
109
+        throw new RepositoryException('Call to undefined method '.get_class($this).'::'.$name.'()');
110 110
     }
111 111
 
112 112
     /********************************************************************\
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
      * @return ActiveRow|null
161 161
      * @throws Exception
162 162
      */
163
-    public function insert(array $data): ?ActiveRow
163
+    public function insert(array $data): ? ActiveRow
164 164
     {
165
-        $result = $this->transaction(function () use ($data) {
165
+        $result = $this->transaction(function() use ($data) {
166 166
             foreach ($this->behaviours as $behaviour) {
167 167
                 $data = $behaviour->beforeInsert($data);
168 168
             }
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
      * @param array $data
191 191
      * @return ActiveRow|null
192 192
      */
193
-    public function update(ActiveRow $record, array $data): ?ActiveRow
193
+    public function update(ActiveRow $record, array $data): ? ActiveRow
194 194
     {
195
-        $result = $this->transaction(function () use ($record, $data) {
195
+        $result = $this->transaction(function() use ($record, $data) {
196 196
             $oldRecord = clone $record;
197 197
 
198 198
             foreach ($this->behaviours as $behaviour) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function delete(ActiveRow $record): bool
220 220
     {
221
-        $result = $this->transaction(function () use ($record): bool {
221
+        $result = $this->transaction(function() use ($record): bool {
222 222
             $oldRecord = clone $record;
223 223
 
224 224
             foreach ($this->behaviours as $behaviour) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      * @param string $class
271 271
      * @return Behaviour|null
272 272
      */
273
-    protected function getBehaviour($class): ?Behaviour
273
+    protected function getBehaviour($class): ? Behaviour
274 274
     {
275 275
         return $this->behaviours[$class] ?? null;
276 276
     }
Please login to merge, or discard this patch.
src/Behaviour/Uuid4Behaviour.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace SimpleMapper\Behaviour;
5 5
 
Please login to merge, or discard this patch.
src/ActiveRow.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace SimpleMapper;
6 6
 
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
      * @param string $throughColumn
131 131
      * @return ActiveRow|null
132 132
      */
133
-    public function ref($key, $throughColumn = null): ?ActiveRow
133
+    public function ref($key, $throughColumn = null): ? ActiveRow
134 134
     {
135 135
         $row = $this->record->ref($key, $throughColumn);
136
-        if($row instanceof IRow) {
136
+        if ($row instanceof IRow) {
137 137
             $result = $this->prepareRecord($row);
138 138
             $result->setReferencingRecord($this);
139 139
             return $result;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      * @param string $throughColumn
149 149
      * @return Selection
150 150
      */
151
-    public function related($key, $throughColumn = null): ?Selection
151
+    public function related($key, $throughColumn = null): ? Selection
152 152
     {
153 153
         $selection = $this->record->related($key, $throughColumn);
154 154
         return $selection instanceof NetteDatabaseSelection ? $this->prepareSelection($selection) : null;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     /**
228 228
      * @return null|ActiveRow
229 229
      */
230
-    public function getReferencingRecord(): ?ActiveRow
230
+    public function getReferencingRecord(): ? ActiveRow
231 231
     {
232 232
         return $this->referencingRecord;
233 233
     }
Please login to merge, or discard this patch.