Code Duplication    Length = 10-10 lines in 2 locations

src/Internal/ReflectionFunctionFactory.php 1 location

@@ 12-21 (lines=10) @@
9
     */
10
    private $reflectionFunction;
11
12
    public function __construct($name)
13
    {
14
        if (!is_string($name) && !is_a($name, 'Closure', true)) {
15
            throw Exception\ReflectionExceptionFactory::invalidArgument(
16
                sprintf("Parameter 1 of %s must be a string or instance of \\Closure", __METHOD__)
17
            );
18
        }
19
20
        $this->reflectionFunction = new \ReflectionFunction($name);
21
    }
22
23
    public static function create($name)
24
    {

src/Internal/ReflectionPropertyFactory.php 1 location

@@ 12-21 (lines=10) @@
9
     */
10
    private $reflectionProperty;
11
12
    public function __construct($class, $name)
13
    {
14
        if (!is_string($class) && !class_exists($class)) {
15
            throw Exception\ReflectionExceptionFactory::invalidArgument(
16
                sprintf("Parameter 1 of %s must be either string and valid class name.", __METHOD__)
17
            );
18
        }
19
20
        $this->reflectionProperty = new \ReflectionProperty($class, $name);
21
    }
22
23
    public static function create($class, $name)
24
    {