@@ -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 | * Micro |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @var bool |
| 70 | 70 | */ |
| 71 | - protected $tls=false; |
|
| 71 | + protected $tls = false; |
|
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @param Logger $logger |
| 87 | 87 | * @return resource |
| 88 | 88 | */ |
| 89 | - public function __construct(?Iterable $config, Logger $logger) |
|
| 89 | + public function __construct(? Iterable $config, Logger $logger) |
|
| 90 | 90 | { |
| 91 | 91 | $this->setOptions($config); |
| 92 | 92 | $this->logger = $logger; |
@@ -100,13 +100,13 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function connect(): Ldap |
| 102 | 102 | { |
| 103 | - if($this->binddn === null) { |
|
| 103 | + if ($this->binddn === null) { |
|
| 104 | 104 | $this->logger->warning('no binddn set for ldap connection, you should avoid anonymous bind', [ |
| 105 | 105 | 'category' => get_class($this), |
| 106 | 106 | ]); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - if($this->tls === false && substr($this->uri, 0, 5) !== 'ldaps') { |
|
| 109 | + if ($this->tls === false && substr($this->uri, 0, 5) !== 'ldaps') { |
|
| 110 | 110 | $this->logger->warning('neither tls nor ldaps enabled for ldap connection, it is strongly reccommended to encrypt ldap connections', [ |
| 111 | 111 | 'category' => get_class($this), |
| 112 | 112 | ]); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if ($this->connection) { |
| 126 | - if($this->binddn !== null) { |
|
| 126 | + if ($this->binddn !== null) { |
|
| 127 | 127 | $bind = ldap_bind($this->connection, $this->binddn, $this->bindpw); |
| 128 | 128 | |
| 129 | 129 | if ($bind) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @param Iterable $config |
| 166 | 166 | * @return Ldap |
| 167 | 167 | */ |
| 168 | - public function setOptions(?Iterable $config=null): Ldap |
|
| 168 | + public function setOptions(? Iterable $config = null) : Ldap |
|
| 169 | 169 | { |
| 170 | 170 | if ($config === null) { |
| 171 | 171 | return $this; |