@@ -35,7 +35,7 @@ |
||
35 | 35 | public function generate(EntityManager $em, $entity) |
36 | 36 | { |
37 | 37 | $conn = $em->getConnection(); |
38 | - $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression(); |
|
38 | + $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression(); |
|
39 | 39 | return $conn->query($sql)->fetchColumn(0); |
40 | 40 | } |
41 | 41 | } |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public static function registerAutoloadDirectory($directory) |
46 | 46 | { |
47 | - if (!class_exists('Doctrine\Common\ClassLoader', false)) { |
|
48 | - require_once $directory . "/Doctrine/Common/ClassLoader.php"; |
|
47 | + if ( ! class_exists('Doctrine\Common\ClassLoader', false)) { |
|
48 | + require_once $directory."/Doctrine/Common/ClassLoader.php"; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | $loader = new ClassLoader("Doctrine", $directory); |
52 | 52 | $loader->register(); |
53 | 53 | |
54 | - $loader = new ClassLoader("Symfony\Component", $directory . "/Doctrine"); |
|
54 | + $loader = new ClassLoader("Symfony\Component", $directory."/Doctrine"); |
|
55 | 55 | $loader->register(); |
56 | 56 | } |
57 | 57 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $namespace .= ':'; |
151 | 151 | } |
152 | 152 | |
153 | - $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions |
|
153 | + $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions |
|
154 | 154 | |
155 | 155 | return $cache; |
156 | 156 | } |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | * // u.id = ?1 |
107 | 107 | * $expr->eq('u.id', '?1'); |
108 | 108 | * |
109 | - * @param mixed $x Left expression. |
|
110 | - * @param mixed $y Right expression. |
|
109 | + * @param string $x Left expression. |
|
110 | + * @param string $y Right expression. |
|
111 | 111 | * |
112 | 112 | * @return Expr\Comparison |
113 | 113 | */ |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * // u.id <> ?1 |
126 | 126 | * $q->where($q->expr()->neq('u.id', '?1')); |
127 | 127 | * |
128 | - * @param mixed $x Left expression. |
|
129 | - * @param mixed $y Right expression. |
|
128 | + * @param string $x Left expression. |
|
129 | + * @param string $y Right expression. |
|
130 | 130 | * |
131 | 131 | * @return Expr\Comparison |
132 | 132 | */ |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * Creates an IN() expression with the given arguments. |
437 | 437 | * |
438 | 438 | * @param string $x Field in string format to be restricted by IN() function. |
439 | - * @param mixed $y Argument to be used in IN() function. |
|
439 | + * @param string $y Argument to be used in IN() function. |
|
440 | 440 | * |
441 | 441 | * @return Expr\Func |
442 | 442 | */ |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | * Creates a NOT IN() expression with the given arguments. |
457 | 457 | * |
458 | 458 | * @param string $x Field in string format to be restricted by NOT IN() function. |
459 | - * @param mixed $y Argument to be used in NOT IN() function. |
|
459 | + * @param string $y Argument to be used in NOT IN() function. |
|
460 | 460 | * |
461 | 461 | * @return Expr\Func |
462 | 462 | */ |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | * Creates a LIKE() comparison expression with the given arguments. |
501 | 501 | * |
502 | 502 | * @param string $x Field in string format to be inspected by LIKE() comparison. |
503 | - * @param mixed $y Argument to be used in LIKE() comparison. |
|
503 | + * @param string $y Argument to be used in LIKE() comparison. |
|
504 | 504 | * |
505 | 505 | * @return Expr\Comparison |
506 | 506 | */ |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function countDistinct($x) |
270 | 270 | { |
271 | - return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; |
|
271 | + return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')'; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | } |
450 | 450 | } |
451 | 451 | } |
452 | - return new Expr\Func($x . ' IN', (array) $y); |
|
452 | + return new Expr\Func($x.' IN', (array) $y); |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | /** |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | } |
470 | 470 | } |
471 | 471 | } |
472 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
472 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | */ |
482 | 482 | public function isNull($x) |
483 | 483 | { |
484 | - return $x . ' IS NULL'; |
|
484 | + return $x.' IS NULL'; |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | /** |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | */ |
494 | 494 | public function isNotNull($x) |
495 | 495 | { |
496 | - return $x . ' IS NOT NULL'; |
|
496 | + return $x.' IS NOT NULL'; |
|
497 | 497 | } |
498 | 498 | |
499 | 499 | /** |
@@ -610,12 +610,12 @@ discard block |
||
610 | 610 | */ |
611 | 611 | private function _quoteLiteral($literal) |
612 | 612 | { |
613 | - if (is_numeric($literal) && !is_string($literal)) { |
|
613 | + if (is_numeric($literal) && ! is_string($literal)) { |
|
614 | 614 | return (string) $literal; |
615 | 615 | } else if (is_bool($literal)) { |
616 | 616 | return $literal ? "true" : "false"; |
617 | 617 | } else { |
618 | - return "'" . str_replace("'", "''", $literal) . "'"; |
|
618 | + return "'".str_replace("'", "''", $literal)."'"; |
|
619 | 619 | } |
620 | 620 | } |
621 | 621 |