@@ -288,7 +288,7 @@ |
||
| 288 | 288 | */ |
| 289 | 289 | protected $wWWHomePage; |
| 290 | 290 | |
| 291 | - public function rules (){ |
|
| 291 | + public function rules() { |
|
| 292 | 292 | return [['cn'], 'required']; |
| 293 | 293 | } |
| 294 | 294 | |
@@ -209,7 +209,7 @@ |
||
| 209 | 209 | |
| 210 | 210 | $resource = $this->_conn->resource; |
| 211 | 211 | |
| 212 | - Yii::beginProfile('current:' . $this->key(), 'chrmorandi\ldap\DataReader'); |
|
| 212 | + Yii::beginProfile('current:'.$this->key(), 'chrmorandi\ldap\DataReader'); |
|
| 213 | 213 | $name = ldap_first_attribute($resource, $this->_row); |
| 214 | 214 | |
| 215 | 215 | while ($name) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $parts[] = "$column=$value"; |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | - return count($parts) === 1 ? '('.$parts[0].')' : '$(' . implode(') (', $parts) . ')'; |
|
| 101 | + return count($parts) === 1 ? '('.$parts[0].')' : '$('.implode(') (', $parts).')'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | if (!empty($parts)) { |
| 125 | - return '('.$this->operator[$operator].'(' . implode(") (", $parts) . ')'.implode($other).' )'; |
|
| 125 | + return '('.$this->operator[$operator].'('.implode(") (", $parts).')'.implode($other).' )'; |
|
| 126 | 126 | } else { |
| 127 | 127 | return ''; |
| 128 | 128 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | return ''; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - return '('.$this->operator['NOT'].'('.key($operands) .'='.$operand.'))'; |
|
| 153 | + return '('.$this->operator['NOT'].'('.key($operands).'='.$operand.'))'; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | if (count($sqlValues) > 1) { |
| 212 | - return "$column $operator (" . implode(', ', $sqlValues) . ')'; |
|
| 212 | + return "$column $operator (".implode(', ', $sqlValues).')'; |
|
| 213 | 213 | } else { |
| 214 | 214 | $operator = $operator === 'IN' ? '=' : '<>'; |
| 215 | - return $column . $operator . reset($sqlValues); |
|
| 215 | + return $column.$operator.reset($sqlValues); |
|
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $columns[$i] = $this->db->quoteColumnName($col); |
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | - return '(' . implode(', ', $columns) . ") $operator ($sql)"; |
|
| 236 | + return '('.implode(', ', $columns).") $operator ($sql)"; |
|
| 237 | 237 | } else { |
| 238 | 238 | if (strpos($columns, '(') === false) { |
| 239 | 239 | $columns = $this->db->quoteColumnName($columns); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $vs[] = 'NULL'; |
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | - $vss[] = '(' . implode(', ', $vs) . ')'; |
|
| 267 | + $vss[] = '('.implode(', ', $vs).')'; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | if (empty($vss)) { |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $sqlColumns[] = strpos($column, '(') === false ? $this->db->quoteColumnName($column) : $column; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - return '(' . implode(', ', $sqlColumns) . ") $operator (" . implode(', ', $vss) . ')'; |
|
| 279 | + return '('.implode(', ', $sqlColumns).") $operator (".implode(', ', $vss).')'; |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | /** |
@@ -324,15 +324,15 @@ discard block |
||
| 324 | 324 | return $not ? '' : '0=1'; |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - $not = ($operator == 'NOT LIKE') ? '(' . $this->operator['NOT'] : false; |
|
| 327 | + $not = ($operator == 'NOT LIKE') ? '('.$this->operator['NOT'] : false; |
|
| 328 | 328 | |
| 329 | 329 | $parts = []; |
| 330 | 330 | foreach ($values as $value) { |
| 331 | 331 | $value = empty($escape) ? $value : strtr($value, $escape); |
| 332 | - $parts[] = $not . '(' . $column .'=*'.$value . '*)' . ($not? ')':''); |
|
| 332 | + $parts[] = $not.'('.$column.'=*'.$value.'*)'.($not ? ')' : ''); |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | - return '('.$this->operator[trim($andor)] . implode($parts). ')'; |
|
| 335 | + return '('.$this->operator[trim($andor)].implode($parts).')'; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |