@@ -155,9 +155,9 @@ |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($property->isProtected()) { |
158 | - return "\0*\0" . $propertyName; |
|
158 | + return "\0*\0".$propertyName; |
|
159 | 159 | } |
160 | 160 | |
161 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
161 | + return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
162 | 162 | } |
163 | 163 | } |
@@ -275,7 +275,7 @@ |
||
275 | 275 | { |
276 | 276 | $cm = $this->builder->getClassMetadata(); |
277 | 277 | if ($this->generatedValue) { |
278 | - $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); |
|
278 | + $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'.$this->generatedValue)); |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | if ($this->version) { |
@@ -67,7 +67,7 @@ |
||
67 | 67 | public function resolve($className) |
68 | 68 | { |
69 | 69 | if (isset($this->instances[$className = trim($className, '\\')])) { |
70 | - return $this->instances[$className]; |
|
70 | + return $this->instances[$className]; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $this->instances[$className] = new $className(); |
@@ -296,7 +296,7 @@ |
||
296 | 296 | ? $this->persister->expandCriteriaParameters($criteria) |
297 | 297 | : $this->persister->expandParameters($criteria); |
298 | 298 | |
299 | - return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset); |
|
299 | + return sha1($query.serialize($params).serialize($orderBy).$limit.$offset); |
|
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | abstract class AbstractEntityPersister implements CachedEntityPersister |
43 | 43 | { |
44 | - /** |
|
45 | - * @var \Doctrine\ORM\UnitOfWork |
|
46 | - */ |
|
44 | + /** |
|
45 | + * @var \Doctrine\ORM\UnitOfWork |
|
46 | + */ |
|
47 | 47 | protected $uow; |
48 | 48 | |
49 | 49 | /** |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected $class; |
63 | 63 | |
64 | - /** |
|
65 | - * @var array |
|
66 | - */ |
|
64 | + /** |
|
65 | + * @var array |
|
66 | + */ |
|
67 | 67 | protected $queuedCache = []; |
68 | 68 | |
69 | 69 | /** |
@@ -301,14 +301,14 @@ |
||
301 | 301 | */ |
302 | 302 | private function resolveMagicCall($method, $by, array $arguments) |
303 | 303 | { |
304 | - if (! $arguments) { |
|
305 | - throw ORMException::findByRequiresParameter($method . $by); |
|
304 | + if ( ! $arguments) { |
|
305 | + throw ORMException::findByRequiresParameter($method.$by); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | $fieldName = lcfirst(Inflector::classify($by)); |
309 | 309 | |
310 | - if (! ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName))) { |
|
311 | - throw ORMException::invalidMagicCall($this->_entityName, $fieldName, $method . $by); |
|
310 | + if ( ! ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName))) { |
|
311 | + throw ORMException::invalidMagicCall($this->_entityName, $fieldName, $method.$by); |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | return $this->$method([$fieldName => $arguments[0]], ...array_slice($arguments, 1)); |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public function transactional($func) |
226 | 226 | { |
227 | - if (!is_callable($func)) { |
|
228 | - throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"'); |
|
227 | + if ( ! is_callable($func)) { |
|
228 | + throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"'); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | $this->conn->beginTransaction(); |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | */ |
754 | 754 | public function isOpen() |
755 | 755 | { |
756 | - return (!$this->closed); |
|
756 | + return ( ! $this->closed); |
|
757 | 757 | } |
758 | 758 | |
759 | 759 | /** |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | sprintf( |
865 | 865 | 'Invalid $connection argument of type %s given%s.', |
866 | 866 | is_object($connection) ? get_class($connection) : gettype($connection), |
867 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
867 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
868 | 868 | ) |
869 | 869 | ); |
870 | 870 | } |
@@ -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 |