From f8abe9e1ac3d35710001a88b0e52afb8f7abece6 Mon Sep 17 00:00:00 2001 From: Dmitry <45711841+darkdi@users.noreply.github.com> Date: Wed, 5 Aug 2026 05:34:48 +0300 Subject: [PATCH 1/2] Fix @param names that do not match the signatures Twenty entries across sixteen files name an argument the method does not take: mostly renames the docblock did not follow, plus a few tags for parameters that were removed, and one modifier documenting one argument where three are taken. Docblocks only. --- src/Assets/Asset.php | 1 - src/Assets/AssetContainer.php | 2 +- src/Assets/AssetFolder.php | 2 +- src/Auth/File/User.php | 2 +- src/CP/Navigation/NavBuilder.php | 1 - src/Console/Commands/MakeWidget.php | 2 -- src/Console/Processes/Process.php | 2 +- src/Contracts/Forms/Form.php | 2 +- src/Contracts/Forms/Submission.php | 3 +-- src/Contracts/View/Antlers/Parser.php | 2 +- .../Controllers/CP/Updater/UpdateProductController.php | 4 ++-- src/Http/Controllers/GlideController.php | 2 +- src/Imaging/GlideUrlBuilder.php | 1 - src/Modifiers/CoreModifiers.php | 7 ++++--- src/StaticCaching/Cachers/AbstractCacher.php | 2 +- src/Support/Arr.php | 2 +- 16 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 9e815ff445..fd8b0f9d5e 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -1019,7 +1019,6 @@ public function contents() /** * Get the blueprint. * - * @param string|null $blueprint * @return \Statamic\Fields\Blueprint */ public function blueprint() diff --git a/src/Assets/AssetContainer.php b/src/Assets/AssetContainer.php index d4bbbee5db..bb8be4e3f8 100644 --- a/src/Assets/AssetContainer.php +++ b/src/Assets/AssetContainer.php @@ -529,7 +529,7 @@ public function sourcePreset($preset = null) /** * The specific glide presets to be used when warming glide image cache on upload. * - * @param array|null $presets + * @param array|null $preset * @return array|null|$this */ public function warmPresets($preset = null) diff --git a/src/Assets/AssetFolder.php b/src/Assets/AssetFolder.php index 8b5133f4e1..5cb639ae8c 100644 --- a/src/Assets/AssetFolder.php +++ b/src/Assets/AssetFolder.php @@ -165,7 +165,7 @@ public function delete() /** * Rename the folder. * - * @param string $filename + * @param string $name * @return AssetFolder * * @throws \Exception diff --git a/src/Auth/File/User.php b/src/Auth/File/User.php index 6516550225..2521c0265e 100644 --- a/src/Auth/File/User.php +++ b/src/Auth/File/User.php @@ -140,7 +140,7 @@ public function getRememberToken() /** * Set the token value for the "remember me" session. * - * @param string $value + * @param string $token * @return void */ public function setRememberToken($token) diff --git a/src/CP/Navigation/NavBuilder.php b/src/CP/Navigation/NavBuilder.php index 2c127de394..6acb2fbd36 100644 --- a/src/CP/Navigation/NavBuilder.php +++ b/src/CP/Navigation/NavBuilder.php @@ -34,7 +34,6 @@ class NavBuilder * Instantiate nav builder. * * @param array $items - * @param bool $withHidden */ public function __construct($items) { diff --git a/src/Console/Commands/MakeWidget.php b/src/Console/Commands/MakeWidget.php index 160ad31a3a..3dca49c11d 100644 --- a/src/Console/Commands/MakeWidget.php +++ b/src/Console/Commands/MakeWidget.php @@ -71,8 +71,6 @@ public function handle() /** * Generate the widget view file. - * - * @param string $addon */ protected function generateWidgetView() { diff --git a/src/Console/Processes/Process.php b/src/Console/Processes/Process.php index b59e9c8547..fa009c1722 100644 --- a/src/Console/Processes/Process.php +++ b/src/Console/Processes/Process.php @@ -161,7 +161,7 @@ public function hasErrorOutput() /** * Run callback without logging errors. * - * @param Closure $callable + * @param Closure $callback * @return mixed */ public function withoutLoggingErrors(Closure $callback) diff --git a/src/Contracts/Forms/Form.php b/src/Contracts/Forms/Form.php index c265f8feeb..f981dde6dc 100644 --- a/src/Contracts/Forms/Form.php +++ b/src/Contracts/Forms/Form.php @@ -9,7 +9,7 @@ interface Form extends Arrayable /** * Get or set the handle. * - * @param string|null $name + * @param string|null $handle * @return string */ public function handle($handle = null); diff --git a/src/Contracts/Forms/Submission.php b/src/Contracts/Forms/Submission.php index c7d53bbfd0..e433f649c6 100644 --- a/src/Contracts/Forms/Submission.php +++ b/src/Contracts/Forms/Submission.php @@ -54,7 +54,7 @@ public function data($data = null); /** * Get a value of a field. * - * @param string $key + * @param string $field * @return mixed */ public function get($field); @@ -71,7 +71,6 @@ public function set($field, $value); /** * Delete submission. * - * @param string $key * @return mixed */ public function delete(); diff --git a/src/Contracts/View/Antlers/Parser.php b/src/Contracts/View/Antlers/Parser.php index 6c7a9ba6da..f3f72bac3d 100644 --- a/src/Contracts/View/Antlers/Parser.php +++ b/src/Contracts/View/Antlers/Parser.php @@ -60,7 +60,7 @@ public function valueWithNoparse($text); * array or object. * * @param string $key Dot-notated key to find - * @param array|object $data Array or object to search + * @param array|object $context Array or object to search * @param mixed $default Default value to use if not found * @return mixed */ diff --git a/src/Http/Controllers/CP/Updater/UpdateProductController.php b/src/Http/Controllers/CP/Updater/UpdateProductController.php index 8b8fca135f..1c4add1d10 100644 --- a/src/Http/Controllers/CP/Updater/UpdateProductController.php +++ b/src/Http/Controllers/CP/Updater/UpdateProductController.php @@ -16,7 +16,7 @@ class UpdateProductController extends CpController /** * Show product updates overview. * - * @param string $slug + * @param string $marketplaceProductSlug */ public function show($marketplaceProductSlug) { @@ -65,7 +65,7 @@ public function show($marketplaceProductSlug) /** * Product changelog. * - * @param string $slug + * @param string $marketplaceProductSlug */ public function changelog(Request $request, $marketplaceProductSlug) { diff --git a/src/Http/Controllers/GlideController.php b/src/Http/Controllers/GlideController.php index 62603b3224..e3024baefe 100644 --- a/src/Http/Controllers/GlideController.php +++ b/src/Http/Controllers/GlideController.php @@ -82,7 +82,7 @@ public function generateByUrl($url) /** * Generate a manipulated image by an asset reference. * - * @param string $ref + * @param string $encoded * @return mixed * * @throws \Exception diff --git a/src/Imaging/GlideUrlBuilder.php b/src/Imaging/GlideUrlBuilder.php index 0db9d402db..d3cbedbc83 100644 --- a/src/Imaging/GlideUrlBuilder.php +++ b/src/Imaging/GlideUrlBuilder.php @@ -25,7 +25,6 @@ public function __construct(array $options = []) * * @param \Statamic\Contracts\Assets\Asset|string $item * @param array $params - * @param string|null $filename * @return string * * @throws \Exception diff --git a/src/Modifiers/CoreModifiers.php b/src/Modifiers/CoreModifiers.php index 55df4b3e17..4678f7cef4 100644 --- a/src/Modifiers/CoreModifiers.php +++ b/src/Modifiers/CoreModifiers.php @@ -1196,7 +1196,9 @@ public function joinplode($value, $params) /** * Check if an item exists in an array using "dot" notation. * - * @param $value + * @param array $haystack + * @param array $params + * @param array $context * @return bool */ public function inArray($haystack, $params, $context) @@ -1710,7 +1712,7 @@ public function merge($value, $params, $context) /** * Generate an md5 hash of a value. * - * @param $params + * @param $value * @return string */ public function md5($value) @@ -2902,7 +2904,6 @@ public function truncate($value, $params) * Converts a Carbon instance to a timestamp. * * @param Carbon $value - * @param array $params * @return int */ public function timestamp($value) diff --git a/src/StaticCaching/Cachers/AbstractCacher.php b/src/StaticCaching/Cachers/AbstractCacher.php index 2071ae3a66..f40760b144 100644 --- a/src/StaticCaching/Cachers/AbstractCacher.php +++ b/src/StaticCaching/Cachers/AbstractCacher.php @@ -254,7 +254,7 @@ public function refreshUrls($urls) /** * Refresh an individual URL. * - * @param string $path + * @param string $url * @param string|null $domain * @return void */ diff --git a/src/Support/Arr.php b/src/Support/Arr.php index 664a4a3986..0e02427992 100644 --- a/src/Support/Arr.php +++ b/src/Support/Arr.php @@ -220,7 +220,7 @@ public static function sortByArray(array $array, array $order) /** * Get rid of null values. (Empty arrays, literal null values, and empty strings). * - * @param array $array + * @param array $data * @return array */ public static function removeNullValues($data) From 8e7d38b4d7e0b8d21f45bf9ea7311f78226f4384 Mon Sep 17 00:00:00 2001 From: Dmitry <45711841+darkdi@users.noreply.github.com> Date: Wed, 5 Aug 2026 06:09:04 +0300 Subject: [PATCH 2/2] Drop the two tags Pint flags as superfluous instead of renaming them --- src/Console/Processes/Process.php | 1 - src/Modifiers/CoreModifiers.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Console/Processes/Process.php b/src/Console/Processes/Process.php index fa009c1722..99e4de80dd 100644 --- a/src/Console/Processes/Process.php +++ b/src/Console/Processes/Process.php @@ -161,7 +161,6 @@ public function hasErrorOutput() /** * Run callback without logging errors. * - * @param Closure $callback * @return mixed */ public function withoutLoggingErrors(Closure $callback) diff --git a/src/Modifiers/CoreModifiers.php b/src/Modifiers/CoreModifiers.php index 4678f7cef4..1e07fec4aa 100644 --- a/src/Modifiers/CoreModifiers.php +++ b/src/Modifiers/CoreModifiers.php @@ -1712,7 +1712,6 @@ public function merge($value, $params, $context) /** * Generate an md5 hash of a value. * - * @param $value * @return string */ public function md5($value)