-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from ChadSikorra/v1-more-fixes
[1.0.0] PHPStan / phpdoc clean-up.
- Loading branch information
Showing
27 changed files
with
87 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
/** | ||
* Represents a set of controls. | ||
* | ||
* @implements IteratorAggregate<Control> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class ControlBag implements IteratorAggregate, Countable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
/** | ||
* Represents an entry attribute and any values. | ||
* | ||
* @implements IteratorAggregate<int|string, string> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class Attribute implements IteratorAggregate, Countable, Stringable | ||
|
@@ -48,7 +49,7 @@ class Attribute implements IteratorAggregate, Countable, Stringable | |
private ?string $lcAttribute = null; | ||
|
||
/** | ||
* @var string[] | ||
* @var array<int|string, string> | ||
*/ | ||
private array $values; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
/** | ||
* Represents a set of change objects. | ||
* | ||
* @implements IteratorAggregate<Change> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class Changes implements Countable, IteratorAggregate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,10 +29,14 @@ | |
/** | ||
* Represents a Distinguished Name. | ||
* | ||
* @implements IteratorAggregate<Rdn> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class Dn implements IteratorAggregate, Countable, Stringable | ||
{ | ||
/** | ||
* @var ?Rdn[] | ||
*/ | ||
private ?array $pieces = null; | ||
|
||
public function __construct(private readonly string $dn) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
* | ||
* @author Chad Sikorra <[email protected]> | ||
* | ||
* @implements IteratorAggregate<Entry> | ||
* @template T of Entry | ||
*/ | ||
class Entries implements Countable, IteratorAggregate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,14 @@ | |
/** | ||
* Represents an Entry in LDAP. | ||
* | ||
* @implements IteratorAggregate<Attribute> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class Entry implements IteratorAggregate, Countable, Stringable | ||
{ | ||
/** | ||
* @var Attribute[] | ||
*/ | ||
private array $attributes; | ||
|
||
private Dn $dn; | ||
|
@@ -254,8 +258,13 @@ public function __get(string $name): ?Attribute | |
return $this->get($name); | ||
} | ||
|
||
public function __set(string $name, Stringable|string|array $value): void | ||
{ | ||
/** | ||
* @param Stringable|string|array<string|Stringable> $value | ||
*/ | ||
public function __set( | ||
string $name, | ||
Stringable|string|array $value | ||
): void { | ||
$this->set( | ||
$name, | ||
...(is_array($value) ? $value : [(string) $value]) | ||
|
@@ -275,7 +284,7 @@ public function __unset(string $name): void | |
/** | ||
* An alias of fromArray(). | ||
* | ||
* @param array<string, string|array> $attributes | ||
* @param array<string, string|array<string|Stringable>> $attributes | ||
*/ | ||
public static function create( | ||
Dn|Stringable|string $dn, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
/** | ||
* Represents a collection of attribute options. | ||
* | ||
* @implements IteratorAggregate<Option> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class Options implements Countable, IteratorAggregate, Stringable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,12 @@ | |
use Countable; | ||
use IteratorAggregate; | ||
use Stringable; | ||
use Traversable; | ||
|
||
/** | ||
* Represents a logical 'and' filter. RFC 4511, 4.5.1 | ||
* | ||
* @implements IteratorAggregate<FilterInterface> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class AndFilter implements FilterContainerInterface, IteratorAggregate, Countable, Stringable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
/** | ||
* Represents a logical 'or' filter. RFC 4511, 4.5.1 | ||
* | ||
* @implements IteratorAggregate<FilterInterface> | ||
* @author Chad Sikorra <[email protected]> | ||
*/ | ||
class OrFilter implements FilterContainerInterface, IteratorAggregate, Countable, Stringable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.