| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class AuthMethodFactory implements AuthMethodFactoryInterface |
||
| 10 | { |
||
| 11 | /** @var AuthMethodInterface[] */ |
||
| 12 | private $methods = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * AuthMethodFactory constructor. |
||
| 16 | * |
||
| 17 | * @param AuthMethodInterface[] $methods |
||
| 18 | */ |
||
| 19 | 3 | public function __construct(array $methods = []) |
|
| 20 | { |
||
| 21 | 3 | foreach ($methods as $method) { |
|
| 22 | 2 | $this->add($method); |
|
| 23 | } |
||
| 24 | 3 | } |
|
| 25 | |||
| 26 | 2 | public function add(AuthMethodInterface $authMethod): void |
|
| 29 | 2 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return AuthMethodInterface[] |
||
| 33 | */ |
||
| 34 | 1 | public function all(): array |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | public function create(string $authMethod): AuthMethodInterface |
|
| 50 |