File tree Expand file tree Collapse file tree 7 files changed +28
-3
lines changed
Expand file tree Collapse file tree 7 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 2323- Enh #22 : Add trait ` HasLinkAreaCurrent ` class (@terabytesoftw )
2424- Enh #23 : Add trait ` HasListItemAreaCurrent ` class (@terabytesoftw )
2525- Bug #24 : Fix ` linkAriaCurrent() ` and ` listItemAriaCurrent() ` methods to accept a boolean value. (@terabytesoftw )
26+ - Bug #25 : Fix ` phpdoc ` for ` psalm ` (@terabytesoftw )
2627
2728## 0.1.1 March 9, 2024
2829
Original file line number Diff line number Diff line change 99 */
1010trait HasFirstItemClass
1111{
12+ /**
13+ * @psalm-var string|string[]
14+ */
1215 protected array |string $ firstItemClass = '' ;
1316 protected bool $ overrideFirstItemClass = true ;
1417
@@ -19,6 +22,8 @@ trait HasFirstItemClass
1922 * @param bool $override Whether to override the current first item class or not.
2023 *
2124 * @return static A new instance of the current class with the specified first item class.
25+ *
26+ * @psalm-param string|string[] $value The `CSS` class for the first item tag.
2227 */
2328 public function firstItemClass (array |string $ value , bool $ override = true ): static
2429 {
Original file line number Diff line number Diff line change 99 */
1010trait HasFirstLinkClass
1111{
12+ /**
13+ * @psalm-var string|string[]
14+ */
1215 protected array |string $ firstLinkClass = '' ;
1316 protected bool $ overrideFirstLinkClass = true ;
1417
@@ -19,6 +22,8 @@ trait HasFirstLinkClass
1922 * @param bool $override Whether to override the current first link class or not.
2023 *
2124 * @return static A new instance of the current class with the specified first link class.
25+ *
26+ * @psalm-param string|string[] $value The `CSS` class for the first link tag.
2227 */
2328 public function firstLinkClass (array |string $ value , bool $ override = true ): static
2429 {
Original file line number Diff line number Diff line change 99 */
1010trait HasLastItemClass
1111{
12+ /**
13+ * @psalm-var string|string[]
14+ */
1215 protected array |string $ lastItemClass = '' ;
1316 protected bool $ overrideLastItemClass = true ;
1417
@@ -19,6 +22,8 @@ trait HasLastItemClass
1922 * @param bool $override Whether to override the current last item class or not.
2023 *
2124 * @return static A new instance of the current class with the specified last item class.
25+ *
26+ * @psalm-param string|string[] $value The `CSS` class for the last item tag.
2227 */
2328 public function lastItemClass (array |string $ value , bool $ override = true ): static
2429 {
Original file line number Diff line number Diff line change 99 */
1010trait HasLastLinkClass
1111{
12+ /**
13+ * @psalm-var string|string[]
14+ */
1215 protected array |string $ lastLinkClass = '' ;
1316 protected bool $ overrideLastLinkClass = true ;
1417
@@ -19,6 +22,8 @@ trait HasLastLinkClass
1922 * @param bool $override Whether to override the current last link class or not.
2023 *
2124 * @return static A new instance of the current class with the specified last link class.
25+ *
26+ * @psalm-param string|string[] $value The `CSS` class for the last link tag.
2227 */
2328 public function lastLinkClass (array |string $ value , bool $ override = true ): static
2429 {
Original file line number Diff line number Diff line change @@ -42,12 +42,14 @@ public function linkAttributes(array $values): static
4242 /**
4343 * Sets the `CSS` class that will be assigned to the link.
4444 *
45- * @param string $value The `CSS` class for the link tag.
45+ * @param array| string $value The `CSS` class for the link tag.
4646 * @param bool $override If `true` the value will be overridden.
4747 *
4848 * @return static A new instance of the current class with the specified link class.
49+ *
50+ * @psalm-param string|string[] $value The `CSS` class for the first link tag.
4951 */
50- public function linkClass (string $ value , bool $ override = false ): static
52+ public function linkClass (array | string $ value , bool $ override = false ): static
5153 {
5254 $ new = clone $ this ;
5355 CssClass::add ($ new ->linkAttributes , $ value , $ override );
Original file line number Diff line number Diff line change @@ -44,10 +44,12 @@ public function listItemAttributes(array $values): static
4444 /**
4545 * Sets the `CSS` class that will be assigned to the list item.
4646 *
47- * @param string $value The CSS class name.
47+ * @param array| string $value The CSS class name.
4848 * @param bool $override If `true` the value will be overridden.
4949 *
5050 * @return static A new instance of the current class with the specified class for tag `<li>`.
51+ *
52+ * @psalm-param string|string[] $value The `CSS` class for the first link tag.
5153 */
5254 public function listItemClass (array |string $ value , bool $ override = false ): static
5355 {
You can’t perform that action at this time.
0 commit comments