From 18badc8b6b60db74c334e25ab4fec3a4e1b6e3db Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Sat, 1 Aug 2026 16:27:00 -0400 Subject: [PATCH 1/2] docs: correct the documented attribute method names and bulk-update semantics. --- CHANGELOG.md | 2 ++ README.md | 2 +- src/Attribute/AttributesInterface.php | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f38de61..a04fd24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 0.2.1 Under development +- docs: correct the documented attribute method names and bulk-update semantics. + ## 0.2.0 July 29, 2026 - feat: add `SrcInterface` and `ValueInterface` to the `Attribute` namespace for elements exposing the `src` and `value` attributes. diff --git a/README.md b/README.md index 7015056..f89a4e1 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ final class MyTag implements RenderableInterface Contract for objects that manage HTML attributes with an immutable API. -Methods: `attributes()`, `class()`, `getAttribute()`, `getAttributes()`, `removeAttribute()`, `setAttribute()`. +Methods: `addAttribute()`, `attributes()`, `class()`, `getAttribute()`, `getAttributes()`, and `removeAttribute()`. #### FormControlInterface diff --git a/src/Attribute/AttributesInterface.php b/src/Attribute/AttributesInterface.php index 3db81c9..15619ce 100644 --- a/src/Attribute/AttributesInterface.php +++ b/src/Attribute/AttributesInterface.php @@ -25,11 +25,11 @@ interface AttributesInterface public function addAttribute(string|UnitEnum $key, mixed $value): static; /** - * Replaces all HTML attributes for the element. + * Adds or updates multiple HTML attributes for the element. * * @param mixed[] $values Associative array of attribute keys and values. * - * @return static New instance with the replaced attributes. + * @return static New instance with the updated attributes. */ public function attributes(array $values): static; From 81dea06db9906912b04751a7efc7e35ed6e6b39b Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Sat, 1 Aug 2026 16:38:26 -0400 Subject: [PATCH 2/2] Apply fixed Codex review. --- src/Attribute/AttributesInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Attribute/AttributesInterface.php b/src/Attribute/AttributesInterface.php index 15619ce..3db81c9 100644 --- a/src/Attribute/AttributesInterface.php +++ b/src/Attribute/AttributesInterface.php @@ -25,11 +25,11 @@ interface AttributesInterface public function addAttribute(string|UnitEnum $key, mixed $value): static; /** - * Adds or updates multiple HTML attributes for the element. + * Replaces all HTML attributes for the element. * * @param mixed[] $values Associative array of attribute keys and values. * - * @return static New instance with the updated attributes. + * @return static New instance with the replaced attributes. */ public function attributes(array $values): static;