for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of PHPinnacle/Ensign.
*
* (c) PHPinnacle Team <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types = 1);
namespace PHPinnacle\Ensign\Arguments;
final class ObjectArguments extends ReflectionArguments
{
* @var object[]
private $objects;
* @param array $objects
public function __construct(array $objects)
$this->objects = \array_filter($objects, '\is_object');
}
* {@inheritdoc}
protected function resolveArgument(\ReflectionClass $class)
return $this->objects[$class->getName()] ?? null;