@@ -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 |
@@ -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 |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $parts[] = "$attribute=$value"; |
104 | 104 | } |
105 | 105 | } |
106 | - return count($parts) === 1 ? '(' . $parts[0] . ')' : '&(' . implode(') (', $parts) . ')'; |
|
106 | + return count($parts) === 1 ? '('.$parts[0].')' : '&('.implode(') (', $parts).')'; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
126 | - return empty($parts) ? '' : '(' . $this->operator[$operator] . '(' . implode(') (', $parts) . '))'; |
|
126 | + return empty($parts) ? '' : '('.$this->operator[$operator].'('.implode(') (', $parts).'))'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | if (empty($parts)) { |
165 | 165 | return ''; |
166 | 166 | } elseif ($operator === 'NOT IN') { |
167 | - return '!(' . implode(') (', $parts) . ')'; |
|
167 | + return '!('.implode(') (', $parts).')'; |
|
168 | 168 | } |
169 | - return count($parts) === 1 ? '(' . $parts[0] . ')' : '|(' . implode(') (', $parts) . ')'; |
|
169 | + return count($parts) === 1 ? '('.$parts[0].')' : '|('.implode(') (', $parts).')'; |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | return ''; |
215 | 215 | } |
216 | 216 | |
217 | - $not = ($operator == 'NOT LIKE') ? '(' . $this->operator['NOT'] : false; |
|
217 | + $not = ($operator == 'NOT LIKE') ? '('.$this->operator['NOT'] : false; |
|
218 | 218 | |
219 | 219 | $parts = []; |
220 | 220 | foreach ($values as $value) { |
221 | 221 | $value = empty($escape) ? $value : strtr($value, $escape); |
222 | - $parts[] = $not . '(' . $attribute . '=*' . $value . '*)' . ($not ? ')' : ''); |
|
222 | + $parts[] = $not.'('.$attribute.'=*'.$value.'*)'.($not ? ')' : ''); |
|
223 | 223 | } |
224 | 224 | |
225 | - return '(' . $this->operator[trim($andor)] . implode($parts) . ')'; |
|
225 | + return '('.$this->operator[trim($andor)].implode($parts).')'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | /** |