@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | //Pre-packing collections |
| 177 | 177 | foreach ($this->getCollections() as $collection) { |
| 178 | - $name = $collection->getDatabase() . '/' . $collection->getName(); |
|
| 178 | + $name = $collection->getDatabase().'/'.$collection->getName(); |
|
| 179 | 179 | $result[$name] = $collection->getParent()->getName(); |
| 180 | 180 | } |
| 181 | 181 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | //Getting fully specified collection name (with specified db) |
| 294 | - $collection = $document->getDatabase() . '/' . $document->getCollection(); |
|
| 294 | + $collection = $document->getDatabase().'/'.$document->getCollection(); |
|
| 295 | 295 | if (isset($this->collections[$collection])) { |
| 296 | 296 | //Already described by parent |
| 297 | 297 | continue; |
@@ -348,7 +348,7 @@ |
||
| 348 | 348 | |
| 349 | 349 | $atomics = array_merge( |
| 350 | 350 | $atomics, |
| 351 | - $document->buildAtomics(($container ? $container . '.' : '') . $offset) |
|
| 351 | + $document->buildAtomics(($container ? $container.'.' : '').$offset) |
|
| 352 | 352 | ); |
| 353 | 353 | } |
| 354 | 354 | } |
@@ -374,7 +374,7 @@ |
||
| 374 | 374 | return $this; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | - $this->data = array_filter($this->data, function ($item) use ($value) { |
|
| 377 | + $this->data = array_filter($this->data, function($item) use ($value) { |
|
| 378 | 378 | return $item != $value; |
| 379 | 379 | }); |
| 380 | 380 | |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | * |
| 145 | 145 | * @see Record::$indexes |
| 146 | 146 | */ |
| 147 | - const INDEX = 1000; //Default index type |
|
| 148 | - const UNIQUE = 2000; //Unique index definition |
|
| 147 | + const INDEX = 1000; //Default index type |
|
| 148 | + const UNIQUE = 2000; //Unique index definition |
|
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | 151 | * Indicates that record data were loaded from database (not recently created). |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | public function setField($name, $value, $filter = true) |
| 351 | 351 | { |
| 352 | 352 | if (!$this->hasField($name)) { |
| 353 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'"); |
|
| 353 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'"); |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | //Original field value |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | public function getField($name, $default = null, $filter = true) |
| 379 | 379 | { |
| 380 | 380 | if (!$this->hasField($name)) { |
| 381 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'"); |
|
| 381 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'"); |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | $value = parent::getField($name, $default, false); |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | public function __debugInfo() |
| 584 | 584 | { |
| 585 | 585 | $info = [ |
| 586 | - 'table' => $this->ormSchema[ORMInterface::M_DB] . '/' . $this->ormSchema[ORMInterface::M_TABLE], |
|
| 586 | + 'table' => $this->ormSchema[ORMInterface::M_DB].'/'.$this->ormSchema[ORMInterface::M_TABLE], |
|
| 587 | 587 | 'fields' => $this->getFields(), |
| 588 | 588 | 'errors' => $this->getErrors(), |
| 589 | 589 | ]; |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | { |
| 728 | 728 | if (!isset($this->ormSchema[ORMInterface::M_RELATIONS][$name])) { |
| 729 | 729 | throw new RecordException( |
| 730 | - "Undefined relation {$name} in record " . static::class . '.' |
|
| 730 | + "Undefined relation {$name} in record ".static::class.'.' |
|
| 731 | 731 | ); |
| 732 | 732 | } |
| 733 | 733 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | //New alias is pretty simple and short |
| 283 | - return $this->alias = 'd' . decoct(++self::$counter); |
|
| 283 | + return $this->alias = 'd'.decoct(++self::$counter); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | if (empty($this->parent)) { |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | $alias = $this->container; |
| 291 | 291 | } else { |
| 292 | 292 | //Let's use parent alias to continue chain |
| 293 | - $alias = $this->parent->getAlias() . '_' . $this->container; |
|
| 293 | + $alias = $this->parent->getAlias().'_'.$this->container; |
|
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | return $alias; |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | return null; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - return $this->getAlias() . '.' . $this->schema[ORM::M_PRIMARY_KEY]; |
|
| 331 | + return $this->getAlias().'.'.$this->schema[ORM::M_PRIMARY_KEY]; |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | /** |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | return null; |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | - return $this->getAlias() . '.' . $this->definition[$key]; |
|
| 855 | + return $this->getAlias().'.'.$this->definition[$key]; |
|
| 856 | 856 | } |
| 857 | 857 | |
| 858 | 858 | /** |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | throw new LoaderException("Unable to get parent key, no parent loader provided."); |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | - return $this->parent->getAlias() . '.' . $this->definition[RecordEntity::INNER_KEY]; |
|
| 870 | + return $this->parent->getAlias().'.'.$this->definition[RecordEntity::INNER_KEY]; |
|
| 871 | 871 | } |
| 872 | 872 | |
| 873 | 873 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $arguments[0] = $this->prepare($arguments[0]); |
| 130 | 130 | |
| 131 | 131 | //Routing where |
| 132 | - call_user_func_array([$this->query, 'and' . ucfirst($this->target)], $arguments); |
|
| 132 | + call_user_func_array([$this->query, 'and'.ucfirst($this->target)], $arguments); |
|
| 133 | 133 | |
| 134 | 134 | return $this; |
| 135 | 135 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $arguments[0] = $this->prepare($arguments[0]); |
| 160 | 160 | |
| 161 | 161 | //Routing where |
| 162 | - call_user_func_array([$this->query, 'or' . ucfirst($this->target)], $arguments); |
|
| 162 | + call_user_func_array([$this->query, 'or'.ucfirst($this->target)], $arguments); |
|
| 163 | 163 | |
| 164 | 164 | return $this; |
| 165 | 165 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | throw new CacheException('Entity cache size exceeded'); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - return $this->data[get_class($entity) . '.' . $entity->primaryKey()] = $entity; |
|
| 90 | + return $this->data[get_class($entity).'.'.$entity->primaryKey()] = $entity; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - unset($this->data[get_class($entity) . '.' . $entity->primaryKey()]); |
|
| 104 | + unset($this->data[get_class($entity).'.'.$entity->primaryKey()]); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function has($class, $primaryKey) |
| 116 | 116 | { |
| 117 | - return isset($this->data[$class . '.' . $primaryKey]); |
|
| 117 | + return isset($this->data[$class.'.'.$primaryKey]); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function get($class, $primaryKey) |
| 129 | 129 | { |
| 130 | - if (empty($this->data[$class . '.' . $primaryKey])) { |
|
| 130 | + if (empty($this->data[$class.'.'.$primaryKey])) { |
|
| 131 | 131 | return null; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - return $this->data[$class . '.' . $primaryKey]; |
|
| 134 | + return $this->data[$class.'.'.$primaryKey]; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | return $this->options['pivotAlias']; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - return $this->getAlias() . '_pivot'; |
|
| 100 | + return $this->getAlias().'_pivot'; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | //Pivot table joining (INNER in post selection) |
| 116 | 116 | $pivotOuterKey = $this->getPivotKey(RecordEntity::THOUGHT_OUTER_KEY); |
| 117 | - $selector->innerJoin($this->pivotTable() . ' AS ' . $this->pivotAlias(), [ |
|
| 117 | + $selector->innerJoin($this->pivotTable().' AS '.$this->pivotAlias(), [ |
|
| 118 | 118 | $pivotOuterKey => $this->getKey(RecordEntity::OUTER_KEY) |
| 119 | 119 | ]); |
| 120 | 120 | |
@@ -156,14 +156,14 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | $selector->join( |
| 158 | 158 | $this->joinType(), |
| 159 | - $this->pivotTable() . ' AS ' . $this->pivotAlias(), |
|
| 159 | + $this->pivotTable().' AS '.$this->pivotAlias(), |
|
| 160 | 160 | [$this->getPivotKey(RecordEntity::THOUGHT_INNER_KEY) => $this->getParentKey()] |
| 161 | 161 | ); |
| 162 | 162 | |
| 163 | 163 | $this->pivotConditions($selector); |
| 164 | 164 | |
| 165 | 165 | $pivotOuterKey = $this->getPivotKey(RecordEntity::THOUGHT_OUTER_KEY); |
| 166 | - $selector->join($this->joinType(), $this->getTable() . ' AS ' . $this->getAlias(), [ |
|
| 166 | + $selector->join($this->joinType(), $this->getTable().' AS '.$this->getAlias(), [ |
|
| 167 | 167 | $pivotOuterKey => $this->getKey(RecordEntity::OUTER_KEY) |
| 168 | 168 | ]); |
| 169 | 169 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | return null; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - return $this->pivotAlias() . '.' . $this->definition[$key]; |
|
| 208 | + return $this->pivotAlias().'.'.$this->definition[$key]; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -301,10 +301,10 @@ discard block |
||
| 301 | 301 | protected function deduplicate(array &$data) |
| 302 | 302 | { |
| 303 | 303 | $criteria = $data[ORM::PIVOT_DATA][$this->definition[RecordEntity::THOUGHT_INNER_KEY]] |
| 304 | - . '.' . $data[ORM::PIVOT_DATA][$this->definition[RecordEntity::THOUGHT_OUTER_KEY]]; |
|
| 304 | + . '.'.$data[ORM::PIVOT_DATA][$this->definition[RecordEntity::THOUGHT_OUTER_KEY]]; |
|
| 305 | 305 | |
| 306 | 306 | if (!empty($this->definition[RecordEntity::MORPH_KEY])) { |
| 307 | - $criteria .= ':' . $data[ORM::PIVOT_DATA][$this->definition[RecordEntity::MORPH_KEY]]; |
|
| 307 | + $criteria .= ':'.$data[ORM::PIVOT_DATA][$this->definition[RecordEntity::MORPH_KEY]]; |
|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | if (isset($this->duplicates[$criteria])) { |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | protected function clarifySelector(RecordSelector $selector) |
| 76 | 76 | { |
| 77 | - $selector->join($this->joinType(), $this->getTable() . ' AS ' . $this->getAlias(), [ |
|
| 77 | + $selector->join($this->joinType(), $this->getTable().' AS '.$this->getAlias(), [ |
|
| 78 | 78 | $this->getKey(RecordEntity::OUTER_KEY) => $this->getParentKey() |
| 79 | 79 | ]); |
| 80 | 80 | |