[PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn't exist
This commit is contained in:
parent
3223c2517e
commit
73db0ec7b4
@ -189,7 +189,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
||||
break;
|
||||
|
||||
default:
|
||||
$data = array(null, null);
|
||||
$data = array(null, null, null);
|
||||
}
|
||||
|
||||
return $this->docBlocks[$propertyHash] = $data;
|
||||
|
@ -67,6 +67,7 @@ class PhpDocExtractorTest extends \PHPUnit_Framework_TestCase
|
||||
array('d', array(new Type(Type::BUILTIN_TYPE_BOOL)), null, null),
|
||||
array('e', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))), null, null),
|
||||
array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null),
|
||||
array('donotexist', null, null, null),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ class ReflectionExtractorTest extends \PHPUnit_Framework_TestCase
|
||||
array('d', array(new Type(Type::BUILTIN_TYPE_BOOL))),
|
||||
array('e', null),
|
||||
array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')))),
|
||||
array('donotexist', null),
|
||||
);
|
||||
}
|
||||
|
||||
@ -89,6 +90,7 @@ class ReflectionExtractorTest extends \PHPUnit_Framework_TestCase
|
||||
array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))),
|
||||
array('bar', array(new Type(Type::BUILTIN_TYPE_INT))),
|
||||
array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))),
|
||||
array('donotexist', null),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user