src/Mock/Builder/MockBuilder.php
public function get(): Mock
    {
        if ($this->mock) {
            return $this->mock;
        }

        $this->mock = $this->factory->createFullMock($this->build());

        return $this->mock;
    }
public function get(): Mock
    {
        if ($this->mock) {
            return $this->mock;
        }

        $this->mock = $this->factory->createFullMock($this->build());

        return $this->mock;
    }
public function get ( ) : Mock { if ( $ this -> mock ) { return $ this -> mock ; } $ this -> mock = $ this -> factory -> createFullMock ( $ this -> build ( ) ) ; return $ this -> mock ; }
Get a mock.

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.

@return Mock          The mock instance.
@throws MockException If the mock generation fails.
Get a mock .