diff --git a/src/Commands/MinifyApplicationCommand.php b/src/Commands/MinifyApplicationCommand.php index 5b7373c..37d8378 100644 --- a/src/Commands/MinifyApplicationCommand.php +++ b/src/Commands/MinifyApplicationCommand.php @@ -26,7 +26,7 @@ public function handle() $this->cleanUpEnvFile($appPath); $this->removeIgnoredFilesAndFolders($appPath); - $compactor = new Php(); + $compactor = new Php; $phpFiles = Finder::create() ->files() diff --git a/src/Dialog.php b/src/Dialog.php index a217b56..223c853 100644 --- a/src/Dialog.php +++ b/src/Dialog.php @@ -30,7 +30,7 @@ public function __construct(protected Client $client) {} public static function new() { - return new static(new Client()); + return new static(new Client); } public function title(string $title): self diff --git a/src/Http/Controllers/NativeAppBootedController.php b/src/Http/Controllers/NativeAppBootedController.php index 8d56bc5..36ed735 100644 --- a/src/Http/Controllers/NativeAppBootedController.php +++ b/src/Http/Controllers/NativeAppBootedController.php @@ -12,7 +12,7 @@ public function __invoke(Request $request) $provider = app(config('nativephp.provider')); $provider->boot(); - event(new ApplicationBooted()); + event(new ApplicationBooted); return response()->json([ 'success' => true, diff --git a/src/Menu/Menu.php b/src/Menu/Menu.php index 379b4e2..47a81b0 100644 --- a/src/Menu/Menu.php +++ b/src/Menu/Menu.php @@ -25,7 +25,7 @@ public function __construct(protected Client $client) {} public static function new(): static { - return new static(new Client()); + return new static(new Client); } public function register(): void @@ -51,7 +51,7 @@ public function submenu(string $header, Menu $submenu): static public function separator(): static { - return $this->add(new Separator()); + return $this->add(new Separator); } public function quit(): static diff --git a/src/MenuBar/MenuBarManager.php b/src/MenuBar/MenuBarManager.php index 3101f2b..04aedb0 100644 --- a/src/MenuBar/MenuBarManager.php +++ b/src/MenuBar/MenuBarManager.php @@ -11,7 +11,7 @@ public function __construct(protected Client $client) {} public function create() { - return (new PendingCreateMenuBar())->setClient($this->client); + return (new PendingCreateMenuBar)->setClient($this->client); } public function show() diff --git a/src/Notification.php b/src/Notification.php index 18d27af..85c7a73 100644 --- a/src/Notification.php +++ b/src/Notification.php @@ -16,7 +16,7 @@ public function __construct(protected Client $client) {} public static function new() { - return new static(new Client()); + return new static(new Client); } public function title(string $title): self diff --git a/src/ProgressBar.php b/src/ProgressBar.php index 0f0c29b..74ca9d7 100644 --- a/src/ProgressBar.php +++ b/src/ProgressBar.php @@ -20,7 +20,7 @@ public function __construct(protected int $maxSteps, protected Client $client) { public static function create(int $maxSteps): static { - return new static($maxSteps, new Client()); + return new static($maxSteps, new Client); } public function start() diff --git a/src/System.php b/src/System.php index c750886..5535368 100644 --- a/src/System.php +++ b/src/System.php @@ -58,7 +58,7 @@ public function printToPDF(string $html): string public function timezone(): string { - $timezones = new Timezones(); + $timezones = new Timezones; if (PHP_OS_FAMILY === 'Windows') { $timezone = $timezones->translateFromWindowsString(exec('tzutil /g')); diff --git a/src/Windows/Window.php b/src/Windows/Window.php index 2348577..67308af 100644 --- a/src/Windows/Window.php +++ b/src/Windows/Window.php @@ -17,6 +17,8 @@ class Window protected bool $fullscreen = false; + protected bool $fullscreenable = true; + protected bool $kiosk = false; protected $rememberState = false; @@ -202,13 +204,20 @@ public function hideMenu($autoHideMenuBar = true): static return $this; } - public function fullscreen($fullscreen = false): static + public function fullscreen($fullscreen = true): static { $this->fullscreen = $fullscreen; return $this; } + public function fullscreenable($fullscreenable = true): static + { + $this->fullscreenable = $fullscreenable; + + return $this; + } + public function kiosk($kiosk = false): static { $this->kiosk = $kiosk; @@ -247,6 +256,7 @@ public function toArray() 'closable' => $this->closable, 'title' => $this->title, 'fullscreen' => $this->fullscreen, + 'fullscreenable' => $this->fullscreenable, 'kiosk' => $this->kiosk, 'autoHideMenuBar' => $this->autoHideMenuBar, ];