public static function isAttributeProperty($class, $propertyName)
{
if ($annotations = self::propertyAnnotations($class, $propertyName)) {
return array_key_exists('attribute', $annotations);
}
return false;
}
/** * @test */ public function testGetAttributeType() { $this->assertEquals(true, PPUtils::isAttributeProperty('MockReflectionTestType', 'currencyID')); $this->assertEquals(false, PPUtils::isAttributeProperty('MockReflectionTestType', 'value')); $this->assertEquals(false, PPUtils::isAttributeProperty('MockReflectionTestType', 'noAnnotations')); }