Passed
Branch feature/ide (e899a2)
by Csaba
02:33
created

BarSchema::schema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
namespace Fathomminds\Rest\Examples\DynamoDb\Models\Schema;
3
4
use Fathomminds\Rest\Schema;
5
use Fathomminds\Rest\Schema\TypeValidators\StringValidator;
6
use Fathomminds\Rest\Examples\DynamoDb\Models\Schema\TypeValidators\PhoneNumberValidator;
7
8
/**
9
 *
10
 * @property string $_id
11
 * @property string $mobile
12
 *
13
 */
14
15
class BarSchema extends Schema
16
{
17
    public function schema()
18
    {
19
        return [
20
            '_id' => [
21
                'unique' => true,
22
                'validator' => [
23
                    'class' => StringValidator::class,
24
                ]
25
            ],
26
            'mobile' => [
27
                'validator' => [
28
                    'class' => PhoneNumberValidator::class,
29
                ]
30
            ]
31
        ];
32
    }
33
}
34