@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | return []; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - $token = 'Get entries with limit pagination ' . $this->_conn->pageSize; |
|
| 131 | + $token = 'Get entries with limit pagination '.$this->_conn->pageSize; |
|
| 132 | 132 | Yii::beginProfile($token, __METHOD__); |
| 133 | 133 | if ($this->_conn->offset > 0) { |
| 134 | 134 | $this->setEntries($this->_results[intval($this->_conn->offset / $this->_conn->pageSize)]); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | Yii::endProfile($token, __METHOD__); |
| 145 | 145 | |
| 146 | - $token = 'Get Attributes of entries with limit pagination in ' . $this->_conn->pageSize; |
|
| 146 | + $token = 'Get Attributes of entries with limit pagination in '.$this->_conn->pageSize; |
|
| 147 | 147 | Yii::beginProfile($token, __METHOD__); |
| 148 | 148 | $data = []; |
| 149 | 149 | foreach ($this as $item) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if (count($values) === 1) { |
| 47 | 47 | throw new InvalidArgumentException(sprintf('Unable to parse DN piece "%s".', $values[0])); |
| 48 | 48 | } |
| 49 | - $dn[$index] = $values[0] . '=' . $values[1]; |
|
| 49 | + $dn[$index] = $values[0].'='.$values[1]; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return implode(',', $dn); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $rdn = self::explodeDn($dn, 0)[0]; |
| 64 | 64 | $rdn = explode('=', $rdn, 2); |
| 65 | 65 | |
| 66 | - return $rdn[0] . '=' . $rdn[1]; |
|
| 66 | + return $rdn[0].'='.$rdn[1]; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | // Recursively iterates array and adds key/value to glued string |
| 86 | 86 | array_walk_recursive($array, function($value, $key) use ($glue, $include_keys, &$glued_string) { |
| 87 | - $include_keys and $glued_string .= $key . $glue; |
|
| 88 | - $glued_string .= $value . $glue; |
|
| 87 | + $include_keys and $glued_string .= $key.$glue; |
|
| 88 | + $glued_string .= $value.$glue; |
|
| 89 | 89 | }); |
| 90 | 90 | |
| 91 | 91 | // Removes last $glue from string |
@@ -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 | |