diff --git a/src/Analysers/ComposerAutoloaderScanner.php b/src/Analysers/ComposerAutoloaderScanner.php index d604f56a9..572c264d6 100644 --- a/src/Analysers/ComposerAutoloaderScanner.php +++ b/src/Analysers/ComposerAutoloaderScanner.php @@ -17,7 +17,11 @@ class ComposerAutoloaderScanner { /** - * Collect all classes/interfaces/traits known by autoloaders. + * Collect all classes/interfaces/traits known by composer. + * + * @param array $namespaces + * + * @return array */ public function scan(array $namespaces): array { diff --git a/src/Analysers/DocBlockParser.php b/src/Analysers/DocBlockParser.php index 407dd3994..590b8e6dd 100644 --- a/src/Analysers/DocBlockParser.php +++ b/src/Analysers/DocBlockParser.php @@ -7,6 +7,7 @@ namespace OpenApi\Analysers; use Doctrine\Common\Annotations\DocParser; +use OpenApi\Annotations\AbstractAnnotation; use OpenApi\Context; use OpenApi\Generator; @@ -20,6 +21,9 @@ class DocBlockParser */ protected $docParser; + /** + * @param array $aliases + */ public function __construct(array $aliases = []) { $docParser = new DocParser(); @@ -28,6 +32,9 @@ public function __construct(array $aliases = []) $this->docParser = $docParser; } + /** + * @param array $aliases + */ public function setAliases(array $aliases): void { $this->docParser->setImports($aliases); @@ -39,7 +46,7 @@ public function setAliases(array $aliases): void * @param string $comment a T_DOC_COMMENT * @param Context $context * - * @return array Annotations + * @return array */ public function fromComment(string $comment, Context $context): array { diff --git a/src/Analysers/ReflectionAnalyser.php b/src/Analysers/ReflectionAnalyser.php index e3d030147..bd916dd54 100644 --- a/src/Analysers/ReflectionAnalyser.php +++ b/src/Analysers/ReflectionAnalyser.php @@ -27,6 +27,9 @@ class ReflectionAnalyser implements AnalyserInterface /** @var Generator|null */ protected $generator; + /** + * @param array $annotationFactories + */ public function __construct(array $annotationFactories = []) { $this->annotationFactories = $annotationFactories; diff --git a/src/Analysers/TokenScanner.php b/src/Analysers/TokenScanner.php index 9a74162a8..1df38be34 100644 --- a/src/Analysers/TokenScanner.php +++ b/src/Analysers/TokenScanner.php @@ -215,6 +215,9 @@ protected function nextToken(array &$tokens) return $token; } + /** + * @return array + */ protected function resolveFQN(array $names, string $namespace, array $uses): array { $resolve = function ($name) use ($namespace, $uses) { diff --git a/src/Annotations/Attachable.php b/src/Annotations/Attachable.php index 5cb64efe1..7a7ab9982 100644 --- a/src/Annotations/Attachable.php +++ b/src/Annotations/Attachable.php @@ -64,7 +64,7 @@ class Attachable extends AbstractAnnotation * Container to allow custom annotations that are limited to a subset of potential parent * annotation classes. * - * @return array List of valid parent annotation classes. If `null`` the default nesting rules apply. + * @return array|null List of valid parent annotation classes. If `null`, the default nesting rules apply. */ public function allowedParents(): ?array { diff --git a/src/Generator.php b/src/Generator.php index 5fe4df535..1c9919a74 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -129,6 +129,9 @@ public static function isDefault($value): bool return $value === Generator::UNDEFINED; } + /** + * @return array + */ public function getAliases(): array { return $this->aliases; @@ -148,6 +151,9 @@ public function setAliases(array $aliases): Generator return $this; } + /** + * @return array|null + */ public function getNamespaces(): ?array { return $this->namespaces;