protected function validateMethodAttribute(AttributeAnnotation $annotation, \ReflectionMethod $method)
    {
        if (! $method->isPublic()) {
            throw new \LogicException(sprintf(
                'Attribute annotation can be applied only to non public method "%s".',
                $method->getName()
            ));
        }

        if ($annotation->getter !== null) {
            throw new \LogicException(sprintf(
                'The "getter" property of Attribute annotation applied to method "%s" is useless.',
                $method->getName()
            ));
        }
    }
protected function validateMethodAttribute(AttributeAnnotation $annotation, \ReflectionMethod $method)
    {
        if (! $method->isPublic()) {
            throw new \LogicException(sprintf(
                'Attribute annotation can be applied only to non public method "%s".',
                $method->getName()
            ));
        }

        if ($annotation->getter !== null) {
            throw new \LogicException(sprintf(
                'The "getter" property of Attribute annotation applied to method "%s" is useless.',
                $method->getName()
            ));
        }
    }
protected function validateMethodAttribute ( AttributeAnnotation $ annotation , \ ReflectionMethod $ method ) { if ( ! $ method -> isPublic ( ) ) { throw new \ LogicException ( sprintf ( 'Attribute annotation can be applied only to non public method "%s".' , $ method -> getName ( ) ) ) ; } if ( $ annotation -> getter !== null ) { throw new \ LogicException ( sprintf ( 'The "getter" property of Attribute annotation applied to method "%s" is useless.' , $ method -> getName ( ) ) ) ; } }
Validate method with attribute definition

@param  AttributeAnnotation $annotation
@param  \ReflectionMethod   $method
@throws \LogicException
Validate method with attribute definition