1 | <?php namespace CMPayments\SchemaValidator\Validators; |
||
11 | trait EnumTrait |
||
12 | { |
||
13 | /** |
||
14 | * Validates $data against a specific $schema->enum |
||
15 | * |
||
16 | * @param $data |
||
17 | * @param $schema |
||
18 | * @param $path |
||
19 | */ |
||
20 | public function validateEnum($data, $schema, $path) |
||
38 | |||
39 | /** |
||
40 | * @param int $code |
||
41 | * @param array $args |
||
42 | * |
||
43 | * @return mixed |
||
44 | */ |
||
45 | abstract public function addError($code, array $args = []); |
||
46 | |||
47 | /** |
||
48 | * Returns a valid representation of 'items' (or other value) |
||
49 | * |
||
50 | * @param int $count |
||
51 | * @param string $single |
||
52 | * @param string $plural |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | abstract public function conjugationObject($count, $single = 'item', $plural = 'items'); |
||
57 | } |