private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars)
    {
        foreach ($singulars as $singular) {
            $addMethod = 'add'.$singular;
            $removeMethod = 'remove'.$singular;

            $addMethodFound = $this->isMethodAccessible($reflClass, $addMethod, 1);
            $removeMethodFound = $this->isMethodAccessible($reflClass, $removeMethod, 1);

            if ($addMethodFound && $removeMethodFound) {
                return array($addMethod, $removeMethod);
            }
        }

        return null;
    }
private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars)
    {
        foreach ($singulars as $singular) {
            $addMethod = 'add'.$singular;
            $removeMethod = 'remove'.$singular;

            $addMethodFound = $this->isMethodAccessible($reflClass, $addMethod, 1);
            $removeMethodFound = $this->isMethodAccessible($reflClass, $removeMethod, 1);

            if ($addMethodFound && $removeMethodFound) {
                return array($addMethod, $removeMethod);
            }
        }

        return null;
    }
private function findAdderAndRemover ( \ ReflectionClass $ reflClass , array $ singulars ) { foreach ( $ singulars as $ singular ) { $ addMethod = 'add' . $ singular ; $ removeMethod = 'remove' . $ singular ; $ addMethodFound = $ this -> isMethodAccessible ( $ reflClass , $ addMethod , 1 ) ; $ removeMethodFound = $ this -> isMethodAccessible ( $ reflClass , $ removeMethod , 1 ) ; if ( $ addMethodFound && $ removeMethodFound ) { return array ( $ addMethod , $ removeMethod ) ; } } return null ; }
Searches for add and remove methods.

Part of the Symfony package. Symfony license applies.

@param \ReflectionClass $reflClass The reflection class for the given object
@param array            $singulars The singular form of the property name or null

@return array|null An array containing the adder and remover when found, null otherwise
Searches for add and remove methods .