src/Plugin/Double.php
public static function classname($options = [])
    {
        $defaults = ['class' => 'Kahlan\Spec\Plugin\Double\Double' . static::$_index++];
        $options += $defaults;

        if (!static::$_pointcut) {
            $pointcut = static::$_classes['pointcut'];
            static::$_pointcut = new $pointcut();
        }

        if (!class_exists($options['class'], false)) {
            $parser = static::$_classes['parser'];
            $code = static::generate($options);
            $nodes = $parser::parse($code);
            $code = $parser::unparse(static::$_pointcut->process($nodes));
            eval('?>' . $code);
        }
        return $options['class'];
    }
public static function classname($options = [])
    {
        $defaults = ['class' => 'Kahlan\Spec\Plugin\Double\Double' . static::$_index++];
        $options += $defaults;

        if (!static::$_pointcut) {
            $pointcut = static::$_classes['pointcut'];
            static::$_pointcut = new $pointcut();
        }

        if (!class_exists($options['class'], false)) {
            $parser = static::$_classes['parser'];
            $code = static::generate($options);
            $nodes = $parser::parse($code);
            $code = $parser::unparse(static::$_pointcut->process($nodes));
            eval('?>' . $code);
        }
        return $options['class'];
    }
public static function classname ( $ options = [ ] ) { $ defaults = [ 'class' => 'Kahlan\Spec\Plugin\Double\Double' . static :: $ _index ++ ] ; $ options += $ defaults ; if ( ! static :: $ _pointcut ) { $ pointcut = static :: $ _classes [ 'pointcut' ] ; static :: $ _pointcut = new $ pointcut ( ) ; } if ( ! class_exists ( $ options [ 'class' ] , false ) ) { $ parser = static :: $ _classes [ 'parser' ] ; $ code = static :: generate ( $ options ) ; $ nodes = $ parser :: parse ( $ code ) ; $ code = $ parser :: unparse ( static :: $ _pointcut -> process ( $ nodes ) ) ; eval ( '?>' . $ code ) ; } return $ options [ 'class' ] ; }
Creates a polyvalent static class.

@param  array  $options Array of options. Options are:
- `'class'` : the fully-namespaced class name.
- `'extends'` : the fully-namespaced parent class name.
@return string          The created fully-namespaced class name.
Creates a polyvalent static class .