Add isset() as it can be an empty result

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-04-12 21:37:10 +02:00
parent d729bde98c
commit 511524c668
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class ControllerMethodReflector implements IControllerMethodReflector {
preg_match_all('/^\h+\*\h+@(?P<annotation>[A-Z]\w+)((?P<parameter>.*))?$/m', $docs, $matches);
foreach($matches['annotation'] as $key => $annontation) {
$annotationValue = $matches['parameter'][$key];
if($annotationValue[0] === '(' && $annotationValue[strlen($annotationValue) - 1] === ')') {
if(isset($annotationValue[0]) && $annotationValue[0] === '(' && $annotationValue[strlen($annotationValue) - 1] === ')') {
$cutString = substr($annotationValue, 1, -1);
$cutString = str_replace(' ', '', $cutString);
$splittedArray = explode(',', $cutString);