@@ -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 | /** |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | if (empty($parts)) { |
| 166 | 166 | return ''; |
| 167 | 167 | } elseif ($operator === 'NOT IN') { |
| 168 | - return '(!' . implode('', $parts) . ')'; |
|
| 168 | + return '(!'.implode('', $parts).')'; |
|
| 169 | 169 | } |
| 170 | - return count($parts) === 1 ? $parts[0] : '(|' . implode('', $parts) . ')'; |
|
| 170 | + return count($parts) === 1 ? $parts[0] : '(|'.implode('', $parts).')'; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | $parts = []; |
| 215 | 215 | foreach ($values as $value) { |
| 216 | - $parts[] = ($not ? '(!' : '') . '(' . $attribute . '=*' . $value . '*)' . ($not ? ')' : ''); |
|
| 216 | + $parts[] = ($not ? '(!' : '').'('.$attribute.'=*'.$value.'*)'.($not ? ')' : ''); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - return '(' . $this->operator[$andor] . implode($parts) . ')'; |
|
| 219 | + return '('.$this->operator[$andor].implode($parts).')'; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | protected static function encodePassword($password) |
| 145 | 145 | { |
| 146 | - $password = "\"" . $password . "\""; |
|
| 146 | + $password = "\"".$password."\""; |
|
| 147 | 147 | $adpassword = mb_convert_encoding($password, "UTF-16LE", "UTF-8"); |
| 148 | 148 | return $adpassword; |
| 149 | 149 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function open($anonymous = false) |
| 192 | 192 | { |
| 193 | - $token = 'Opening LDAP connection: ' . LdapHelper::recursiveImplode($this->dc, ' or '); |
|
| 193 | + $token = 'Opening LDAP connection: '.LdapHelper::recursiveImplode($this->dc, ' or '); |
|
| 194 | 194 | Yii::info($token, __METHOD__); |
| 195 | 195 | Yii::beginProfile($token, __METHOD__); |
| 196 | 196 | // Connect to the LDAP server. |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | protected function connect($hostname = [], $port = 389) |
| 218 | 218 | { |
| 219 | 219 | if (is_array($hostname)) { |
| 220 | - $hostname = self::PROTOCOL . implode(' ' . self::PROTOCOL, $hostname); |
|
| 220 | + $hostname = self::PROTOCOL.implode(' '.self::PROTOCOL, $hostname); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | $this->close(); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $this->open(); |
| 337 | 337 | $results = []; |
| 338 | 338 | $cookie = ''; |
| 339 | - $token = $function . ' - params: ' . LdapHelper::recursiveImplode($params, ';'); |
|
| 339 | + $token = $function.' - params: '.LdapHelper::recursiveImplode($params, ';'); |
|
| 340 | 340 | |
| 341 | 341 | Yii::info($token, 'chrmorandi\ldap\Connection::query'); |
| 342 | 342 | |