Skip to content

Commit 6e6cf13

Browse files
authored
Fix accessing window properties (#410)
* Add type hint * Add magic getter * Cleanup
1 parent 9d768be commit 6e6cf13

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Events/EventWatcher.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public function __construct(protected Client $client) {}
1212
public function register(): void
1313
{
1414
Event::listen('*', function (string $eventName, array $data) {
15-
1615
$event = $data[0] ?? (object) null;
1716

1817
if (! method_exists($event, 'broadcastOn')) {

src/Windows/Window.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Window
2424

2525
protected bool $kiosk = false;
2626

27-
protected $rememberState = false;
27+
protected bool $rememberState = false;
2828

2929
protected bool $alwaysOnTop = false;
3030

@@ -362,4 +362,9 @@ public function fromRuntimeWindow(object $window): static
362362

363363
return $this;
364364
}
365+
366+
public function __get($var)
367+
{
368+
return $this->$var ?? null;
369+
}
365370
}

0 commit comments

Comments
 (0)