-
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.
[TASK] Move logic in RssRenderer to a composite-like structure
- Loading branch information
1 parent
026bd16
commit 1ffb7bb
Showing
33 changed files
with
1,142 additions
and
900 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the "feed_generator" extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Brotkrueml\FeedGenerator\Renderer\Guard; | ||
|
||
use Brotkrueml\FeedGenerator\Renderer\IntegerNotInRangeException; | ||
|
||
/** | ||
* Guard which checks if an integer is in a given range | ||
* @internal | ||
*/ | ||
final class IntegerRangeGuard | ||
{ | ||
public function guard(string $property, int $value, int $min, int $max): void | ||
{ | ||
if ($value >= $min && $value <= $max) { | ||
return; | ||
} | ||
|
||
throw IntegerNotInRangeException::forProperty($property, $value, $min, $max); | ||
} | ||
} |
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
Oops, something went wrong.