| @@ 14-23 (lines=10) @@ | ||
| 11 | /** @var string[] */ |
|
| 12 | private $names = array(); |
|
| 13 | ||
| 14 | public function __construct(array $names) |
|
| 15 | { |
|
| 16 | foreach($names as $name) { |
|
| 17 | if(false === is_string($name)) { |
|
| 18 | throw new \InvalidArgumentException('Expected array of strings!'); |
|
| 19 | } |
|
| 20 | ||
| 21 | $this->names[] = $name; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| 25 | public function __invoke(FilterShortcodesEvent $event) |
|
| 26 | { |
|
| @@ 14-23 (lines=10) @@ | ||
| 11 | /** @var string[] */ |
|
| 12 | private $names = array(); |
|
| 13 | ||
| 14 | public function __construct(array $names) |
|
| 15 | { |
|
| 16 | foreach($names as $name) { |
|
| 17 | if(false === is_string($name)) { |
|
| 18 | throw new \InvalidArgumentException('Expected array of strings!'); |
|
| 19 | } |
|
| 20 | ||
| 21 | $this->names[] = $name; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| 25 | public function __invoke(ReplaceShortcodesEvent $event) |
|
| 26 | { |
|