src/RepositoryTrait.php
private function getSupportedMethod(string $method): string
    {
        foreach (static::$supportedMethods as $supportedMethod) {
            if (\strpos($method, $supportedMethod) === 0) {
                return $supportedMethod;
            }
        }

        throw new \BadMethodCallException(\sprintf(
            'Undefined method "%s". Method call must start with one of "%s"!',
            $method,
            \implode('", "', static::$supportedMethods)
        ));
    }
private function getSupportedMethod(string $method): string
    {
        foreach (static::$supportedMethods as $supportedMethod) {
            if (\strpos($method, $supportedMethod) === 0) {
                return $supportedMethod;
            }
        }

        throw new \BadMethodCallException(\sprintf(
            'Undefined method "%s". Method call must start with one of "%s"!',
            $method,
            \implode('", "', static::$supportedMethods)
        ));
    }
Get supported magic method.

@param string $method

@throws \BadMethodCallException

@return string