diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 718f72be4..fabdbfdec 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -29,30 +29,21 @@ - - - - - - - - */tests/Common/Util/ClassUtilsTest.php + tests/Common/Util/ClassUtilsTest.php - - - - - + + + tests - */tests/Common/Util/ClassUtilsTest.php + tests/Common/Util/ClassUtilsTest.php - */tests/* + tests/* diff --git a/src/Proxy/Exception/InvalidArgumentException.php b/src/Proxy/Exception/InvalidArgumentException.php index 50f1f1cf8..f6eeb85b1 100644 --- a/src/Proxy/Exception/InvalidArgumentException.php +++ b/src/Proxy/Exception/InvalidArgumentException.php @@ -17,9 +17,7 @@ */ class InvalidArgumentException extends BaseInvalidArgumentException implements ProxyException { - /** - * @return self - */ + /** @return self */ public static function proxyDirectoryRequired() { return new self('You must configure a proxy directory. See docs for details'); @@ -47,17 +45,13 @@ public static function invalidPlaceholder($name) return new self(sprintf('Provided placeholder for "%s" must be either a string or a valid callable', $name)); } - /** - * @return self - */ + /** @return self */ public static function proxyNamespaceRequired() { return new self('You must configure a proxy namespace'); } - /** - * @return self - */ + /** @return self */ public static function unitializedProxyExpected(Proxy $proxy) { return new self(sprintf('Provided proxy of type "%s" must not be initialized.', get_class($proxy))); @@ -97,9 +91,7 @@ public static function classMustNotBeFinal($className) return new self(sprintf('Unable to create a proxy for a final class "%s".', $className)); } - /** - * @param mixed $value - */ + /** @param mixed $value */ public static function invalidAutoGenerateMode($value): self { return new self(sprintf('Invalid auto generate mode "%s" given.', $value)); diff --git a/src/Proxy/ProxyGenerator.php b/src/Proxy/ProxyGenerator.php index 0714d3884..70d64bed1 100644 --- a/src/Proxy/ProxyGenerator.php +++ b/src/Proxy/ProxyGenerator.php @@ -346,9 +346,7 @@ public function generateProxyClass(ClassMetadata $class, $fileName = false) rename($tmpFileName, $fileName); } - /** - * @throws InvalidArgumentException - */ + /** @throws InvalidArgumentException */ private function verifyClassCanBeProxied(ClassMetadata $class) { if ($class->getReflectionClass()->isFinal()) { @@ -1099,9 +1097,7 @@ private function buildParametersString(array $parameters, array $renameParameter return implode(', ', $parameterDefinitions); } - /** - * @return string|null - */ + /** @return string|null */ private function getParameterType(ReflectionParameter $parameter) { if (! $parameter->hasType()) { @@ -1115,9 +1111,7 @@ private function getParameterType(ReflectionParameter $parameter) return $this->formatType($parameter->getType(), $declaringFunction, $parameter); } - /** - * @return string - */ + /** @return string */ private function getParameterDefaultValue(ReflectionParameter $parameter) { if (! $parameter->isDefaultValueAvailable()) { @@ -1171,9 +1165,7 @@ static function (ReflectionParameter $parameter) { ); } - /** - * @return string - */ + /** @return string */ private function getMethodReturnType(ReflectionMethod $method) { if (! $method->hasReturnType()) { @@ -1183,9 +1175,7 @@ private function getMethodReturnType(ReflectionMethod $method) return ': ' . $this->formatType($method->getReturnType(), $method); } - /** - * @return bool - */ + /** @return bool */ private function shouldProxiedMethodReturn(ReflectionMethod $method) { if (! $method->hasReturnType()) { @@ -1199,9 +1189,7 @@ private function shouldProxiedMethodReturn(ReflectionMethod $method) ); } - /** - * @return string - */ + /** @return string */ private function formatType( ReflectionType $type, ReflectionMethod $method,