-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65f9101
commit 5d83f36
Showing
6 changed files
with
143 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace Esign\InstallCommand\Tests\Support; | ||
|
||
use Esign\InstallCommand\InstallCommand as BaseInstallCommand; | ||
use Esign\InstallCommand\ValueObjects\AppendableFile; | ||
use Esign\InstallCommand\ValueObjects\ComposerPackage; | ||
use Esign\InstallCommand\ValueObjects\NodePackage; | ||
use Esign\InstallCommand\ValueObjects\PublishableFile; | ||
|
||
class InstallCommand extends BaseInstallCommand | ||
{ | ||
protected $signature = 'app:install-command'; | ||
|
||
protected function publishableFiles(): array | ||
{ | ||
return [ | ||
new PublishableFile( | ||
path: __DIR__ . '/stubs/app/Services/UserService.php', | ||
target: base_path('app/Services/UserService.php'), | ||
), | ||
new AppendableFile( | ||
path: __DIR__ . '/stubs/app/Models/User.php', | ||
target: base_path('app/Models/User.php'), | ||
search: 'use HasFactory;', | ||
), | ||
]; | ||
} | ||
|
||
protected function composerPackages(): array | ||
{ | ||
return [ | ||
new ComposerPackage(name: 'my/composer-package'), | ||
new ComposerPackage(name: 'my/specific-composer-package', version: '^1.0'), | ||
new ComposerPackage(name: 'my/dev-composer-package', dev: true), | ||
]; | ||
} | ||
|
||
protected function nodePackages(): array | ||
{ | ||
return [ | ||
new NodePackage(name: 'my/node-package'), | ||
new NodePackage(name: 'my/specific-node-package', version: '^1.0'), | ||
new NodePackage(name: 'my/dev-node-package', dev: true), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
public function isAdmin(): bool | ||
{ | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace App\Services; | ||
|
||
class UserService | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters