@@ -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 | |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | $protocol = $this::PROTOCOL; |
| 140 | 140 | |
| 141 | 141 | if (is_array($hostname)) { |
| 142 | - $hostname = $protocol . implode(' ' . $protocol, $hostname); |
|
| 142 | + $hostname = $protocol.implode(' '.$protocol, $hostname); |
|
| 143 | 143 | } |
| 144 | 144 | $this->resource = ldap_connect($hostname, $port); |
| 145 | 145 | |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $this->filter = (new FilterBuilder)->build($this->where); |
| 85 | - if(empty($this->filter)){ |
|
| 85 | + if (empty($this->filter)) { |
|
| 86 | 86 | throw new InvalidValueException('You must define a filter for the search.'); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | - return count($parts) === 1 ? '('.$parts[0].')' : '$(' . implode(') (', $parts) . ')'; |
|
| 107 | + return count($parts) === 1 ? '('.$parts[0].')' : '$('.implode(') (', $parts).')'; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | if (!empty($parts)) { |
| 131 | - return '('.$this->operator[$operator].'(' . implode(") (", $parts) . ')'.implode($other).' )'; |
|
| 131 | + return '('.$this->operator[$operator].'('.implode(") (", $parts).')'.implode($other).' )'; |
|
| 132 | 132 | } else { |
| 133 | 133 | return ''; |
| 134 | 134 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | return ''; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - return '('.$this->operator['NOT'].'('.key($operands) .'='.$operand.'))'; |
|
| 159 | + return '('.$this->operator['NOT'].'('.key($operands).'='.$operand.'))'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -210,10 +210,10 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | if (count($sqlValues) > 1) { |
| 213 | - return "&($column=" . implode(")($column=", $sqlValues) . ')'; |
|
| 213 | + return "&($column=".implode(")($column=", $sqlValues).')'; |
|
| 214 | 214 | } else { |
| 215 | 215 | $operator = $operator === 'IN' ? '=' : '<>'; |
| 216 | - return $column . $operator . reset($sqlValues); |
|
| 216 | + return $column.$operator.reset($sqlValues); |
|
| 217 | 217 | } |
| 218 | 218 | } |
| 219 | 219 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | return $operator === 'IN' ? '0=1' : ''; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | - return '(&' . implode('', $vss) . ')'; |
|
| 245 | + return '(&'.implode('', $vss).')'; |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
@@ -290,15 +290,15 @@ discard block |
||
| 290 | 290 | return $not ? '' : '0=1'; |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | - $not = ($operator == 'NOT LIKE') ? '(' . $this->operator['NOT'] : false; |
|
| 293 | + $not = ($operator == 'NOT LIKE') ? '('.$this->operator['NOT'] : false; |
|
| 294 | 294 | |
| 295 | 295 | $parts = []; |
| 296 | 296 | foreach ($values as $value) { |
| 297 | 297 | $value = empty($escape) ? $value : strtr($value, $escape); |
| 298 | - $parts[] = $not . '(' . $column .'=*'.$value . '*)' . ($not? ')':''); |
|
| 298 | + $parts[] = $not.'('.$column.'=*'.$value.'*)'.($not ? ')' : ''); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | - return '('.$this->operator[trim($andor)] . implode($parts). ')'; |
|
| 301 | + return '('.$this->operator[trim($andor)].implode($parts).')'; |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |