Eloquent\Phony\Mock\Builder\MockBuilder::build PHP Method

build() public method

Calling this method will finalize the mock builder.
public build ( boolean $createNew = false ) : ReflectionClass
$createNew boolean True if a new class should be created even when a compatible one exists.
return ReflectionClass The class.
    public function build($createNew = false)
    {
        if (!$this->class) {
            $this->class = $this->factory->createMockClass($this->definition(), $createNew);
        }
        return $this->class;
    }