-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Chemaclass/refactor/add-custom-exception
Add custom exception
- Loading branch information
Showing
3 changed files
with
28 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PrivatePackagist\VendorDataExporter\Exceptions; | ||
|
||
use InvalidArgumentException; | ||
|
||
final class MissingApiCredentialsException extends InvalidArgumentException | ||
{ | ||
public static function missingApiToken(): self | ||
{ | ||
return new self('Missing API credentials: provide API token via command flag or environment variable.'); | ||
} | ||
|
||
public static function missingApiSecret(): self | ||
{ | ||
return new self('Missing API credentials: provide API secret via command flag or environment variable.'); | ||
} | ||
} |
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