src/MongolidModel.php
protected static function callMockOrParent(string $method, array $arguments)
    {
        $classToCall = 'parent';
        $class = get_called_class();
        $mock = static::$mock[$class] ?? null;

        if ($mock && $mock->mockery_getExpectationsFor($method)) {
            $classToCall = $mock;
        }

        return call_user_func_array([$classToCall, $method], $arguments);
    }
protected static function callMockOrParent(string $method, array $arguments)
    {
        $classToCall = 'parent';
        $class = get_called_class();
        $mock = static::$mock[$class] ?? null;

        if ($mock && $mock->mockery_getExpectationsFor($method)) {
            $classToCall = $mock;
        }

        return call_user_func_array([$classToCall, $method], $arguments);
    }
protected static function callMockOrParent ( string $ method , array $ arguments ) { $ classToCall = 'parent' ; $ class = get_called_class ( ) ; $ mock = static :: $ mock [ $ class ] ?? null ; if ( $ mock && $ mock -> mockery_getExpectationsFor ( $ method ) ) { $ classToCall = $ mock ; } return call_user_func_array ( [ $ classToCall , $ method ] , $ arguments ) ; }
Calls mock method if its have expectations. Calls parent method otherwise.

@param string $method    name of the method being called
@param array  $arguments arguments to pass in method call

@return mixed See parent implementation
Calls mock method if its have expectations . Calls parent method otherwise .