generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add write method to category source (#95)
* Add write method to category source * Apply fixes from StyleCI * [ci-review] Apply changes from Rector action. * Add changelog * Add BC layer * Add test * Apply fixes from StyleCI * Resort arguments and add a test * Fix psalm * Apply review suggestion * Check exception code * Update src/CategorySource.php Co-authored-by: Rustam Mamadaminov <[email protected]> Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: rector-bot <[email protected]> Co-authored-by: Rustam Mamadaminov <[email protected]> Co-authored-by: Alexander Makarov <[email protected]>
- Loading branch information
1 parent
7c8e7d0
commit d555136
Showing
5 changed files
with
87 additions
and
1 deletion.
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
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 Yiisoft\Translator; | ||
|
||
use Exception; | ||
use Throwable; | ||
|
||
final class UnwritableCategorySourceException extends Exception | ||
{ | ||
public function __construct(string $categoryName, int $code = 0, ?Throwable $previous = null) | ||
{ | ||
parent::__construct( | ||
sprintf('The category source "%s" does not support writing.', $categoryName), | ||
$code, | ||
$previous | ||
); | ||
} | ||
} |
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