Skip to content

Commit c630e72

Browse files
keeama1364knl
andauthored
feat: Version 1.6.0 (#6)
* feat: input hidden * style: formatting --------- Co-authored-by: Rene <[email protected]>
1 parent 5b0a17c commit c630e72

File tree

8 files changed

+25
-15
lines changed

8 files changed

+25
-15
lines changed

src/NotFound/Layout/Elements/LayoutBreadcrumb.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct()
2121
*
2222
* @return void
2323
*/
24-
public function addHome(string $title = null, string $link = '/'): self
24+
public function addHome(?string $title = null, string $link = '/'): self
2525
{
2626
$this->properties->items[] = (object) ['title' => $title ?? 'Home', 'link' => $link];
2727

@@ -31,11 +31,11 @@ public function addHome(string $title = null, string $link = '/'): self
3131
/**
3232
* Add an item to the breadcrumbs.
3333
*
34-
* @param mixed $title Title displayed on the UI
35-
* @param mixed $link Link (optional) Last item should always be the current path en should not link anywhere.
34+
* @param mixed $title Title displayed on the UI
35+
* @param mixed $link Link (optional) Last item should always be the current path en should not link anywhere.
3636
* @return void
3737
*/
38-
public function addItem(string $title, string $link = null): self
38+
public function addItem(string $title, ?string $link = null): self
3939
{
4040
$this->properties->items[] = (object) ['title' => $title, 'link' => $link];
4141

src/NotFound/Layout/Elements/LayoutPager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class LayoutPager extends AbstractLayout
66
{
7-
public function __construct(int $totalItems, int $itemsPerPage = null)
7+
public function __construct(int $totalItems, ?int $itemsPerPage = null)
88
{
99
parent::__construct(type: 'Pager');
1010

src/NotFound/Layout/Elements/Table/LayoutTable.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class LayoutTable extends AbstractLayout
1414
/**
1515
* __construct
1616
*
17-
* @param array $headers An array of LayoutTableHeader elements.
18-
* @param array $rows An array of LayoutTableRow elements.
19-
* @param bool $sort Will we be able to sort rows on the frontend.
20-
* @param bool $delete Will we be able to delete rows on the frontend.
21-
* @param bool $edit Will we be able to edit rows on the frontend.
17+
* @param array $headers An array of LayoutTableHeader elements.
18+
* @param array $rows An array of LayoutTableRow elements.
19+
* @param bool $sort Will we be able to sort rows on the frontend.
20+
* @param bool $delete Will we be able to delete rows on the frontend.
21+
* @param bool $edit Will we be able to edit rows on the frontend.
2222
* @return void
2323
*/
2424
public function __construct(bool $sort = true, bool $delete = true, bool $edit = true, bool $create = true)
@@ -51,7 +51,7 @@ public function addRow(LayoutTableRow $row): self
5151
/**
5252
* Used for pagination to display the number of pages in total
5353
*
54-
* @param $number number of items
54+
* @param $number number of items
5555
*/
5656
public function setTotalItems(int $number)
5757
{

src/NotFound/Layout/Elements/Table/LayoutTableColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class LayoutTableColumn
1313
{
1414
public function __construct(
15-
public string $value,
15+
public string|bool $value,
1616
public string $type = 'text',
1717
public object $properties = new stdClass()
1818
) {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace NotFound\Layout\Inputs;
4+
5+
class LayoutInputHidden extends LayoutInputText
6+
{
7+
protected string $type = 'InputHidden';
8+
9+
protected string $value = '';
10+
}

src/NotFound/Layout/Inputs/LayoutInputTags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class LayoutInputTags extends AbstractInput
1414
* Set the current value of the input select
1515
* The value must be an array of identifiers, most likely ids
1616
*
17-
* @param int[] $value array of identifiers
17+
* @param int[] $value array of identifiers
1818
* @return void
1919
*/
2020
public function setValue(mixed $value): self

src/NotFound/Layout/LayoutResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class LayoutResponse
1414

1515
private ?string $nextRequest = null;
1616

17-
public function __construct(AbstractLayout $ui = null, Action $action = null)
17+
public function __construct(?AbstractLayout $ui = null, ?Action $action = null)
1818
{
1919
$this->actions = new Collection();
2020
$this->elements = new Collection();

src/NotFound/Layout/Responses/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Redirect extends Action
1212
/**
1313
* __construct
1414
*
15-
* @param mixed $target The path to navigate to (without locale!)
15+
* @param mixed $target The path to navigate to (without locale!)
1616
* @return void
1717
*/
1818
public function __construct(string $target)

0 commit comments

Comments
 (0)