From f34580d02b746fe68662538879b072455e950506 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 30 Aug 2023 09:48:17 +0900 Subject: [PATCH] docs: fix or remove @param php-cs-fixer has been modified to remove these tags. --- system/CLI/CLI.php | 2 +- system/Config/Services.php | 2 +- system/Database/BaseBuilder.php | 1 - system/Database/Migration.php | 4 ---- system/Database/Query.php | 2 -- system/Debug/Toolbar.php | 3 --- system/Encryption/Exceptions/EncryptionException.php | 2 -- system/Entity/Entity.php | 2 +- system/Format/Exceptions/FormatException.php | 2 +- system/HTTP/URI.php | 2 -- system/HTTP/UserAgent.php | 6 ------ system/Images/Handlers/BaseHandler.php | 2 -- system/Images/ImageHandlerInterface.php | 2 +- system/Log/Handlers/ChromeLoggerHandler.php | 2 -- system/Pager/Pager.php | 2 -- system/Router/RouteCollectionInterface.php | 7 ++++--- system/Test/DOMParser.php | 5 ----- system/Test/FeatureTestCase.php | 2 -- system/Test/FeatureTestTrait.php | 2 +- system/Validation/CreditCardRules.php | 2 -- system/Validation/FormatRules.php | 10 ---------- system/Validation/Rules.php | 4 ---- tests/_support/Config/Services.php | 2 +- 23 files changed, 11 insertions(+), 59 deletions(-) diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index 044f9dbbc8fd..112a662d35ac 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -177,7 +177,7 @@ public static function init() * Named options must be in the following formats: * php index.php user -v --v -name=John --name=John * - * @param string $prefix + * @param string $prefix You may specify a string with which to prompt the user. */ public static function input(?string $prefix = null): string { diff --git a/system/Config/Services.php b/system/Config/Services.php index 2a4596bf203c..720bb3c487ce 100644 --- a/system/Config/Services.php +++ b/system/Config/Services.php @@ -781,7 +781,7 @@ public static function toolbar(?ToolbarConfig $config = null, bool $getShared = /** * The URI class provides a way to model and manipulate URIs. * - * @param string $uri + * @param string|null $uri The URI string * * @return URI The current URI if $uri is null. */ diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index 07486cffaeec..302020323577 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -706,7 +706,6 @@ public function where($key, $value = null, ?bool $escape = null) * * @param array|RawSql|string $key * @param mixed $value - * @param bool $escape * * @return $this */ diff --git a/system/Database/Migration.php b/system/Database/Migration.php index 0f1ab2c74f2f..1616830f9267 100644 --- a/system/Database/Migration.php +++ b/system/Database/Migration.php @@ -41,8 +41,6 @@ abstract class Migration /** * Constructor. - * - * @param Forge $forge */ public function __construct(?Forge $forge = null) { @@ -53,8 +51,6 @@ public function __construct(?Forge $forge = null) /** * Returns the database group name this migration uses. - * - * @return string */ public function getDBGroup(): ?string { diff --git a/system/Database/Query.php b/system/Database/Query.php index 702575ca857c..a78190a21798 100644 --- a/system/Database/Query.php +++ b/system/Database/Query.php @@ -167,8 +167,6 @@ public function getQuery(): string * for it's start and end values. If no end value is present, will * use the current time to determine total duration. * - * @param float $end - * * @return $this */ public function setDuration(float $start, ?float $end = null) diff --git a/system/Debug/Toolbar.php b/system/Debug/Toolbar.php index d20125b9b5bd..19a67b455db3 100644 --- a/system/Debug/Toolbar.php +++ b/system/Debug/Toolbar.php @@ -346,9 +346,6 @@ protected function roundTo(float $number, int $increments = 5): float /** * Prepare for debugging.. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return void */ public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null) diff --git a/system/Encryption/Exceptions/EncryptionException.php b/system/Encryption/Exceptions/EncryptionException.php index d226fd5dd08b..41a96b69e34a 100644 --- a/system/Encryption/Exceptions/EncryptionException.php +++ b/system/Encryption/Exceptions/EncryptionException.php @@ -45,8 +45,6 @@ public static function forNoHandlerAvailable(string $handler) /** * Thrown when the handler requested is unknown. * - * @param string $driver - * * @return static */ public static function forUnKnownHandler(?string $driver = null) diff --git a/system/Entity/Entity.php b/system/Entity/Entity.php index 0481cc35823f..dd4f54c928bf 100644 --- a/system/Entity/Entity.php +++ b/system/Entity/Entity.php @@ -136,7 +136,7 @@ public function __construct(?array $data = null) * properties, using any `setCamelCasedProperty()` methods * that may or may not exist. * - * @param array $data + * @param array $data * * @return $this */ diff --git a/system/Format/Exceptions/FormatException.php b/system/Format/Exceptions/FormatException.php index cfe39d3b8307..55c36d3d23aa 100644 --- a/system/Format/Exceptions/FormatException.php +++ b/system/Format/Exceptions/FormatException.php @@ -36,7 +36,7 @@ public static function forInvalidFormatter(string $class) * Thrown in JSONFormatter when the json_encode produces * an error code other than JSON_ERROR_NONE and JSON_ERROR_RECURSION. * - * @param string $error + * @param string $error The error message * * @return static */ diff --git a/system/HTTP/URI.php b/system/HTTP/URI.php index fb9d780c1485..a149c4102f34 100644 --- a/system/HTTP/URI.php +++ b/system/HTTP/URI.php @@ -778,8 +778,6 @@ public function setHost(string $str) /** * Sets the port portion of the URI. * - * @param int $port - * * @return $this * * @TODO PSR-7: Should be `withPort($port)`. diff --git a/system/HTTP/UserAgent.php b/system/HTTP/UserAgent.php index 1ccc2109c119..02797b2d20c3 100644 --- a/system/HTTP/UserAgent.php +++ b/system/HTTP/UserAgent.php @@ -112,8 +112,6 @@ public function __construct(?UserAgents $config = null) /** * Is Browser - * - * @param string $key */ public function isBrowser(?string $key = null): bool { @@ -132,8 +130,6 @@ public function isBrowser(?string $key = null): bool /** * Is Robot - * - * @param string $key */ public function isRobot(?string $key = null): bool { @@ -152,8 +148,6 @@ public function isRobot(?string $key = null): bool /** * Is Mobile - * - * @param string $key */ public function isMobile(?string $key = null): bool { diff --git a/system/Images/Handlers/BaseHandler.php b/system/Images/Handlers/BaseHandler.php index 134c7c6ce1cd..cf23fd0fcd23 100644 --- a/system/Images/Handlers/BaseHandler.php +++ b/system/Images/Handlers/BaseHandler.php @@ -549,8 +549,6 @@ public function getEXIF(?string $key = null, bool $silent = false) * - bottom * - bottom-right * - * @param int $height - * * @return BaseHandler */ public function fit(int $width, ?int $height = null, string $position = 'center') diff --git a/system/Images/ImageHandlerInterface.php b/system/Images/ImageHandlerInterface.php index 2b924720d2dd..1c3593a99bd4 100644 --- a/system/Images/ImageHandlerInterface.php +++ b/system/Images/ImageHandlerInterface.php @@ -132,7 +132,7 @@ public function text(string $text, array $options = []); * $image->resize(100, 200, true) * ->save($target); * - * @param string $target + * @param string|null $target The path to save the file to. * * @return bool */ diff --git a/system/Log/Handlers/ChromeLoggerHandler.php b/system/Log/Handlers/ChromeLoggerHandler.php index 9ce30a822364..3354e5fb2db8 100644 --- a/system/Log/Handlers/ChromeLoggerHandler.php +++ b/system/Log/Handlers/ChromeLoggerHandler.php @@ -149,8 +149,6 @@ protected function format($object) /** * Attaches the header and the content to the passed in request object. * - * @param ResponseInterface $response - * * @return void */ public function sendLogs(?ResponseInterface &$response = null) diff --git a/system/Pager/Pager.php b/system/Pager/Pager.php index 2c666e2ce579..3a9f5a772f0a 100644 --- a/system/Pager/Pager.php +++ b/system/Pager/Pager.php @@ -387,8 +387,6 @@ public function only(array $queries): self /** * Ensures that an array exists for the group specified. * - * @param int $perPage - * * @return void */ protected function ensureGroup(string $group, ?int $perPage = null) diff --git a/system/Router/RouteCollectionInterface.php b/system/Router/RouteCollectionInterface.php index 0ca43523a89b..00f1d4c8bdc2 100644 --- a/system/Router/RouteCollectionInterface.php +++ b/system/Router/RouteCollectionInterface.php @@ -28,8 +28,9 @@ interface RouteCollectionInterface /** * Adds a single route to the collection. * - * @param array|Closure|string $to - * @param array $options + * @param string $from The route path (with placeholders or regex) + * @param array|Closure|string $to The route handler + * @param array|null $options The route options * * @return RouteCollectionInterface */ @@ -44,7 +45,7 @@ public function add(string $from, $to, ?array $options = null); * multiple placeholders added at once. * * @param array|string $placeholder - * @param string $pattern + * @param string|null $pattern The regex pattern * * @return RouteCollectionInterface */ diff --git a/system/Test/DOMParser.php b/system/Test/DOMParser.php index 5ab12e44ab29..54762643e38d 100644 --- a/system/Test/DOMParser.php +++ b/system/Test/DOMParser.php @@ -101,9 +101,6 @@ public function withFile(string $path) /** * Checks to see if the text is found within the result. - * - * @param string $search - * @param string $element */ public function see(?string $search = null, ?string $element = null): bool { @@ -121,8 +118,6 @@ public function see(?string $search = null, ?string $element = null): bool /** * Checks to see if the text is NOT found within the result. - * - * @param string $search */ public function dontSee(?string $search = null, ?string $element = null): bool { diff --git a/system/Test/FeatureTestCase.php b/system/Test/FeatureTestCase.php index 371e302c59ae..02835391ca48 100644 --- a/system/Test/FeatureTestCase.php +++ b/system/Test/FeatureTestCase.php @@ -51,8 +51,6 @@ class FeatureTestCase extends CIUnitTestCase * ['get', 'home', 'Home::index'] * ] * - * @param array $routes - * * @return $this */ protected function withRoutes(?array $routes = null) diff --git a/system/Test/FeatureTestTrait.php b/system/Test/FeatureTestTrait.php index b117a1d890ae..8243d806bcbc 100644 --- a/system/Test/FeatureTestTrait.php +++ b/system/Test/FeatureTestTrait.php @@ -39,7 +39,7 @@ trait FeatureTestTrait * ['get', 'home', 'Home::index'] * ] * - * @param array $routes + * @param array|null $routes Array to set routes * * @return $this */ diff --git a/system/Validation/CreditCardRules.php b/system/Validation/CreditCardRules.php index 9e18f4ef5cb9..8b0e3842a128 100644 --- a/system/Validation/CreditCardRules.php +++ b/system/Validation/CreditCardRules.php @@ -236,8 +236,6 @@ public function valid_cc_number(?string $ccNumber, string $type): bool /** * Checks the given number to see if the number passing a Luhn check. - * - * @param string $number */ protected function isValidLuhn(?string $number = null): bool { diff --git a/system/Validation/FormatRules.php b/system/Validation/FormatRules.php index bc4301c2a086..485b9efec2df 100644 --- a/system/Validation/FormatRules.php +++ b/system/Validation/FormatRules.php @@ -176,8 +176,6 @@ public function regex_match(?string $str, string $pattern): bool * timezone_identifiers_list function. * * @see http://php.net/manual/en/datetimezone.listidentifiers.php - * - * @param string $str */ public function timezone(?string $str = null): bool { @@ -189,8 +187,6 @@ public function timezone(?string $str = null): bool * * Tests a string for characters outside of the Base64 alphabet * as defined by RFC 2045 http://www.faqs.org/rfcs/rfc2045 - * - * @param string $str */ public function valid_base64(?string $str = null): bool { @@ -203,8 +199,6 @@ public function valid_base64(?string $str = null): bool /** * Valid JSON - * - * @param string $str */ public function valid_json(?string $str = null): bool { @@ -215,8 +209,6 @@ public function valid_json(?string $str = null): bool /** * Checks for a correctly formatted email address - * - * @param string $str */ public function valid_email(?string $str = null): bool { @@ -233,8 +225,6 @@ public function valid_email(?string $str = null): bool * * Example: * valid_emails[one@example.com,two@example.com] - * - * @param string $str */ public function valid_emails(?string $str = null): bool { diff --git a/system/Validation/Rules.php b/system/Validation/Rules.php index 1bb2c243ebf5..e85b7443088e 100644 --- a/system/Validation/Rules.php +++ b/system/Validation/Rules.php @@ -204,8 +204,6 @@ public function min_length(?string $str, string $val): bool /** * Does not equal the static value provided. - * - * @param string $str */ public function not_equals(?string $str, string $val): bool { @@ -214,8 +212,6 @@ public function not_equals(?string $str, string $val): bool /** * Value should not be within an array of values. - * - * @param string $value */ public function not_in_list(?string $value, string $list): bool { diff --git a/tests/_support/Config/Services.php b/tests/_support/Config/Services.php index e051ea8d6b24..379211712af9 100644 --- a/tests/_support/Config/Services.php +++ b/tests/_support/Config/Services.php @@ -28,7 +28,7 @@ class Services extends BaseServices /** * The URI class provides a way to model and manipulate URIs. * - * @param string $uri + * @param string|null $uri The URI string * * @return URI */