numberOfParameters = 0; } /** * @param string $property the name of the property * @return bool * @throws InvalidArgumentException */ public function filter($property) { try { $reflectionMethod = new ReflectionMethod($property); } catch (ReflectionException $exception) { throw new InvalidArgumentException( "Method $property doesn't exist" ); } if ($reflectionMethod->getNumberOfParameters() !== $this->numberOfParameters) { return false; } return true; } }