src/Mock/Builder/MockBuilder.php
public function addStaticMethod(
        string $name,
        callable $callback = null
    ): self {
        if ($this->isFinalized) {
            throw new FinalizedMockException();
        }
        if (!$callback) {
            $callback = $this->emptyCallback;
        }

        $this->customStaticMethods[$name] = [
            $callback,
            $this->invocableInspector->callbackReflector($callback),
        ];

        return $this;
    }
public function addStaticMethod(
        string $name,
        callable $callback = null
    ): self {
        if ($this->isFinalized) {
            throw new FinalizedMockException();
        }
        if (!$callback) {
            $callback = $this->emptyCallback;
        }

        $this->customStaticMethods[$name] = [
            $callback,
            $this->invocableInspector->callbackReflector($callback),
        ];

        return $this;
    }
public function addStaticMethod ( string $ name , callable $ callback = null ) : self { if ( $ this -> isFinalized ) { throw new FinalizedMockException ( ) ; } if ( ! $ callback ) { $ callback = $ this -> emptyCallback ; } $ this -> customStaticMethods [ $ name ] = [ $ callback , $ this -> invocableInspector -> callbackReflector ( $ callback ) , ] ; return $ this ; }
Add a custom static method.

@param string        $name     The name.
@param callable|null $callback The callback.

@return $this         This builder.
@throws MockException If this builder is already finalized.
Add a custom static method .