Eloquent\Phony\Spy\IterableSpyFactory::instance PHP Method

instance() public static method

Get the static instance of this factory.
public static instance ( ) : IterableSpyFactory
return IterableSpyFactory The static factory.
    public static function instance()
    {
        if (!self::$instance) {
            self::$instance = new self(CallEventFactory::instance());
        }
        return self::$instance;
    }

Usage Example

Beispiel #1
0
 /**
  * Get the static instance of this factory.
  *
  * @return SpyFactory The static factory.
  */
 public static function instance()
 {
     if (!self::$instance) {
         self::$instance = new self(Sequencer::sequence('spy-label'), CallFactory::instance(), Invoker::instance(), GeneratorSpyFactory::instance(), IterableSpyFactory::instance());
     }
     return self::$instance;
 }