Skip to content

Commit 8fc584a

Browse files
committed
Add the return types for each methods
1 parent 01d7de7 commit 8fc584a

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/Commands/BuildCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BuildCommand extends Command
1414

1515
protected $signature = 'native:build {os=all : The operating system to build for (all, linux, mac, windows)}';
1616

17-
public function handle()
17+
public function handle(): void
1818
{
1919
$this->info('Build NativePHP app…');
2020

@@ -37,7 +37,7 @@ public function handle()
3737
});
3838
}
3939

40-
protected function getEnvironmentVariables()
40+
protected function getEnvironmentVariables(): array
4141
{
4242
return array_merge(
4343
[

src/Commands/DevelopCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DevelopCommand extends Command
1515

1616
protected $signature = 'native:serve {--no-queue} {--D|no-dependencies} {--installer=npm}';
1717

18-
public function handle()
18+
public function handle(): void
1919
{
2020
intro('Starting NativePHP dev server…');
2121

@@ -44,7 +44,7 @@ public function handle()
4444
*
4545
* @return void
4646
*/
47-
protected function patchPlist()
47+
protected function patchPlist(): void
4848
{
4949
$pList = file_get_contents(__DIR__.'/../../resources/js/node_modules/electron/dist/Electron.app/Contents/Info.plist');
5050

src/Commands/PublishCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class PublishCommand extends Command
1414

1515
protected $signature = 'native:publish {os=mac}';
1616

17-
public function handle()
17+
public function handle(): void
1818
{
1919
$this->info('Building and publishing NativePHP app…');
2020

@@ -39,7 +39,7 @@ public function handle()
3939
});
4040
}
4141

42-
protected function getEnvironmentVariables()
42+
protected function getEnvironmentVariables(): array
4343
{
4444
return array_merge(
4545
[

src/Commands/QueueWorkerCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class QueueWorkerCommand extends Command
1212
{
1313
protected $signature = 'native:queue {--port=4000}';
1414

15-
protected function getAppDirectory()
15+
protected function getAppDirectory(): string|false
1616
{
1717
$appName = Str::slug(config('app.name'));
1818

@@ -27,7 +27,7 @@ protected function getAppDirectory()
2727
return realpath($basePath.'/'.$appName);
2828
}
2929

30-
public function handle()
30+
public function handle(): void
3131
{
3232
intro('Starting NativePHP queue worker…');
3333

src/ElectronServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function configurePackage(Package $package): void
2727
]);
2828
}
2929

30-
public function packageRegistered()
30+
public function packageRegistered(): void
3131
{
3232
$this->app->singleton('nativephp.updater', function ($app) {
3333
return new UpdaterManager($app);

src/Facades/Updater.php

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

77
class Updater extends Facade
88
{
9-
protected static function getFacadeAccessor()
9+
protected static function getFacadeAccessor(): string
1010
{
1111
return 'nativephp.updater';
1212
}

src/Traits/Installer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function getInstallerAndCommand(?string $installer, $type = 'install')
4343
return [$installer, $commands[$installer]];
4444
}
4545

46-
protected function getInstaller(string $installer)
46+
protected function getInstaller(string $installer): int|string
4747
{
4848
if (! array_key_exists($installer, $this->getCommandArrays())) {
4949
error("Invalid installer ** {$installer} ** provided.");

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ protected function setUp(): void
1515
Artisan::call('native:install', ['--force' => true]);
1616
}
1717

18-
protected function getPackageProviders($app)
18+
protected function getPackageProviders($app): array
1919
{
2020
return [
2121
ElectronServiceProvider::class,
2222
];
2323
}
2424

25-
public function getEnvironmentSetUp($app)
25+
public function getEnvironmentSetUp($app): void
2626
{
2727
config()->set('database.default', 'testing');
2828
}

0 commit comments

Comments
 (0)