@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | if ($first) $first = false; else $sql .= ' AND '; |
71 | 71 | |
72 | 72 | $sql .= $targetTableAlias . '.' . $sourceColumn |
73 | - . ' = ' |
|
74 | - . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
73 | + . ' = ' |
|
74 | + . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
75 | 75 | } |
76 | 76 | } else { // many-to-many |
77 | 77 | $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | ); |
101 | 101 | |
102 | 102 | $sql .= $joinTableAlias . '.' . $joinColumn['name'] |
103 | - . ' = ' |
|
104 | - . $sourceTableAlias . '.' . $sourceColumnName; |
|
103 | + . ' = ' |
|
104 | + . $sourceTableAlias . '.' . $sourceColumnName; |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); |
61 | 61 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
62 | 62 | |
63 | - $sql .= $quoteStrategy->getTableName($targetClass, $platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
63 | + $sql .= $quoteStrategy->getTableName($targetClass, $platform).' '.$targetTableAlias.' WHERE '; |
|
64 | 64 | |
65 | 65 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
66 | 66 | |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
70 | 70 | if ($first) $first = false; else $sql .= ' AND '; |
71 | 71 | |
72 | - $sql .= $targetTableAlias . '.' . $sourceColumn |
|
72 | + $sql .= $targetTableAlias.'.'.$sourceColumn |
|
73 | 73 | . ' = ' |
74 | - . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
74 | + . $sourceTableAlias.'.'.$quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
75 | 75 | } |
76 | 76 | } else { // many-to-many |
77 | 77 | $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
85 | 85 | |
86 | 86 | // join to target table |
87 | - $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform) . ' ' . $joinTableAlias . ' WHERE '; |
|
87 | + $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform).' '.$joinTableAlias.' WHERE '; |
|
88 | 88 | |
89 | 89 | $joinColumns = $assoc['isOwningSide'] |
90 | 90 | ? $joinTable['joinColumns'] |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform |
100 | 100 | ); |
101 | 101 | |
102 | - $sql .= $joinTableAlias . '.' . $joinColumn['name'] |
|
102 | + $sql .= $joinTableAlias.'.'.$joinColumn['name'] |
|
103 | 103 | . ' = ' |
104 | - . $sourceTableAlias . '.' . $sourceColumnName; |
|
104 | + . $sourceTableAlias.'.'.$sourceColumnName; |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | - return '(' . $sql . ')'; |
|
108 | + return '('.$sql.')'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -67,7 +67,11 @@ discard block |
||
67 | 67 | $first = true; |
68 | 68 | |
69 | 69 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
70 | - if ($first) $first = false; else $sql .= ' AND '; |
|
70 | + if ($first) { |
|
71 | + $first = false; |
|
72 | + } else { |
|
73 | + $sql .= ' AND '; |
|
74 | + } |
|
71 | 75 | |
72 | 76 | $sql .= $targetTableAlias . '.' . $sourceColumn |
73 | 77 | . ' = ' |
@@ -93,7 +97,11 @@ discard block |
||
93 | 97 | $first = true; |
94 | 98 | |
95 | 99 | foreach ($joinColumns as $joinColumn) { |
96 | - if ($first) $first = false; else $sql .= ' AND '; |
|
100 | + if ($first) { |
|
101 | + $first = false; |
|
102 | + } else { |
|
103 | + $sql .= ' AND '; |
|
104 | + } |
|
97 | 105 | |
98 | 106 | $sourceColumnName = $quoteStrategy->getColumnName( |
99 | 107 | $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform |
@@ -44,9 +44,9 @@ |
||
44 | 44 | */ |
45 | 45 | public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) |
46 | 46 | { |
47 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( |
|
47 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression( |
|
48 | 48 | $this->simpleArithmeticExpression |
49 | - ) . ')'; |
|
49 | + ).')'; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $args[] = $sqlWalker->walkStringPrimary($expression); |
54 | 54 | } |
55 | 55 | |
56 | - return call_user_func_array(array($platform,'getConcatExpression'), $args); |
|
56 | + return call_user_func_array(array($platform, 'getConcatExpression'), $args); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -73,8 +73,8 @@ |
||
73 | 73 | $this->concatExpressions[] = $this->secondStringPrimary; |
74 | 74 | |
75 | 75 | while ($parser->getLexer()->isNextToken(Lexer::T_COMMA)) { |
76 | - $parser->match(Lexer::T_COMMA); |
|
77 | - $this->concatExpressions[] = $parser->StringPrimary(); |
|
76 | + $parser->match(Lexer::T_COMMA); |
|
77 | + $this->concatExpressions[] = $parser->StringPrimary(); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $parser->match(Lexer::T_CLOSE_PARENTHESIS); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function __construct(array $scalarExpressions) |
44 | 44 | { |
45 | - $this->scalarExpressions = $scalarExpressions; |
|
45 | + $this->scalarExpressions = $scalarExpressions; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * A filter object is in CLEAN state when it has no changed parameters. |
35 | 35 | */ |
36 | - const FILTERS_STATE_CLEAN = 1; |
|
36 | + const FILTERS_STATE_CLEAN = 1; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * A filter object is in DIRTY state when it has changed parameters. |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function enable($name) |
105 | 105 | { |
106 | 106 | if ( ! $this->has($name)) { |
107 | - throw new \InvalidArgumentException("Filter '" . $name . "' does not exist."); |
|
107 | + throw new \InvalidArgumentException("Filter '".$name."' does not exist."); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | if ( ! $this->isEnabled($name)) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function getFilter($name) |
157 | 157 | { |
158 | 158 | if ( ! $this->isEnabled($name)) { |
159 | - throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled."); |
|
159 | + throw new \InvalidArgumentException("Filter '".$name."' is not enabled."); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | return $this->enabledFilters[$name]; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $filterHash = ''; |
210 | 210 | |
211 | 211 | foreach ($this->enabledFilters as $name => $filter) { |
212 | - $filterHash .= $name . $filter; |
|
212 | + $filterHash .= $name.$filter; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | return $filterHash; |
@@ -73,6 +73,6 @@ |
||
73 | 73 | */ |
74 | 74 | public function __toString() |
75 | 75 | { |
76 | - return $this->name . '(' . implode(', ', $this->arguments) . ')'; |
|
76 | + return $this->name.'('.implode(', ', $this->arguments).')'; |
|
77 | 77 | } |
78 | 78 | } |
@@ -138,8 +138,8 @@ |
||
138 | 138 | public function __toString() |
139 | 139 | { |
140 | 140 | return strtoupper($this->joinType) . ' JOIN ' . $this->join |
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
141 | + . ($this->alias ? ' ' . $this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -137,9 +137,9 @@ |
||
137 | 137 | */ |
138 | 138 | public function __toString() |
139 | 139 | { |
140 | - return strtoupper($this->joinType) . ' JOIN ' . $this->join |
|
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
140 | + return strtoupper($this->joinType).' JOIN '.$this->join |
|
141 | + . ($this->alias ? ' '.$this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '') |
|
143 | + . ($this->condition ? ' '.strtoupper($this->conditionType).' '.$this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string |
35 | 35 | */ |
36 | - protected $preSeparator = ''; |
|
36 | + protected $preSeparator = ''; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string |
@@ -95,6 +95,6 @@ |
||
95 | 95 | */ |
96 | 96 | public function __toString() |
97 | 97 | { |
98 | - return $this->leftExpr . ' ' . $this->operator . ' ' . $this->rightExpr; |
|
98 | + return $this->leftExpr.' '.$this->operator.' '.$this->rightExpr; |
|
99 | 99 | } |
100 | 100 | } |