@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * Set table names SELECT query should be performed for. Table names can be provided with |
| 59 | 59 | * specified alias (AS construction). |
| 60 | 60 | * |
| 61 | - * @param array|string|mixed $tables Array of names, comma separated string or set of |
|
| 61 | + * @param string $tables Array of names, comma separated string or set of |
|
| 62 | 62 | * parameters. |
| 63 | 63 | * @return $this |
| 64 | 64 | */ |
@@ -228,7 +228,7 @@ |
||
| 228 | 228 | * Execute statement. |
| 229 | 229 | * |
| 230 | 230 | * @param string $statement |
| 231 | - * @param array $parameters |
|
| 231 | + * @param string[] $parameters |
|
| 232 | 232 | * @return \PDOStatement |
| 233 | 233 | */ |
| 234 | 234 | protected function run($statement, array $parameters = []) |
@@ -161,6 +161,7 @@ discard block |
||
| 161 | 161 | * {@inheritdoc} |
| 162 | 162 | * |
| 163 | 163 | * Automatically forces prefix value. |
| 164 | + * @param string $name |
|
| 164 | 165 | */ |
| 165 | 166 | public function setName($name) |
| 166 | 167 | { |
@@ -280,7 +281,7 @@ discard block |
||
| 280 | 281 | * $table->unique(['key', 'key2']); |
| 281 | 282 | * |
| 282 | 283 | * @param mixed $columns Column name, or array of columns. |
| 283 | - * @return AbstractColumn|null |
|
| 284 | + * @return AbstractIndex |
|
| 284 | 285 | */ |
| 285 | 286 | public function unique($columns) |
| 286 | 287 | { |
@@ -294,7 +295,7 @@ discard block |
||
| 294 | 295 | * name. |
| 295 | 296 | * |
| 296 | 297 | * @param string $column Column name. |
| 297 | - * @return AbstractReference|null |
|
| 298 | + * @return AbstractReference |
|
| 298 | 299 | */ |
| 299 | 300 | public function foreign($column) |
| 300 | 301 | { |
@@ -490,7 +491,7 @@ discard block |
||
| 490 | 491 | } |
| 491 | 492 | |
| 492 | 493 | /** |
| 493 | - * @return AbstractColumn|string |
|
| 494 | + * @return string |
|
| 494 | 495 | */ |
| 495 | 496 | public function __toString() |
| 496 | 497 | { |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | * Method will not affect state of pre-loaded data! Use reset() method to do that. |
| 100 | 100 | * |
| 101 | 101 | * @see sync() |
| 102 | - * @param mixed $outer |
|
| 102 | + * @param \Spiral\ORM\RecordInterface $outer |
|
| 103 | 103 | * @param array $pivotData |
| 104 | 104 | */ |
| 105 | 105 | public function link($outer, array $pivotData = []) |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | /** |
| 99 | 99 | * Related source class. |
| 100 | 100 | * |
| 101 | - * @return string|null |
|
| 101 | + * @return string |
|
| 102 | 102 | */ |
| 103 | 103 | public function getSource() |
| 104 | 104 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * value using class name and Doctrine inflector. |
| 154 | 154 | * |
| 155 | 155 | * @see Record::$table |
| 156 | - * @return mixed |
|
| 156 | + * @return string |
|
| 157 | 157 | */ |
| 158 | 158 | public function getTable() |
| 159 | 159 | { |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * Get database where record data should be stored in. Database alias must be resolved. |
| 173 | 173 | * |
| 174 | 174 | * @see Record::$database |
| 175 | - * @return mixed |
|
| 175 | + * @return string |
|
| 176 | 176 | */ |
| 177 | 177 | public function getDatabase() |
| 178 | 178 | { |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | * @param AbstractColumn $column |
| 488 | 488 | * @param string $definition |
| 489 | 489 | * @param mixed $default Default value declared by record schema. |
| 490 | - * @return mixed |
|
| 490 | + * @return AbstractColumn |
|
| 491 | 491 | * @throws DefinitionException |
| 492 | 492 | * @throws \Spiral\Database\Exceptions\SchemaException |
| 493 | 493 | */ |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | */ |
| 345 | 345 | private function whereWrapper() |
| 346 | 346 | { |
| 347 | - return function ($parameter) { |
|
| 347 | + return function($parameter) { |
|
| 348 | 348 | if ($parameter instanceof FragmentInterface) { |
| 349 | 349 | //We are only not creating bindings for plan fragments |
| 350 | 350 | if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) { |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | //Wrapping all values with ParameterInterface |
| 356 | - $parameter = new Parameter($parameter, Parameter::DETECT_TYPE);; |
|
| 356 | + $parameter = new Parameter($parameter, Parameter::DETECT_TYPE); ; |
|
| 357 | 357 | |
| 358 | 358 | //Let's store to sent to driver when needed |
| 359 | 359 | $this->whereParameters[] = $parameter; |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | */ |
| 319 | 319 | private function onWrapper() |
| 320 | 320 | { |
| 321 | - return function ($parameter) { |
|
| 321 | + return function($parameter) { |
|
| 322 | 322 | if ($parameter instanceof FragmentInterface) { |
| 323 | 323 | return $parameter; |
| 324 | 324 | } |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | private function whereWrapper() |
| 336 | 336 | { |
| 337 | - return function ($parameter) { |
|
| 337 | + return function($parameter) { |
|
| 338 | 338 | if ($parameter instanceof FragmentInterface) { |
| 339 | 339 | //We are only not creating bindings for plan fragments |
| 340 | 340 | if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) { |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | //Wrapping all values with ParameterInterface |
| 346 | - $parameter = new Parameter($parameter, Parameter::DETECT_TYPE);; |
|
| 346 | + $parameter = new Parameter($parameter, Parameter::DETECT_TYPE); ; |
|
| 347 | 347 | |
| 348 | 348 | //Let's store to sent to driver when needed |
| 349 | 349 | $this->onParameters[] = $parameter; |
@@ -399,7 +399,7 @@ |
||
| 399 | 399 | . "WHERE conrelid = ? AND contype = 'c' AND (consrc LIKE ? OR consrc LIKE ?)"; |
| 400 | 400 | |
| 401 | 401 | $constraints = $this->table->driver()->query( |
| 402 | - $query, [$tableOID, '(' . $this->name . '%', '("' . $this->name . '%',] |
|
| 402 | + $query, [$tableOID, '(' . $this->name . '%', '("' . $this->name . '%', ] |
|
| 403 | 403 | ); |
| 404 | 404 | |
| 405 | 405 | foreach ($constraints as $constraint) { |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | protected function expression($identifier) |
| 93 | 93 | { |
| 94 | - return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function ($match) { |
|
| 94 | + return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function($match) { |
|
| 95 | 95 | $identifier = $match[1]; |
| 96 | 96 | |
| 97 | 97 | //Function name |