@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $sign = $this->delta > 0 ? '+' : '-'; |
| 114 | 114 | |
| 115 | 115 | //"field" = "field" + delta |
| 116 | - return new Expression("{$field} {$sign} " . abs($this->delta)); |
|
| 116 | + return new Expression("{$field} {$sign} ".abs($this->delta)); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -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 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $selector = new RecordSelector($this->orm, $this->getClass()); |
| 52 | 52 | |
| 53 | 53 | return $selector->where( |
| 54 | - $selector->primaryAlias() . '.' . $this->definition[RecordEntity::OUTER_KEY], |
|
| 54 | + $selector->primaryAlias().'.'.$this->definition[RecordEntity::OUTER_KEY], |
|
| 55 | 55 | $this->parent->getField($this->definition[RecordEntity::INNER_KEY], false) |
| 56 | 56 | ); |
| 57 | 57 | } |
@@ -94,13 +94,13 @@ |
||
| 94 | 94 | //We are going to clarify selector manually (without loaders), that's easy relation |
| 95 | 95 | if (isset($this->definition[RecordEntity::MORPH_KEY])) { |
| 96 | 96 | $selector->where( |
| 97 | - $selector->primaryAlias() . '.' . $this->definition[RecordEntity::MORPH_KEY], |
|
| 97 | + $selector->primaryAlias().'.'.$this->definition[RecordEntity::MORPH_KEY], |
|
| 98 | 98 | $this->parent->recordRole() |
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $selector->where( |
| 103 | - $selector->primaryAlias() . '.' . $this->definition[RecordEntity::OUTER_KEY], |
|
| 103 | + $selector->primaryAlias().'.'.$this->definition[RecordEntity::OUTER_KEY], |
|
| 104 | 104 | $this->parent->getField($this->definition[RecordEntity::INNER_KEY], false) |
| 105 | 105 | ); |
| 106 | 106 | |
@@ -216,7 +216,7 @@ |
||
| 216 | 216 | //this type of relation |
| 217 | 217 | $loader = new ManyToManyLoader($this->orm, '', $this->definition); |
| 218 | 218 | $selector = $loader->createSelector($this->parentRole())->where( |
| 219 | - $loader->pivotAlias() . '.' . $this->definition[RecordEntity::THOUGHT_INNER_KEY], |
|
| 219 | + $loader->pivotAlias().'.'.$this->definition[RecordEntity::THOUGHT_INNER_KEY], |
|
| 220 | 220 | $this->parentKey() |
| 221 | 221 | ); |
| 222 | 222 | |
@@ -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 | |
@@ -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])) { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function hasTable($database, $table) |
| 124 | 124 | { |
| 125 | - return isset($this->tables[$database . '/' . $table]); |
|
| 125 | + return isset($this->tables[$database.'/'.$table]); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $normalizedDatabase = $this->resolveDatabase($database); |
| 142 | 142 | |
| 143 | - if (isset($this->tables[$normalizedDatabase . '/' . $table])) { |
|
| 144 | - return $this->tables[$normalizedDatabase . '/' . $table]; |
|
| 143 | + if (isset($this->tables[$normalizedDatabase.'/'.$table])) { |
|
| 144 | + return $this->tables[$normalizedDatabase.'/'.$table]; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | $schema = $this->orm->database($normalizedDatabase)->table($table)->schema(); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | 'table' => $table |
| 153 | 153 | ]; |
| 154 | 154 | |
| 155 | - return $this->tables[$normalizedDatabase . '/' . $table] = $schema; |
|
| 155 | + return $this->tables[$normalizedDatabase.'/'.$table] = $schema; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -498,7 +498,7 @@ |
||
| 498 | 498 | foreach ($proposed as $property => $alias) { |
| 499 | 499 | if (isset($this->definition[$property])) { |
| 500 | 500 | //Let's create some default options based on user specified values |
| 501 | - $options['definition:' . $alias] = $this->definition[$property]; |
|
| 501 | + $options['definition:'.$alias] = $this->definition[$property]; |
|
| 502 | 502 | } |
| 503 | 503 | } |
| 504 | 504 | |