@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | public function setFields(array $fields) : void |
| 121 | 121 | { |
| 122 | 122 | if (0 == count($fields)) { |
| 123 | - $msg = 'Fields array must not be empty for '.$this->getClassName(); |
|
| 123 | + $msg = 'Fields array must not be empty for ' . $this->getClassName(); |
|
| 124 | 124 | throw new \Exception($msg); |
| 125 | 125 | } |
| 126 | 126 | $keys = []; |
| 127 | 127 | foreach ($fields as $propName => $field) { |
| 128 | 128 | if (!$field instanceof EntityField) { |
| 129 | - $msg = 'Fields array must only have EntityField objects for '.$this->getClassName(); |
|
| 129 | + $msg = 'Fields array must only have EntityField objects for ' . $this->getClassName(); |
|
| 130 | 130 | throw new \Exception($msg); |
| 131 | 131 | } |
| 132 | 132 | if ($field->getIsKeyField()) { |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | if (0 == count($keys)) { |
| 137 | - $msg = 'No key field supplied in fields array for '.$this->getClassName(); |
|
| 137 | + $msg = 'No key field supplied in fields array for ' . $this->getClassName(); |
|
| 138 | 138 | throw new \Exception($msg); |
| 139 | 139 | } |
| 140 | 140 | $this->fields = $fields; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $fileName = $method->getFileName(); |
| 36 | 36 | |
| 37 | 37 | $file = new SplFileObject($fileName); |
| 38 | - $file->seek($method->getStartLine() - 1); |
|
| 38 | + $file->seek($method->getStartLine()-1); |
|
| 39 | 39 | $code = ''; |
| 40 | 40 | while ($file->key() < $method->getEndLine()) { |
| 41 | 41 | $code .= $file->current(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $code = preg_replace('/\s\s+/', '', $code); |
| 46 | 46 | $begin = strpos($code, 'function('); |
| 47 | - $code = substr($code, (int)$begin, strrpos($code, '}') - $begin + 1); |
|
| 47 | + $code = substr($code, (int) $begin, strrpos($code, '}')-$begin+1); |
|
| 48 | 48 | return $code; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ) { |
| 85 | 85 | continue; |
| 86 | 86 | } |
| 87 | - $relationships[]= $method; |
|
| 87 | + $relationships[] = $method; |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | return $relationships; |