@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | /** |
668 | 668 | * Gets the ReflectionProperties of the mapped class. |
669 | 669 | * |
670 | - * @return array An array of ReflectionProperty instances. |
|
670 | + * @return \ReflectionProperty[] An array of ReflectionProperty instances. |
|
671 | 671 | */ |
672 | 672 | public function getReflectionProperties() |
673 | 673 | { |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | * - reflClass (ReflectionClass) |
806 | 806 | * - reflFields (ReflectionProperty array) |
807 | 807 | * |
808 | - * @return array The names of all the fields that should be serialized. |
|
808 | + * @return string[] The names of all the fields that should be serialized. |
|
809 | 809 | */ |
810 | 810 | public function __sleep() |
811 | 811 | { |
@@ -1825,7 +1825,7 @@ discard block |
||
1825 | 1825 | * Sets the mapped identifier/primary key fields of this class. |
1826 | 1826 | * Mainly used by the ClassMetadataFactory to assign inherited identifiers. |
1827 | 1827 | * |
1828 | - * @param array $identifier |
|
1828 | + * @param string[] $identifier |
|
1829 | 1829 | * |
1830 | 1830 | * @return void |
1831 | 1831 | */ |
@@ -1854,7 +1854,7 @@ discard block |
||
1854 | 1854 | /** |
1855 | 1855 | * Gets an array containing all the column names. |
1856 | 1856 | * |
1857 | - * @param array|null $fieldNames |
|
1857 | + * @param string[] $fieldNames |
|
1858 | 1858 | * |
1859 | 1859 | * @return array |
1860 | 1860 | */ |
@@ -2012,7 +2012,7 @@ discard block |
||
2012 | 2012 | * |
2013 | 2013 | * @param string $fieldName |
2014 | 2014 | * |
2015 | - * @return \Doctrine\DBAL\Types\Type|string|null |
|
2015 | + * @return string |
|
2016 | 2016 | * |
2017 | 2017 | * @todo 3.0 Remove this. PersisterHelper should fix it somehow |
2018 | 2018 | */ |
@@ -2072,7 +2072,7 @@ discard block |
||
2072 | 2072 | /** |
2073 | 2073 | * Sets the mapped subclasses of this class. |
2074 | 2074 | * |
2075 | - * @param array $subclasses The names of all mapped subclasses. |
|
2075 | + * @param string[] $subclasses The names of all mapped subclasses. |
|
2076 | 2076 | * |
2077 | 2077 | * @return void |
2078 | 2078 | */ |
@@ -2088,7 +2088,7 @@ discard block |
||
2088 | 2088 | * Assumes that the class names in the passed array are in the order: |
2089 | 2089 | * directParent -> directParentParent -> directParentParentParent ... -> root. |
2090 | 2090 | * |
2091 | - * @param array $classNames |
|
2091 | + * @param string[] $classNames |
|
2092 | 2092 | * |
2093 | 2093 | * @return void |
2094 | 2094 | */ |
@@ -2625,7 +2625,7 @@ discard block |
||
2625 | 2625 | * @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker |
2626 | 2626 | * |
2627 | 2627 | * @param string $lifecycleEvent The lifecycle event. |
2628 | - * @param object $entity The Entity on which the event occurred. |
|
2628 | + * @param \Doctrine\Tests\ORM\Functional\Ticket\DDC1707Child $entity The Entity on which the event occurred. |
|
2629 | 2629 | * |
2630 | 2630 | * @return void |
2631 | 2631 | */ |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | public function getSingleIdReflectionProperty() |
697 | 697 | { |
698 | 698 | if ($this->isIdentifierComposite) { |
699 | - throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); |
|
699 | + throw new BadMethodCallException("Class ".$this->name." has a composite identifier."); |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | return $this->reflFields[$this->identifier[0]]; |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | */ |
792 | 792 | public function __toString() |
793 | 793 | { |
794 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
794 | + return __CLASS__.'@'.spl_object_hash($this); |
|
795 | 795 | } |
796 | 796 | |
797 | 797 | /** |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | public function validateAssociations() |
1026 | 1026 | { |
1027 | 1027 | foreach ($this->associationMappings as $mapping) { |
1028 | - if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { |
|
1028 | + if ( ! ClassLoader::classExists($mapping['targetEntity'])) { |
|
1029 | 1029 | throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); |
1030 | 1030 | } |
1031 | 1031 | } |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | } |
1104 | 1104 | |
1105 | 1105 | if ( ! isset($cache['region'])) { |
1106 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1106 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1107 | 1107 | } |
1108 | 1108 | |
1109 | 1109 | return $cache; |
@@ -1383,7 +1383,7 @@ discard block |
||
1383 | 1383 | protected function _validateAndCompleteFieldMapping(array &$mapping) |
1384 | 1384 | { |
1385 | 1385 | // Check mandatory fields |
1386 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1386 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1387 | 1387 | throw MappingException::missingFieldName($this->name); |
1388 | 1388 | } |
1389 | 1389 | |
@@ -1496,14 +1496,14 @@ discard block |
||
1496 | 1496 | $this->isIdentifierComposite = true; |
1497 | 1497 | } |
1498 | 1498 | |
1499 | - if ($this->cache && !isset($mapping['cache'])) { |
|
1499 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
1500 | 1500 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
1501 | 1501 | } |
1502 | 1502 | } |
1503 | 1503 | |
1504 | 1504 | // Mandatory attributes for both sides |
1505 | 1505 | // Mandatory: fieldName, targetEntity |
1506 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1506 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1507 | 1507 | throw MappingException::missingFieldName($this->name); |
1508 | 1508 | } |
1509 | 1509 | |
@@ -1627,7 +1627,7 @@ discard block |
||
1627 | 1627 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
1628 | 1628 | } |
1629 | 1629 | |
1630 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = [ |
|
1630 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = [ |
|
1631 | 1631 | 'columns' => $uniqueConstraintColumns |
1632 | 1632 | ]; |
1633 | 1633 | } |
@@ -1642,7 +1642,7 @@ discard block |
||
1642 | 1642 | unset($mapping['unique']); |
1643 | 1643 | } |
1644 | 1644 | |
1645 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1645 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1646 | 1646 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1647 | 1647 | } |
1648 | 1648 | |
@@ -1696,7 +1696,7 @@ discard block |
||
1696 | 1696 | } |
1697 | 1697 | |
1698 | 1698 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1699 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1699 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1700 | 1700 | |
1701 | 1701 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1702 | 1702 | $mapping['joinTable']['joinColumns'] = [ |
@@ -1885,7 +1885,7 @@ discard block |
||
1885 | 1885 | |
1886 | 1886 | // Association defined as Id field |
1887 | 1887 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1888 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1888 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1889 | 1889 | |
1890 | 1890 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1891 | 1891 | } |
@@ -2066,7 +2066,7 @@ discard block |
||
2066 | 2066 | public function getTemporaryIdTableName() |
2067 | 2067 | { |
2068 | 2068 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2069 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2069 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2070 | 2070 | } |
2071 | 2071 | |
2072 | 2072 | /** |
@@ -2395,7 +2395,7 @@ discard block |
||
2395 | 2395 | */ |
2396 | 2396 | public function addNamedQuery(array $queryMapping) |
2397 | 2397 | { |
2398 | - if (!isset($queryMapping['name'])) { |
|
2398 | + if ( ! isset($queryMapping['name'])) { |
|
2399 | 2399 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2400 | 2400 | } |
2401 | 2401 | |
@@ -2403,7 +2403,7 @@ discard block |
||
2403 | 2403 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2404 | 2404 | } |
2405 | 2405 | |
2406 | - if (!isset($queryMapping['query'])) { |
|
2406 | + if ( ! isset($queryMapping['query'])) { |
|
2407 | 2407 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2408 | 2408 | } |
2409 | 2409 | |
@@ -2430,7 +2430,7 @@ discard block |
||
2430 | 2430 | */ |
2431 | 2431 | public function addNamedNativeQuery(array $queryMapping) |
2432 | 2432 | { |
2433 | - if (!isset($queryMapping['name'])) { |
|
2433 | + if ( ! isset($queryMapping['name'])) { |
|
2434 | 2434 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2435 | 2435 | } |
2436 | 2436 | |
@@ -2438,11 +2438,11 @@ discard block |
||
2438 | 2438 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2439 | 2439 | } |
2440 | 2440 | |
2441 | - if (!isset($queryMapping['query'])) { |
|
2441 | + if ( ! isset($queryMapping['query'])) { |
|
2442 | 2442 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2443 | 2443 | } |
2444 | 2444 | |
2445 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
2445 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
2446 | 2446 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
2447 | 2447 | } |
2448 | 2448 | |
@@ -2474,7 +2474,7 @@ discard block |
||
2474 | 2474 | */ |
2475 | 2475 | public function addSqlResultSetMapping(array $resultMapping) |
2476 | 2476 | { |
2477 | - if (!isset($resultMapping['name'])) { |
|
2477 | + if ( ! isset($resultMapping['name'])) { |
|
2478 | 2478 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
2479 | 2479 | } |
2480 | 2480 | |
@@ -2484,7 +2484,7 @@ discard block |
||
2484 | 2484 | |
2485 | 2485 | if (isset($resultMapping['entities'])) { |
2486 | 2486 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
2487 | - if (!isset($entityResult['entityClass'])) { |
|
2487 | + if ( ! isset($entityResult['entityClass'])) { |
|
2488 | 2488 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
2489 | 2489 | } |
2490 | 2490 | |
@@ -2503,11 +2503,11 @@ discard block |
||
2503 | 2503 | |
2504 | 2504 | if (isset($entityResult['fields'])) { |
2505 | 2505 | foreach ($entityResult['fields'] as $k => $field) { |
2506 | - if (!isset($field['name'])) { |
|
2506 | + if ( ! isset($field['name'])) { |
|
2507 | 2507 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
2508 | 2508 | } |
2509 | 2509 | |
2510 | - if (!isset($field['column'])) { |
|
2510 | + if ( ! isset($field['column'])) { |
|
2511 | 2511 | $fieldName = $field['name']; |
2512 | 2512 | if (strpos($fieldName, '.')) { |
2513 | 2513 | list(, $fieldName) = explode('.', $fieldName); |
@@ -2998,7 +2998,7 @@ discard block |
||
2998 | 2998 | } |
2999 | 2999 | |
3000 | 3000 | if ($definition['sequenceName'][0] == '`') { |
3001 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3001 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3002 | 3002 | $definition['quoted'] = true; |
3003 | 3003 | } |
3004 | 3004 | |
@@ -3090,7 +3090,7 @@ discard block |
||
3090 | 3090 | public function getAssociationTargetClass($assocName) |
3091 | 3091 | { |
3092 | 3092 | if ( ! isset($this->associationMappings[$assocName])) { |
3093 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3093 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3094 | 3094 | } |
3095 | 3095 | |
3096 | 3096 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3129,7 +3129,7 @@ discard block |
||
3129 | 3129 | // Association defined as Id field |
3130 | 3130 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3131 | 3131 | $assocQuotedColumnNames = array_map( |
3132 | - function ($joinColumn) use ($platform) { |
|
3132 | + function($joinColumn) use ($platform) { |
|
3133 | 3133 | return isset($joinColumn['quoted']) |
3134 | 3134 | ? $platform->quoteIdentifier($joinColumn['name']) |
3135 | 3135 | : $joinColumn['name']; |
@@ -3240,7 +3240,7 @@ discard block |
||
3240 | 3240 | } |
3241 | 3241 | |
3242 | 3242 | if ($className !== null && strpos($className, '\\') === false && $this->namespace) { |
3243 | - return $this->namespace . '\\' . $className; |
|
3243 | + return $this->namespace.'\\'.$className; |
|
3244 | 3244 | } |
3245 | 3245 | |
3246 | 3246 | return $className; |
@@ -3294,15 +3294,15 @@ discard block |
||
3294 | 3294 | ? $fieldMapping['originalClass'] |
3295 | 3295 | : $embeddable->name; |
3296 | 3296 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3297 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3297 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3298 | 3298 | : $property; |
3299 | 3299 | $fieldMapping['originalField'] = isset($fieldMapping['originalField']) |
3300 | 3300 | ? $fieldMapping['originalField'] |
3301 | 3301 | : $fieldMapping['fieldName']; |
3302 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
3302 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
3303 | 3303 | |
3304 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3305 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
3304 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3305 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
3306 | 3306 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
3307 | 3307 | $fieldMapping['columnName'] = $this->namingStrategy |
3308 | 3308 | ->embeddedFieldToColumnName( |
@@ -3343,7 +3343,7 @@ discard block |
||
3343 | 3343 | { |
3344 | 3344 | $sequencePrefix = $this->getSequencePrefix($platform); |
3345 | 3345 | $columnName = $this->getSingleIdentifierColumnName(); |
3346 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
3346 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
3347 | 3347 | |
3348 | 3348 | return $sequenceName; |
3349 | 3349 | } |
@@ -3363,10 +3363,10 @@ discard block |
||
3363 | 3363 | |
3364 | 3364 | // Prepend the schema name to the table name if there is one |
3365 | 3365 | if ($schemaName = $this->getSchemaName()) { |
3366 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
3366 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
3367 | 3367 | |
3368 | 3368 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
3369 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
3369 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
3370 | 3370 | } |
3371 | 3371 | } |
3372 | 3372 | |
@@ -3378,8 +3378,8 @@ discard block |
||
3378 | 3378 | */ |
3379 | 3379 | private function assertMappingOrderBy(array $mapping) |
3380 | 3380 | { |
3381 | - if (isset($mapping['orderBy']) && !is_array($mapping['orderBy'])) { |
|
3382 | - throw new InvalidArgumentException("'orderBy' is expected to be an array, not " . gettype($mapping['orderBy'])); |
|
3381 | + if (isset($mapping['orderBy']) && ! is_array($mapping['orderBy'])) { |
|
3382 | + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); |
|
3383 | 3383 | } |
3384 | 3384 | } |
3385 | 3385 | } |
@@ -1428,7 +1428,7 @@ |
||
1428 | 1428 | |
1429 | 1429 | if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { |
1430 | 1430 | if (isset($mapping['id']) && true === $mapping['id']) { |
1431 | - throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1431 | + throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1432 | 1432 | } |
1433 | 1433 | |
1434 | 1434 | $mapping['requireSQLConversion'] = true; |
@@ -148,6 +148,9 @@ discard block |
||
148 | 148 | ); |
149 | 149 | } |
150 | 150 | |
151 | + /** |
|
152 | + * @param string $dql |
|
153 | + */ |
|
151 | 154 | protected function asyncDqlWithLock($dql, $params, $lockMode) |
152 | 155 | { |
153 | 156 | $this->startJob('dqlWithLock', [ |
@@ -168,6 +171,9 @@ discard block |
||
168 | 171 | ); |
169 | 172 | } |
170 | 173 | |
174 | + /** |
|
175 | + * @param string $fn |
|
176 | + */ |
|
171 | 177 | protected function startJob($fn, $fixture) |
172 | 178 | { |
173 | 179 | $this->gearman->addTask($fn, serialize( |
@@ -176,6 +176,9 @@ discard block |
||
176 | 176 | $this->assertFalse($em->getFilters()->isEnabled("foo_filter")); |
177 | 177 | } |
178 | 178 | |
179 | + /** |
|
180 | + * @param EntityManager $em |
|
181 | + */ |
|
179 | 182 | protected function configureFilters($em) |
180 | 183 | { |
181 | 184 | // Add filters to the configuration of the EM |
@@ -889,6 +892,9 @@ discard block |
||
889 | 892 | $this->assertEquals(2, count($manager->managedContracts->slice(0, 10))); |
890 | 893 | } |
891 | 894 | |
895 | + /** |
|
896 | + * @param string $name |
|
897 | + */ |
|
892 | 898 | private function usePersonNameFilter($name) |
893 | 899 | { |
894 | 900 | // Enable the filter |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | 5 | use Doctrine\DBAL\Types\Type as DBALType; |
6 | -use Doctrine\ORM\Mapping\AssociationMapping; |
|
7 | 6 | use Doctrine\Tests\Models\Generic\BooleanModel; |
8 | 7 | use Doctrine\Tests\Models\Generic\DateTimeModel; |
9 | 8 | use Doctrine\Tests\Models\Generic\DecimalModel; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | |
6 | 6 | // Path to composer autoloader. You can use different provided by your favorite framework, |
7 | 7 | // if you want to. |
8 | -$loaderPath = __DIR__ . '/../../vendor/autoload.php'; |
|
9 | -if(!is_readable($loaderPath)){ |
|
8 | +$loaderPath = __DIR__.'/../../vendor/autoload.php'; |
|
9 | +if ( ! is_readable($loaderPath)) { |
|
10 | 10 | throw new LogicException('Run php composer.phar install at first'); |
11 | 11 | } |
12 | 12 | $loader = require $loaderPath; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $config = new \Doctrine\ORM\Configuration(); |
20 | 20 | |
21 | 21 | // Set up Metadata Drivers |
22 | -$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . "/Entities"]); |
|
22 | +$driverImpl = $config->newDefaultAnnotationDriver([__DIR__."/Entities"]); |
|
23 | 23 | $config->setMetadataDriverImpl($driverImpl); |
24 | 24 | |
25 | 25 | // Set up caches, depending on $debug variable. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $config->setQueryCacheImpl($cache); |
30 | 30 | |
31 | 31 | // Proxy configuration |
32 | -$config->setProxyDir(__DIR__ . '/Proxies'); |
|
32 | +$config->setProxyDir(__DIR__.'/Proxies'); |
|
33 | 33 | $config->setProxyNamespace('Proxies'); |
34 | 34 | |
35 | 35 | // Database connection information |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $args[] = $sqlWalker->walkStringPrimary($expression); |
54 | 54 | } |
55 | 55 | |
56 | - return call_user_func_array([$platform,'getConcatExpression'], $args); |
|
56 | + return call_user_func_array([$platform, 'getConcatExpression'], $args); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | $tokenStr = substr($dql, $token['position'], $length); |
493 | 493 | |
494 | 494 | // Building informative message |
495 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
495 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
496 | 496 | |
497 | 497 | throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL())); |
498 | 498 | } |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | // If the namespace is not given then assumes the first FROM entity namespace |
640 | 640 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
641 | 641 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
642 | - $fqcn = $namespace . '\\' . $className; |
|
642 | + $fqcn = $namespace.'\\'.$className; |
|
643 | 643 | |
644 | 644 | if (class_exists($fqcn)) { |
645 | 645 | $expression->className = $fqcn; |
@@ -691,13 +691,13 @@ discard block |
||
691 | 691 | } |
692 | 692 | |
693 | 693 | $this->semanticalError( |
694 | - "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token'] |
|
694 | + "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token'] |
|
695 | 695 | ); |
696 | 696 | } |
697 | 697 | |
698 | 698 | if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { |
699 | 699 | $this->semanticalError( |
700 | - "The partial field selection of class " . $class->name . " must contain the identifier.", |
|
700 | + "The partial field selection of class ".$class->name." must contain the identifier.", |
|
701 | 701 | $deferredItem['token'] |
702 | 702 | ); |
703 | 703 | } |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | // Check if field or association exists |
769 | 769 | if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) { |
770 | 770 | $this->semanticalError( |
771 | - 'Class ' . $class->name . ' has no field or association named ' . $field, |
|
771 | + 'Class '.$class->name.' has no field or association named '.$field, |
|
772 | 772 | $deferredItem['token'] |
773 | 773 | ); |
774 | 774 | } |
@@ -808,8 +808,8 @@ discard block |
||
808 | 808 | // Build the error message |
809 | 809 | $semanticalError = 'Invalid PathExpression. '; |
810 | 810 | $semanticalError .= (count($expectedStringTypes) == 1) |
811 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
812 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
811 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
812 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
813 | 813 | |
814 | 814 | $this->semanticalError($semanticalError, $deferredItem['token']); |
815 | 815 | } |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | |
979 | 979 | list($namespaceAlias, $simpleClassName) = explode(':', $this->lexer->token['value']); |
980 | 980 | |
981 | - $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
981 | + $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | return $schemaName; |
@@ -993,7 +993,7 @@ discard block |
||
993 | 993 | */ |
994 | 994 | private function validateAbstractSchemaName($schemaName) |
995 | 995 | { |
996 | - if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
996 | + if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
997 | 997 | $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token); |
998 | 998 | } |
999 | 999 | } |
@@ -1049,7 +1049,7 @@ discard block |
||
1049 | 1049 | |
1050 | 1050 | if ( ! isset($this->queryComponents[$identVariable])) { |
1051 | 1051 | $this->semanticalError( |
1052 | - 'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.' |
|
1052 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1053 | 1053 | ); |
1054 | 1054 | } |
1055 | 1055 | |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | $class = $qComp['metadata']; |
1064 | 1064 | |
1065 | 1065 | if ( ! $class->hasAssociation($field)) { |
1066 | - $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field); |
|
1066 | + $this->semanticalError('Class '.$class->name.' has no association named '.$field); |
|
1067 | 1067 | } |
1068 | 1068 | |
1069 | 1069 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -2485,7 +2485,7 @@ discard block |
||
2485 | 2485 | // Peek beyond the matching closing parenthesis ')' |
2486 | 2486 | $peek = $this->peekBeyondClosingParenthesis(); |
2487 | 2487 | |
2488 | - if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
2488 | + if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
2489 | 2489 | in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) || |
2490 | 2490 | $this->isMathOperator($peek)) { |
2491 | 2491 | $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); |
@@ -2590,7 +2590,7 @@ discard block |
||
2590 | 2590 | return $this->NullComparisonExpression(); |
2591 | 2591 | } |
2592 | 2592 | |
2593 | - if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2593 | + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2594 | 2594 | return $this->EmptyCollectionComparisonExpression(); |
2595 | 2595 | } |
2596 | 2596 |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | * declarations (from ... x join ... y join ... z ...) appear in the query |
414 | 414 | * as the hydration process relies on that order for proper operation. |
415 | 415 | * |
416 | - * @param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST |
|
416 | + * @param AST\SelectStatement $AST |
|
417 | 417 | * |
418 | 418 | * @return void |
419 | 419 | */ |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField |
750 | 750 | * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField |
751 | 751 | * |
752 | - * @param mixed $AST |
|
752 | + * @param AST\SelectStatement $AST |
|
753 | 753 | * |
754 | 754 | * @return void |
755 | 755 | */ |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | * accessible is "FROM", prohibiting an easy implementation without larger |
1620 | 1620 | * changes.} |
1621 | 1621 | * |
1622 | - * @return \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration | |
|
1622 | + * @return AST\IdentificationVariableDeclaration | |
|
1623 | 1623 | * \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration |
1624 | 1624 | */ |
1625 | 1625 | public function SubselectIdentificationVariableDeclaration() |
@@ -1757,7 +1757,7 @@ discard block |
||
1757 | 1757 | /** |
1758 | 1758 | * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [IndexBy] |
1759 | 1759 | * |
1760 | - * @return \Doctrine\ORM\Query\AST\JoinAssociationPathExpression |
|
1760 | + * @return AST\JoinAssociationDeclaration |
|
1761 | 1761 | */ |
1762 | 1762 | public function JoinAssociationDeclaration() |
1763 | 1763 | { |
@@ -1795,7 +1795,7 @@ discard block |
||
1795 | 1795 | * PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet |
1796 | 1796 | * PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}" |
1797 | 1797 | * |
1798 | - * @return array |
|
1798 | + * @return AST\PartialObjectExpression |
|
1799 | 1799 | */ |
1800 | 1800 | public function PartialObjectExpression() |
1801 | 1801 | { |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $this->_tableName, $this->_sequenceName, $this->_allocationSize |
93 | 93 | ); |
94 | 94 | |
95 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
95 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
96 | 96 | // no affected rows, concurrency issue, throw exception |
97 | 97 | } |
98 | 98 | } else { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * @var array |
41 | 41 | */ |
42 | - private $types = []; |
|
42 | + private $types = []; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Converts a comparison expression into the target query language output. |