@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | * @param Logger $logger |
| 58 | 58 | * @return void |
| 59 | 59 | */ |
| 60 | - public function __construct(?Iterable $config, Logger $logger) |
|
| 60 | + public function __construct(? Iterable $config, Logger $logger) |
|
| 61 | 61 | { |
| 62 | - $this->logger = $logger; |
|
| 62 | + $this->logger = $logger; |
|
| 63 | 63 | $this->setOptions($config); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @param Iterable |
| 71 | 71 | * @return Ldap |
| 72 | 72 | */ |
| 73 | - public function setOptions(?Iterable $config): Db |
|
| 73 | + public function setOptions(? Iterable $config) : Db |
|
| 74 | 74 | { |
| 75 | 75 | if ($config === null) { |
| 76 | 76 | return $this; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | return false; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - $this->identity = $username; |
|
| 200 | + $this->identity = $username; |
|
| 201 | 201 | return true; |
| 202 | 202 | } |
| 203 | 203 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @param Logger $logger |
| 75 | 75 | * @return void |
| 76 | 76 | */ |
| 77 | - public function __construct(?Iterable $config, Logger $logger) |
|
| 77 | + public function __construct(? Iterable $config, Logger $logger) |
|
| 78 | 78 | { |
| 79 | 79 | $this->logger = $logger; |
| 80 | 80 | $this->setOptions($config); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param Iterable |
| 110 | 110 | * @return Ldap |
| 111 | 111 | */ |
| 112 | - public function setOptions(?Iterable $config): LdapServer |
|
| 112 | + public function setOptions(? Iterable $config) : LdapServer |
|
| 113 | 113 | { |
| 114 | 114 | if ($config === null) { |
| 115 | 115 | return $this; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param Logger $logger |
| 32 | 32 | * @return void |
| 33 | 33 | */ |
| 34 | - public function __construct(?Iterable $config, Logger $logger) |
|
| 34 | + public function __construct(? Iterable $config, Logger $logger) |
|
| 35 | 35 | { |
| 36 | 36 | } |
| 37 | 37 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * |
| 42 | 42 | * @return int |
| 43 | 43 | */ |
| 44 | - public function getAttributeSyncCache(): int |
|
| 44 | + public function getAttributeSyncCache() : int |
|
| 45 | 45 | { |
| 46 | 46 | return -1; |
| 47 | 47 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * @param Iterable $config |
| 41 | 41 | * @return LdapServer |
| 42 | 42 | */ |
| 43 | - public function setOptions(?Iterable $config): LdapServer |
|
| 43 | + public function setOptions(? Iterable $config) : LdapServer |
|
| 44 | 44 | { |
| 45 | 45 | if ($config === null) { |
| 46 | 46 | return $this; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function preauth(string $value): bool |
| 110 | 110 | { |
| 111 | - $parts = explode('|', $value); |
|
| 111 | + $parts = explode('|', $value); |
|
| 112 | 112 | |
| 113 | 113 | if (count($parts) !== 2) { |
| 114 | 114 | $this->logger->warning('invalid header x-preauth value, parts != 2', [ |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | 'category' => get_class($this) |
| 196 | 196 | ]); |
| 197 | 197 | |
| 198 | - $this->ldap_dn = $dn; |
|
| 198 | + $this->ldap_dn = $dn; |
|
| 199 | 199 | |
| 200 | 200 | return true; |
| 201 | 201 | } |
@@ -220,6 +220,6 @@ discard block |
||
| 220 | 220 | $ip_decimal = ip2long($ip); |
| 221 | 221 | $wildcard_decimal = pow(2, (32 - $netmask)) - 1; |
| 222 | 222 | $netmask_decimal = ~ $wildcard_decimal; |
| 223 | - return (($ip_decimal & $netmask_decimal) == ($range_decimal & $netmask_decimal)); |
|
| 223 | + return (($ip_decimal&$netmask_decimal) == ($range_decimal&$netmask_decimal)); |
|
| 224 | 224 | } |
| 225 | 225 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param Logger $logger |
| 24 | 24 | * @return void |
| 25 | 25 | */ |
| 26 | - public function __construct(?Iterable $config, Logger $logger); |
|
| 26 | + public function __construct(? Iterable $config, Logger $logger); |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @param Logger $logger |
| 98 | 98 | * @return void |
| 99 | 99 | */ |
| 100 | - public function __construct(?Iterable $config, Logger $logger) |
|
| 100 | + public function __construct(? Iterable $config, Logger $logger) |
|
| 101 | 101 | { |
| 102 | 102 | $this->logger = $logger; |
| 103 | 103 | $this->setOptions($config); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param Iterable |
| 111 | 111 | * @return Oauth2 |
| 112 | 112 | */ |
| 113 | - public function setOptions(?Iterable $config): Oauth2 |
|
| 113 | + public function setOptions(? Iterable $config) : Oauth2 |
|
| 114 | 114 | { |
| 115 | 115 | if ($config === null) { |
| 116 | 116 | return $this; |
@@ -266,9 +266,9 @@ discard block |
||
| 266 | 266 | $jre = json_decode($re); |
| 267 | 267 | |
| 268 | 268 | if ($jre->status == "success") { |
| 269 | - return (array) $jre->data; |
|
| 269 | + return (array)$jre->data; |
|
| 270 | 270 | } elseif ($jre->status == "fail") { |
| 271 | - throw new Exception('Error while validating the acces token. Auth server responded: ' . $jre->message); |
|
| 271 | + throw new Exception('Error while validating the acces token. Auth server responded: '.$jre->message); |
|
| 272 | 272 | } else { |
| 273 | 273 | throw new Exception('could not decode response: '.$re); |
| 274 | 274 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Balloon |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @param Iterable $config |
| 42 | 42 | * @return void |
| 43 | 43 | */ |
| 44 | - public function __construct(Logger $logger, ?Iterable $config) |
|
| 44 | + public function __construct(Logger $logger, ? Iterable $config) |
|
| 45 | 45 | { |
| 46 | 46 | $this->logger = $logger; |
| 47 | 47 | $this->addConverter($config); |