LeanMapper\Entity::checkMethodArgumentsCount PHP Метод

checkMethodArgumentsCount() приватный Метод

private checkMethodArgumentsCount ( integer $expectedCount, array $arguments, string $methodName )
$expectedCount integer
$arguments array
$methodName string
    private function checkMethodArgumentsCount($expectedCount, array $arguments, $methodName)
    {
        if (count($arguments) !== $expectedCount) {
            if ($expectedCount === 0) {
                throw new InvalidMethodCallException("Method '{$methodName}' in entity " . get_called_class() . " doesn't expect any arguments.");
            } else {
                throw new InvalidMethodCallException("Method '{$methodName}' in entity " . get_called_class() . " expects exactly {$expectedCount} argument" . ($expectedCount > 1 ? 's' : '') . '.');
            }
        }
    }