Skip to content

Commit

Permalink
Fix typo in var
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored Oct 29, 2023
1 parent fe471da commit 264d682
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/private/AppFramework/Utility/ControllerMethodReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ public function reflect($object, string $method) {
if ($docs !== false) {
// extract everything prefixed by @ and first letter uppercase
preg_match_all('/^\h+\*\h+@(?P<annotation>[A-Z]\w+)((?P<parameter>.*))?$/m', $docs, $matches);
foreach ($matches['annotation'] as $key => $annontation) {
$annontation = strtolower($annontation);
foreach ($matches['annotation'] as $key => $annotation) {
$annotation = strtolower($annotation);
$annotationValue = $matches['parameter'][$key];
if (isset($annotationValue[0]) && $annotationValue[0] === '(' && $annotationValue[\strlen($annotationValue) - 1] === ')') {
if (str_starts_with($annotationValue, '(') && str_ends_with($annotationValue, ')')) {
$cutString = substr($annotationValue, 1, -1);
$cutString = str_replace(' ', '', $cutString);
$splittedArray = explode(',', $cutString);
foreach ($splittedArray as $annotationValues) {
[$key, $value] = explode('=', $annotationValues);
$this->annotations[$annontation][$key] = $value;
$this->annotations[$annotation][$key] = $value;
}
continue;
}

$this->annotations[$annontation] = [$annotationValue];
$this->annotations[$annotation] = [$annotationValue];
}

// extract type parameter information
Expand Down

0 comments on commit 264d682

Please sign in to comment.