src/PropertyInfo/Extractors/ReflectionExtractor.php
private function getAccessorMethod($class, $property)
    {
        $ucProperty = ucfirst($property);

        foreach (self::$accessorPrefixes as $prefix) {
            try {
                $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty);

                if (0 === $reflectionMethod->getNumberOfRequiredParameters()) {
                    return array($reflectionMethod, $prefix);
                }
            } catch (\ReflectionException $reflectionException) {
                // Return null if the property doesn't exist
            }
        }

        return;
    }
private function getAccessorMethod($class, $property)
    {
        $ucProperty = ucfirst($property);

        foreach (self::$accessorPrefixes as $prefix) {
            try {
                $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty);

                if (0 === $reflectionMethod->getNumberOfRequiredParameters()) {
                    return array($reflectionMethod, $prefix);
                }
            } catch (\ReflectionException $reflectionException) {
                // Return null if the property doesn't exist
            }
        }

        return;
    }
Gets the accessor method.

Returns an array with a the instance of \ReflectionMethod as first key
and the prefix of the method as second or null if not found.

@param string $class
@param string $property

@return array|null