for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cekta\DI;
use ReflectionClass;
use ReflectionException;
class Reflection
{
/**
* @var Reflection\MethodService
*/
private $reflectionMethod;
public function __construct()
$this->reflectionMethod = new Reflection\MethodService();
}
* @param string $name
* @return string[]
* @internal
public function getDependencies(string $name): array
try {
$class = new ReflectionClass($name);
return $this->reflectionMethod->findDependencies($class->getConstructor());
} catch (ReflectionException $exception) {
return [];
* @return bool
public function isInstantiable(string $name): bool
return $class->isInstantiable();
return false;