Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\Contract |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\Contract; |
| 16 | |
| 17 | /** |
| 18 | * This interface forces classes to implement an array representation of themselves. |
| 19 | * |
| 20 | * This can be helpful for \JsonSerializable classes or classes which need to be represented as array. |
| 21 | * |
| 22 | * @package phpOMS\Contract |
| 23 | * @license OMS License 2.0 |
| 24 | * @link https://jingga.app |
| 25 | * @since 1.0.0 |
| 26 | */ |
| 27 | interface ArrayableInterface |
| 28 | { |
| 29 | /** |
| 30 | * Get the instance as an array. |
| 31 | * |
| 32 | * @return array |
| 33 | * |
| 34 | * @since 1.0.0 |
| 35 | */ |
| 36 | public function toArray() : array; |
| 37 | } |