1 | <?php |
||
10 | class SchemaAssertion |
||
11 | { |
||
12 | protected $schema; |
||
13 | |||
14 | |||
15 | /** |
||
16 | * @param array|string $schema |
||
17 | * @return void |
||
|
|||
18 | */ |
||
19 | 4 | public function __construct($schema) |
|
31 | |||
32 | /** |
||
33 | * Assert JSON against the loaded schema |
||
34 | * |
||
35 | * @param string $data |
||
36 | * @return void |
||
37 | */ |
||
38 | 4 | public function assert(string $data) |
|
48 | } |
||
49 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.