@@ -43,7 +43,7 @@ |
||
43 | 43 | protected $account_filter = '(uid=%s)'; |
44 | 44 | |
45 | 45 | |
46 | - public function __construct(LdapServer $ldap, LoggerInterface $logger, ?Iterable $config=null) |
|
46 | + public function __construct(LdapServer $ldap, LoggerInterface $logger, ?Iterable $config = null) |
|
47 | 47 | { |
48 | 48 | $this->logger = $logger; |
49 | 49 | $this->ldap = $ldap; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $this->{$option} = (string)$value; |
94 | 94 | break; |
95 | 95 | case 'adapter': |
96 | - foreach($value as $name => $adapter) { |
|
96 | + foreach ($value as $name => $adapter) { |
|
97 | 97 | $this->injectAdapter($name, $adapter); |
98 | 98 | } |
99 | 99 | break; |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * {@inheritDoc} |
129 | 129 | */ |
130 | - public function injectAdapter($adapter, ?string $name=null) : AdapterAwareInterface |
|
130 | + public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface |
|
131 | 131 | { |
132 | - if(!($adapter instanceof AdapterInterface)) { |
|
132 | + if (!($adapter instanceof AdapterInterface)) { |
|
133 | 133 | throw new Exception('adapter needs to implement AdapterInterface'); |
134 | 134 | } |
135 | 135 | |
136 | - if($name === null) { |
|
136 | + if ($name === null) { |
|
137 | 137 | $name = get_class($adapter); |
138 | 138 | } |
139 | 139 |
@@ -71,16 +71,16 @@ discard block |
||
71 | 71 | * @param Iterable $config |
72 | 72 | * @return Log |
73 | 73 | */ |
74 | - public function setOptions(? Iterable $config = null): Log |
|
74 | + public function setOptions(? Iterable $config = null) : Log |
|
75 | 75 | { |
76 | 76 | if ($config === null) { |
77 | 77 | return $this; |
78 | 78 | } |
79 | 79 | |
80 | 80 | foreach ($config as $option => $value) { |
81 | - switch($option) { |
|
81 | + switch ($option) { |
|
82 | 82 | case 'adapter': |
83 | - foreach($value as $name => $adapter) { |
|
83 | + foreach ($value as $name => $adapter) { |
|
84 | 84 | $this->injectAdapter($name, $adapter); |
85 | 85 | } |
86 | 86 | break; |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * {@inheritDoc} |
116 | 116 | */ |
117 | - public function injectAdapter($adapter, ?string $name=null) : AdapterAwareInterface |
|
117 | + public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface |
|
118 | 118 | { |
119 | - if(!($adapter instanceof AdapterInterface)) { |
|
119 | + if (!($adapter instanceof AdapterInterface)) { |
|
120 | 120 | throw new Exception('adapter needs to implement AdapterInterface'); |
121 | 121 | } |
122 | 122 | |
123 | - if($name === null) { |
|
123 | + if ($name === null) { |
|
124 | 124 | $name = get_class($adapter); |
125 | 125 | } |
126 | 126 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * @param string $name |
38 | 38 | * @return AdapterAwareInterface |
39 | 39 | */ |
40 | - public function injectAdapter($adapter, ?string $name=null): AdapterAwareInterface; |
|
40 | + public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface; |
|
41 | 41 | |
42 | 42 | |
43 | 43 | /** |
@@ -352,11 +352,11 @@ |
||
352 | 352 | if (isset($request_params[$param->name]) && $request_params[$param->name] !== '') { |
353 | 353 | if (is_bool($default)) { |
354 | 354 | if($request_params[$param->name] === 'false') { |
355 | - $return[$param->name] = false; |
|
355 | + $return[$param->name] = false; |
|
356 | 356 | } else { |
357 | 357 | $return[$param->name] = (bool)$request_params[$param->name]; |
358 | 358 | } |
359 | - } elseif (is_int($default)) { |
|
359 | + } elseif (is_int($default)) { |
|
360 | 360 | $return[$param->name] = (int)$request_params[$param->name]; |
361 | 361 | } elseif (is_array($default)) { |
362 | 362 | $return[$param->name] = (array)$request_params[$param->name]; |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | * @param array $request |
69 | 69 | * @return void |
70 | 70 | */ |
71 | - public function __construct(LoggerInterface $logger, ?array $request=null, ?ContainerInterface $container=null) |
|
71 | + public function __construct(LoggerInterface $logger, ? array $request = null, ?ContainerInterface $container = null) |
|
72 | 72 | { |
73 | 73 | $this->logger = $logger; |
74 | 74 | $this->container = $container; |
75 | 75 | |
76 | - if($request === null) { |
|
76 | + if ($request === null) { |
|
77 | 77 | $request = $_SERVER; |
78 | 78 | } |
79 | 79 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | 'code' => $exception->getCode() |
287 | 287 | ]; |
288 | 288 | |
289 | - if(defined("$class::HTTP_CODE")) { |
|
289 | + if (defined("$class::HTTP_CODE")) { |
|
290 | 290 | $http_code = $class::HTTP_CODE; |
291 | 291 | } else { |
292 | 292 | $http_code = 500; |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | if (isset($request_params[$param->name]) && $request_params[$param->name] !== '') { |
353 | 353 | if (is_bool($default)) { |
354 | - if($request_params[$param->name] === 'false') { |
|
354 | + if ($request_params[$param->name] === 'false') { |
|
355 | 355 | $return[$param->name] = false; |
356 | 356 | } else { |
357 | 357 | $return[$param->name] = (bool)$request_params[$param->name]; |