@@ 43-54 (lines=12) @@ | ||
40 | * |
|
41 | * @return array |
|
42 | */ |
|
43 | public function parse($rules) |
|
44 | { |
|
45 | $this->rules = $rules; |
|
46 | $parsed = []; |
|
47 | foreach ($this->getRules() as $rulesArray) { |
|
48 | $column = $this->getColumn($rulesArray); |
|
49 | $attributes = $this->getAttributes($column, $rulesArray); |
|
50 | $parsed[$column] = $attributes; |
|
51 | } |
|
52 | ||
53 | return $parsed; |
|
54 | } |
|
55 | ||
56 | /** |
|
57 | * Get array of rules. |
@@ 77-88 (lines=12) @@ | ||
74 | * |
|
75 | * @return array |
|
76 | */ |
|
77 | public function parse($schema) |
|
78 | { |
|
79 | $this->schema = $schema; |
|
80 | $parsed = []; |
|
81 | foreach ($this->getSchemas() as $schemaArray) { |
|
82 | $column = $this->getColumn($schemaArray); |
|
83 | $attributes = $this->getAttributes($column, $schemaArray); |
|
84 | $parsed[$column] = $attributes; |
|
85 | } |
|
86 | ||
87 | return $parsed; |
|
88 | } |
|
89 | ||
90 | /** |
|
91 | * Get array of schema. |