Commit dceb9d80 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Corrections PHPMD.

parent 7737a382
...@@ -47,9 +47,6 @@ class PropertyMetadataFactory ...@@ -47,9 +47,6 @@ class PropertyMetadataFactory
/** @var ClassName */ /** @var ClassName */
private $resource; private $resource;
/** @var bool */
private $normalization;
/** @var string */ /** @var string */
private $mode; private $mode;
...@@ -89,9 +86,11 @@ class PropertyMetadataFactory ...@@ -89,9 +86,11 @@ class PropertyMetadataFactory
} }
/** /**
* @param ClassName $class * @param ClassName $class
* @param string $propertyName * @param string $propertyName
* @param APIPropertyMetadata $propertyMeta *
* @throws ResourceClassNotFoundException
* @throws \ApiPlatform\Core\Exception\PropertyNotFoundException
* *
* @return PropertyMetadata * @return PropertyMetadata
*/ */
......
...@@ -168,6 +168,8 @@ final class ClassInfo implements ClassName ...@@ -168,6 +168,8 @@ final class ClassInfo implements ClassName
/** /**
* @param ClassInfo $child * @param ClassInfo $child
*
* @SuppressWarnings(PHPMD.UnusedPrivateMethod)
*/ */
private function addChild(ClassInfo $child): void private function addChild(ClassInfo $child): void
{ {
...@@ -359,6 +361,7 @@ final class ClassInfo implements ClassName ...@@ -359,6 +361,7 @@ final class ClassInfo implements ClassName
* Get properties. * Get properties.
* *
* @return HasName[] * @return HasName[]
* @SuppressWarnings(PHPMD.UnusedPrivateMethod)
*/ */
private function getAllConcreteProperties(): array private function getAllConcreteProperties(): array
{ {
......
...@@ -121,7 +121,7 @@ final class PHPClass implements ClassName ...@@ -121,7 +121,7 @@ final class PHPClass implements ClassName
if (!preg_match('/^\\\\?((?:\w+\\\\)*)(\w+)$/i', $name, $groups)) { if (!preg_match('/^\\\\?((?:\w+\\\\)*)(\w+)$/i', $name, $groups)) {
throw new InvalidArgumentException("Invalid PHP class name: $name"); throw new InvalidArgumentException("Invalid PHP class name: $name");
} }
[, $namespace, $baseName] = $groups; list(, $namespace, $baseName) = $groups;
$instances[$name] = new self($namespace, $baseName); $instances[$name] = new self($namespace, $baseName);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment