@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $fileName = $method->getFileName(); |
35 | 35 | |
36 | 36 | $file = new SplFileObject($fileName); |
37 | - $file->seek($method->getStartLine() - 1); |
|
37 | + $file->seek($method->getStartLine()-1); |
|
38 | 38 | $code = ''; |
39 | 39 | while ($file->key() < $method->getEndLine()) { |
40 | 40 | $code .= $file->current(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $code = trim(preg_replace('/\s\s+/', '', $code)); |
45 | 45 | $begin = strpos($code, 'function('); |
46 | - $code = substr($code, $begin, strrpos($code, '}') - $begin + 1); |
|
46 | + $code = substr($code, $begin, strrpos($code, '}')-$begin+1); |
|
47 | 47 | return $code; |
48 | 48 | } |
49 | 49 | |
@@ -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; |
@@ -35,6 +35,6 @@ |
||
35 | 35 | public function getRelationships() |
36 | 36 | { |
37 | 37 | return self::$relationNames = self::$relationNames ?? |
38 | - ModelReflectionHelper::getRelationshipsFromMethods(/** @scrutinizer ignore-type */$this); |
|
38 | + ModelReflectionHelper::getRelationshipsFromMethods(/** @scrutinizer ignore-type */$this); |
|
39 | 39 | } |
40 | 40 | } |
@@ -261,10 +261,10 @@ |
||
261 | 261 | |
262 | 262 | private static $fieldOrderCache = [ |
263 | 263 | 'BelongsTo' => ['foreignKey', 'ownerKey'], |
264 | - 'BelongsToMany' => ['parentKey','foreignPivotKey','relatedPivotKey','relatedKey'], |
|
265 | - 'HasOneOrMany' => ['localKey', 'foreignKey' ], |
|
264 | + 'BelongsToMany' => ['parentKey', 'foreignPivotKey', 'relatedPivotKey', 'relatedKey'], |
|
265 | + 'HasOneOrMany' => ['localKey', 'foreignKey'], |
|
266 | 266 | 'HasManyThrough' => ['localKey', 'firstKey', 'secondLocalKey', 'secondKey'], |
267 | - 'MorphToMany' => ['parentKey','foreignPivotKey','morphType', 'relatedPivotKey','relatedKey'], |
|
267 | + 'MorphToMany' => ['parentKey', 'foreignPivotKey', 'morphType', 'relatedPivotKey', 'relatedKey'], |
|
268 | 268 | 'MorphTo' => ['foreignKey', 'morphType', 'ownerKey'], |
269 | 269 | 'MorphOneOrMany' => ['foreignKey', 'morphType', 'localKey'], |
270 | 270 | 'inverse' => ['inverse'], // TODO: currently used to get inverse, should be removed when morphtomany is fixed |
@@ -369,7 +369,7 @@ |
||
369 | 369 | $builder = $connect->getSchemaBuilder(); |
370 | 370 | $columns = $builder->getColumnListing($table); |
371 | 371 | |
372 | - self::$tableColumns = (array)$columns; |
|
372 | + self::$tableColumns = (array) $columns; |
|
373 | 373 | } |
374 | 374 | return self::$tableColumns; |
375 | 375 | } |