public function getConstructor() : ReflectionMethod
    {
        $constructors = array_filter($this->getMethods(), static function (ReflectionMethod $method) : bool {
            return $method->isConstructor();
        });

        if (! isset($constructors[0])) {
            throw new OutOfBoundsException('Could not find method: __construct');
        }

        return $constructors[0];
    }
public function getConstructor() : ReflectionMethod
    {
        $constructors = array_filter($this->getMethods(), static function (ReflectionMethod $method) : bool {
            return $method->isConstructor();
        });

        if (! isset($constructors[0])) {
            throw new OutOfBoundsException('Could not find method: __construct');
        }

        return $constructors[0];
    }
public function getConstructor ( ) : ReflectionMethod { $ constructors = array_filter ( $ this -> getMethods ( ) , static function ( ReflectionMethod $ method ) : bool { return $ method -> isConstructor ( ) ; } ) ; if ( ! isset ( $ constructors [ 0 ] ) ) { throw new OutOfBoundsException ( 'Could not find method: __construct' ) ; } return $ constructors [ 0 ] ; }
Get the constructor method for this class.

@throws OutOfBoundsException
Get the constructor method for this class .