Skip to content

Commit 9de5cd2

Browse files
committed
static is not yet available in php74
1 parent f19a74c commit 9de5cd2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Widgets/TreeView/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function header(): Header
6464
return $this->header;
6565
}
6666

67-
public static function create(string $id, string $header): static
67+
public static function create(string $id, string $header): self
6868
{
6969
return new static($id, new Header($header));
7070
}

src/Widgets/TreeView/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function options(): Options
7676
return $this->options;
7777
}
7878

79-
public static function values(array $values): static
79+
public static function values(array $values): self
8080
{
8181
return new static($values);
8282
}

src/Widgets/TreeView/TreeView.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ protected function initWidgetOptions(): Options
6363
]);
6464
}
6565

66-
public function onSelect(callable $callback): static
66+
public function onSelect(callable $callback): self
6767
{
6868
$this->bind('<<TreeviewSelect>>', fn () => $callback($this->selected(), $this));
6969
return $this;
7070
}
7171

72-
public function onOpen(callable $callback): static
72+
public function onOpen(callable $callback): self
7373
{
7474
$this->bind('<<TreeviewOpen>>', fn () => $callback($this));
7575
return $this;
7676
}
7777

78-
public function onClose(callable $callback): static
78+
public function onClose(callable $callback): self
7979
{
8080
$this->bind('<<TreeviewClose>>', fn () => $callback($this));
8181
return $this;
@@ -101,21 +101,21 @@ private function setColumnHeader(Column $column): void
101101
$this->call('heading', $column->id, '-text', $column->header()->text);
102102
}
103103

104-
public function add(Item $item, string $parentId = ''): static
104+
public function add(Item $item, string $parentId = ''): self
105105
{
106106
$args = $item->options()->asStringArray();
107107
$this->call('insert', $parentId ?: '{}', 'end', ...$args);
108108
return $this;
109109
}
110110

111-
public function delete(Item ...$items): static
111+
public function delete(Item ...$items): self
112112
{
113113
$ids = array_map(fn (Item $item) => $item->id, $items);
114114
$this->call('delete', ...$ids);
115115
return $this;
116116
}
117117

118-
public function focusItem(Item $item): static
118+
public function focusItem(Item $item): self
119119
{
120120
$this->call('focus', $item->id);
121121
return $this;
@@ -171,7 +171,7 @@ public function getPrevItemId(string $itemId): string
171171
/**
172172
* Sets the viewport to the specified item.
173173
*/
174-
public function seeItemId(string $itemId): static
174+
public function seeItemId(string $itemId): self
175175
{
176176
$this->call('see', $itemId);
177177
return $this;

0 commit comments

Comments
 (0)