@@ -333,9 +333,9 @@ |
||
333 | 333 | return []; |
334 | 334 | } |
335 | 335 | |
336 | - /** |
|
337 | - * Regex to match a GUID. |
|
338 | - */ |
|
336 | + /** |
|
337 | + * Regex to match a GUID. |
|
338 | + */ |
|
339 | 339 | const MATCH_GUID = '/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$/'; |
340 | 340 | |
341 | 341 | /** |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public static function unescape($value) |
177 | 177 | { |
178 | - $callback = function ($matches) { |
|
178 | + $callback = function($matches) { |
|
179 | 179 | return chr(hexdec($matches[1])); |
180 | 180 | }; |
181 | 181 | |
@@ -385,12 +385,12 @@ discard block |
||
385 | 385 | $value = preg_match('/^(\\\[0-9a-fA-F]{2})+$/', (string) $value) ? $value : ldap_escape($value, $ignore, $flags); |
386 | 386 | |
387 | 387 | // Per RFC 4514, leading/trailing spaces should be encoded in DNs, as well as carriage returns. |
388 | - if ((int)$flags & LDAP_ESCAPE_DN) { |
|
388 | + if ((int) $flags & LDAP_ESCAPE_DN) { |
|
389 | 389 | if (!empty($value) && $value[0] === ' ') { |
390 | - $value = '\\20' . substr($value, 1); |
|
390 | + $value = '\\20'.substr($value, 1); |
|
391 | 391 | } |
392 | 392 | if (!empty($value) && $value[strlen($value) - 1] === ' ') { |
393 | - $value = substr($value, 0, -1) . '\\20'; |
|
393 | + $value = substr($value, 0, -1).'\\20'; |
|
394 | 394 | } |
395 | 395 | // Only carriage returns seem to be valid, not line feeds (per testing of AD anyway). |
396 | 396 | $value = str_replace("\r", '\0d', $value); |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public static function unescapeValue($value) |
409 | 409 | { |
410 | - $callback = function ($matches) { |
|
410 | + $callback = function($matches) { |
|
411 | 411 | return chr(hexdec($matches[1])); |
412 | 412 | }; |
413 | 413 |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | { |
92 | 92 | $this->schema = new Schema(); |
93 | 93 | |
94 | - if($this->schemaClass !== null){ |
|
95 | - if(class_exists($this->schemaClass)){ |
|
94 | + if ($this->schemaClass !== null) { |
|
95 | + if (class_exists($this->schemaClass)) { |
|
96 | 96 | Schema::set(new $this->schemaClass); |
97 | 97 | } else { |
98 | - throw new InvalidConfigException('"' . $this->schemaClass . '" does not exist.'); |
|
98 | + throw new InvalidConfigException('"'.$this->schemaClass.'" does not exist.'); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $dn = $values[self::primaryKey()]; |
189 | 189 | unset($values[self::primaryKey()]); |
190 | 190 | |
191 | - if (($primaryKeys = static::getDb()->execute('ldap_add', [$dn,$values])) === false) { |
|
191 | + if (($primaryKeys = static::getDb()->execute('ldap_add', [$dn, $values])) === false) { |
|
192 | 192 | return false; |
193 | 193 | } |
194 | 194 | $this->setAttribute(self::primaryKey(), $dn); |