generated from MarwanAlsoltany/php-package
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBoolConstraint.php
39 lines (32 loc) · 1.13 KB
/
BoolConstraint.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @author Marwan Al-Soltany <MarwanAlsoltany@gmail.com>
* @copyright Marwan Al-Soltany 2022
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace MAKS\Mighty\Validation\Constraint\Rule;
use Attribute;
use MAKS\Mighty\Validation\Strategy;
use MAKS\Mighty\Validation\Constraint\Rule;
/**
* Adds `bool` rule. An alias for the `boolean` rule.
*
* This is an auto-generated class that was generated programmatically by:
* `MAKS\Mighty\Maker`
*
* @package Mighty\Validator
*
* @codeCoverageIgnore There is nothing to test here. The underlying code is fully tested.
*/
#[Attribute(Attribute::TARGET_CLASS_CONSTANT | Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD)]
final class BoolConstraint extends Rule
{
public const NAME = 'bool';
public function __construct(?string $message = null, Strategy $strategy = Strategy::FailLazy)
{
$arguments = array_slice(func_get_args(), 0, 0);
parent::__construct(name: self::NAME, arguments: $arguments, message: $message, strategy: $strategy);
}
}