@@ -96,12 +96,12 @@ discard block |
||
| 96 | 96 | } elseif ($value === null) { |
| 97 | 97 | $parts[] = "(!($attribute=*))"; |
| 98 | 98 | } elseif ($attribute === 'dn') { |
| 99 | - $parts[] = '(' . LdapHelper::getRdnFromDn($value) . ')'; |
|
| 99 | + $parts[] = '('.LdapHelper::getRdnFromDn($value).')'; |
|
| 100 | 100 | } else { |
| 101 | 101 | $parts[] = "($attribute=$value)"; |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | - return count($parts) === 1 ? $parts[0] : '(&' . implode('', $parts) . ')'; |
|
| 104 | + return count($parts) === 1 ? $parts[0] : '(&'.implode('', $parts).')'; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - return empty($parts) ? '' : '(' . $this->operator[$operator] . implode('', $parts) . ')'; |
|
| 128 | + return empty($parts) ? '' : '('.$this->operator[$operator].implode('', $parts).')'; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -166,9 +166,9 @@ discard block |
||
| 166 | 166 | if (empty($parts)) { |
| 167 | 167 | return ''; |
| 168 | 168 | } elseif ($operator === 'NOT IN') { |
| 169 | - return '(!' . implode('', $parts) . ')'; |
|
| 169 | + return '(!'.implode('', $parts).')'; |
|
| 170 | 170 | } |
| 171 | - return count($parts) === 1 ? $parts[0] : '(|' . implode('', $parts) . ')'; |
|
| 171 | + return count($parts) === 1 ? $parts[0] : '(|'.implode('', $parts).')'; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -216,15 +216,15 @@ discard block |
||
| 216 | 216 | return ''; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $not = ($operator == 'NOT LIKE') ? '(' . $this->operator['NOT'] : false; |
|
| 219 | + $not = ($operator == 'NOT LIKE') ? '('.$this->operator['NOT'] : false; |
|
| 220 | 220 | |
| 221 | 221 | $parts = []; |
| 222 | 222 | foreach ($values as $value) { |
| 223 | 223 | $value = empty($escape) ? $value : strtr($value, $escape); |
| 224 | - $parts[] = $not . '(' . $attribute . '=*' . $value . '*)' . ($not ? ')' : ''); |
|
| 224 | + $parts[] = $not.'('.$attribute.'=*'.$value.'*)'.($not ? ')' : ''); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - return '(' . $this->operator[trim($andor)] . implode($parts) . ')'; |
|
| 227 | + return '('.$this->operator[trim($andor)].implode($parts).')'; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /** |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | protected static function encodePassword($password) |
| 142 | 142 | { |
| 143 | - $password = "\"" . $password . "\""; |
|
| 143 | + $password = "\"".$password."\""; |
|
| 144 | 144 | $adpassword = mb_convert_encoding($password, "UTF-16LE", "UTF-8"); |
| 145 | 145 | return $adpassword; |
| 146 | 146 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function open($anonymous = false) |
| 187 | 187 | { |
| 188 | - $token = 'Opening LDAP connection: ' . LdapHelper::recursive_implode($this->dc, ' or '); |
|
| 188 | + $token = 'Opening LDAP connection: '.LdapHelper::recursive_implode($this->dc, ' or '); |
|
| 189 | 189 | Yii::info($token, __METHOD__); |
| 190 | 190 | Yii::beginProfile($token, __METHOD__); |
| 191 | 191 | // Connect to the LDAP server. |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | protected function connect($hostname = [], $port = 389) |
| 213 | 213 | { |
| 214 | 214 | if (is_array($hostname)) { |
| 215 | - $hostname = self::PROTOCOL . implode(' ' . self::PROTOCOL, $hostname); |
|
| 215 | + $hostname = self::PROTOCOL.implode(' '.self::PROTOCOL, $hostname); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | $this->close(); |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $this->open(); |
| 332 | 332 | $results = []; |
| 333 | 333 | $cookie = ''; |
| 334 | - $token = $function . ' - params: ' . LdapHelper::recursive_implode($params, ';'); |
|
| 334 | + $token = $function.' - params: '.LdapHelper::recursive_implode($params, ';'); |
|
| 335 | 335 | |
| 336 | 336 | Yii::info($token, 'chrmorandi\ldap\Connection::query'); |
| 337 | 337 | |