| 1 | <?php |
||
| 13 | class BooleanBehavior extends Behavior |
||
| 14 | { |
||
| 15 | const RETURN_TYPE_INT = 'int'; |
||
| 16 | const RETURN_TYPE_BOOL = 'bool'; |
||
| 17 | |||
| 18 | /** @var string|string[] */ |
||
| 19 | public $attributes; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | public $returnType; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | 2 | public function events() |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | 2 | public function process() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @param string|int|bool $value |
||
| 54 | * @return bool |
||
| 55 | */ |
||
| 56 | 2 | protected function map($value) { |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param bool $value |
||
| 70 | * @return bool|int |
||
| 71 | * @throws InvalidConfigException |
||
| 72 | */ |
||
| 73 | 2 | protected function makeReturnValue(bool $value) |
|
| 80 | } |