Total Complexity | 2 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class PropertiesListing |
||
12 | { |
||
13 | /** |
||
14 | * The map of property types. |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $typesMap = [ |
||
19 | 'guid' => 'string', |
||
20 | 'boolean' => 'boolean', |
||
21 | 'datetime' => 'datetime', |
||
22 | 'string' => 'string', |
||
23 | 'json' => 'array', |
||
24 | 'integer' => 'integer', |
||
25 | 'date' => 'date', |
||
26 | 'smallint' => 'integer', |
||
27 | 'text' => 'string', |
||
28 | 'decimal' => 'float', |
||
29 | 'bigint' => 'integer', |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * List the properties of the given Eloquent model. |
||
34 | * |
||
35 | * @param string $class |
||
36 | * @return array |
||
37 | */ |
||
38 | public function listForEloquent(string $class) : array |
||
52 |