From 6cb7efe9edf4179a0307c186df2b260de4fbfd31 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 15 Oct 2023 18:46:22 +0100 Subject: [PATCH] #2407 - Remove redundant comments --- Library/Backend/FcallManager.php | 2 -- .../Operators/AbstractOperatorBuilder.php | 2 -- .../Builder/Operators/CastOperatorBuilder.php | 5 ---- .../Operators/UnaryOperatorBuilder.php | 7 ------ .../Builder/Statements/IfStatementBuilder.php | 5 ---- .../Statements/LetStatementBuilder.php | 5 ---- Library/Builder/StatementsBlockBuilder.php | 3 --- Library/Cache/Manager.php | 25 ------------------- Library/Code/ArgInfoDefinition.php | 1 - Library/GlobalConstant.php | 6 ++--- 10 files changed, 2 insertions(+), 59 deletions(-) diff --git a/Library/Backend/FcallManager.php b/Library/Backend/FcallManager.php index ffa27b55c..04c3ca61e 100644 --- a/Library/Backend/FcallManager.php +++ b/Library/Backend/FcallManager.php @@ -22,8 +22,6 @@ class FcallManager implements FcallManagerInterface protected array $requiredMacros = []; /** - * {@inheritdoc} - * * @param bool $static * @param int $doReturn tri-state: 0 -> no return value, 1 -> do return, 2 -> do return to given variable * @param int $paramCount diff --git a/Library/Builder/Operators/AbstractOperatorBuilder.php b/Library/Builder/Operators/AbstractOperatorBuilder.php index 4fad1c272..99a63335b 100644 --- a/Library/Builder/Operators/AbstractOperatorBuilder.php +++ b/Library/Builder/Operators/AbstractOperatorBuilder.php @@ -26,8 +26,6 @@ abstract class AbstractOperatorBuilder /** * Returns a builder definition. - * - * @return array */ abstract public function get(): array; } diff --git a/Library/Builder/Operators/CastOperatorBuilder.php b/Library/Builder/Operators/CastOperatorBuilder.php index e57e855e6..e211bca3e 100644 --- a/Library/Builder/Operators/CastOperatorBuilder.php +++ b/Library/Builder/Operators/CastOperatorBuilder.php @@ -38,11 +38,6 @@ public function __construct( $this->char = $char; } - /** - * Returns a builder definition. - * - * @return array - */ public function get(): array { return [ diff --git a/Library/Builder/Operators/UnaryOperatorBuilder.php b/Library/Builder/Operators/UnaryOperatorBuilder.php index e68231881..82e5106a1 100644 --- a/Library/Builder/Operators/UnaryOperatorBuilder.php +++ b/Library/Builder/Operators/UnaryOperatorBuilder.php @@ -20,8 +20,6 @@ class UnaryOperatorBuilder extends AbstractOperatorBuilder { /** * Operator name - * - * @var string */ protected string $operator; @@ -41,11 +39,6 @@ public function __construct(string $operator, $leftExpression, string $file = nu $this->char = $char; } - /** - * Returns a builder definition. - * - * @return array - */ public function get(): array { if (\is_object($this->leftExpression) && method_exists($this->leftExpression, 'get')) { diff --git a/Library/Builder/Statements/IfStatementBuilder.php b/Library/Builder/Statements/IfStatementBuilder.php index 44c36ea48..fbb5acebe 100644 --- a/Library/Builder/Statements/IfStatementBuilder.php +++ b/Library/Builder/Statements/IfStatementBuilder.php @@ -28,11 +28,6 @@ public function __construct( ) { } - /** - * Returns a builder definition. - * - * @return array - */ public function get(): array { $expression = [ diff --git a/Library/Builder/Statements/LetStatementBuilder.php b/Library/Builder/Statements/LetStatementBuilder.php index 721ce2a29..ff0417201 100644 --- a/Library/Builder/Statements/LetStatementBuilder.php +++ b/Library/Builder/Statements/LetStatementBuilder.php @@ -22,11 +22,6 @@ public function __construct(private array $assignments, private mixed $expr) { } - /** - * Returns a builder definition. - * - * @return array - */ public function get(): array { return [ diff --git a/Library/Builder/StatementsBlockBuilder.php b/Library/Builder/StatementsBlockBuilder.php index 5d155c0bf..9291e3c43 100644 --- a/Library/Builder/StatementsBlockBuilder.php +++ b/Library/Builder/StatementsBlockBuilder.php @@ -22,9 +22,6 @@ public function __construct(protected array $statements, protected bool $raw = f { } - /** - * Returns a builder definition. - */ public function get(): array { if ($this->raw) { diff --git a/Library/Cache/Manager.php b/Library/Cache/Manager.php index 16b6b7082..1ce933f32 100644 --- a/Library/Cache/Manager.php +++ b/Library/Cache/Manager.php @@ -20,35 +20,18 @@ */ class Manager { - /** - * @var FunctionCache|null - */ protected ?FunctionCache $functionCache = null; - /** - * @var MethodCache|null - */ protected ?MethodCache $methodCache = null; - /** - * @var StaticMethodCache|null - */ protected ?StaticMethodCache $staticMethodCache = null; - /** - * @var ClassEntryCache|null - */ protected ?ClassEntryCache $classEntryCache = null; - /** - * @var CallGathererPass|null - */ protected ?CallGathererPass $gatherer = null; /** * Sets the CallGathererPass. - * - * @param CallGathererPass|null $gatherer */ public function setGatherer(CallGathererPass $gatherer = null): void { @@ -57,8 +40,6 @@ public function setGatherer(CallGathererPass $gatherer = null): void /** * Creates or returns an existing class entry cache. - * - * @return ClassEntryCache */ public function getClassEntryCache(): ClassEntryCache { @@ -71,8 +52,6 @@ public function getClassEntryCache(): ClassEntryCache /** * Creates or returns an existing function cache. - * - * @return FunctionCache|null */ public function getFunctionCache(): ?FunctionCache { @@ -85,8 +64,6 @@ public function getFunctionCache(): ?FunctionCache /** * Creates or returns an existing method cache. - * - * @return MethodCache|null */ public function getMethodCache(): ?MethodCache { @@ -99,8 +76,6 @@ public function getMethodCache(): ?MethodCache /** * Creates or returns an existing method cache. - * - * @return StaticMethodCache|null */ public function getStaticMethodCache(): ?StaticMethodCache { diff --git a/Library/Code/ArgInfoDefinition.php b/Library/Code/ArgInfoDefinition.php index 6d91549d6..4a2fd02aa 100644 --- a/Library/Code/ArgInfoDefinition.php +++ b/Library/Code/ArgInfoDefinition.php @@ -18,7 +18,6 @@ use Zephir\CompilationContext; use Zephir\Exception; -use function array_key_exists; use function Zephir\escape_class; class ArgInfoDefinition diff --git a/Library/GlobalConstant.php b/Library/GlobalConstant.php index f818b9d2d..ccdb39366 100644 --- a/Library/GlobalConstant.php +++ b/Library/GlobalConstant.php @@ -9,6 +9,8 @@ * the LICENSE file that was distributed with this source code. */ +declare(strict_types=1); + namespace Zephir; /** @@ -25,8 +27,6 @@ public function __construct(protected string $name) /** * Returns global constant name. - * - * @return string */ public function getName(): string { @@ -35,8 +35,6 @@ public function getName(): string /** * Check if the global constant is temporal. - * - * @return bool */ public function isTemporal(): bool {