Eloquent\Phony\Mock\Builder\MockBuilder::get PHP Метод

get() публичный Метод

This method will return the current mock, only creating a new mock if no existing mock is available. If no existing mock is available, the created mock will be a full mock. Calling this method will finalize the mock builder.
public get ( ) : Eloquent\Phony\Mock\Mock
Результат Eloquent\Phony\Mock\Mock The mock instance.
    public function get()
    {
        if ($this->mock) {
            return $this->mock;
        }
        $this->mock = $this->factory->createFullMock($this->build());
        return $this->mock;
    }