src/ReflectionGenerator.php
public function generate(PackageClass $package_class)
    {
        $parent              = $this->getParentClass($package_class);
        $class_name          = $package_class->getShortName();
        $generated_namespace = $package_class->getGeneratedNamespaceName();
        $methods             = $this->getMethods($package_class);

        $params = [
            'class_name'  => $class_name,
            'namespace'   => $generated_namespace,
            'methods'     => $methods,
            'parent'      => $parent ? $parent->getShortName() : null,
        ];

        $interface = $this->environment->render('interface.php.twig', $params);
        $path      = $package_class->getGeneratedDirectory();
        $this->filesystem->dumpFile($path . $class_name . 'Interface.php', $interface);
    }
public function generate(PackageClass $package_class)
    {
        $parent              = $this->getParentClass($package_class);
        $class_name          = $package_class->getShortName();
        $generated_namespace = $package_class->getGeneratedNamespaceName();
        $methods             = $this->getMethods($package_class);

        $params = [
            'class_name'  => $class_name,
            'namespace'   => $generated_namespace,
            'methods'     => $methods,
            'parent'      => $parent ? $parent->getShortName() : null,
        ];

        $interface = $this->environment->render('interface.php.twig', $params);
        $path      = $package_class->getGeneratedDirectory();
        $this->filesystem->dumpFile($path . $class_name . 'Interface.php', $interface);
    }
public function generate ( PackageClass $ package_class ) { $ parent = $ this -> getParentClass ( $ package_class ) ; $ class_name = $ package_class -> getShortName ( ) ; $ generated_namespace = $ package_class -> getGeneratedNamespaceName ( ) ; $ methods = $ this -> getMethods ( $ package_class ) ; $ params = [ 'class_name' => $ class_name , 'namespace' => $ generated_namespace , 'methods' => $ methods , 'parent' => $ parent ? $ parent -> getShortName ( ) : null , ] ; $ interface = $ this -> environment -> render ( 'interface.php.twig' , $ params ) ; $ path = $ package_class -> getGeneratedDirectory ( ) ; $ this -> filesystem -> dumpFile ( $ path . $ class_name . 'Interface.php' , $ interface ) ; }
Generates the interface

@param PackageClass $package_class
@throws Error
Generates the interface