|
@@ 110-112 (lines=3) @@
|
| 107 |
|
protected function parseColumnData($data) |
| 108 |
|
{ |
| 109 |
|
$requiredAttributes = ['name', 'table', 'type', 'ui']; |
| 110 |
|
if (!ArrayUtils::contains($data, $requiredAttributes)) { |
| 111 |
|
throw new \Exception(sprintf('%s are required', implode(',', $requiredAttributes))); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
$data = ArrayUtils::aliasKeys($data, [ |
| 115 |
|
'table_name' => 'table', |
|
@@ 126-128 (lines=3) @@
|
| 123 |
|
|
| 124 |
|
protected function requiredAttributes(array $attributes, array $data) |
| 125 |
|
{ |
| 126 |
|
if (!ArrayUtils::contains($data, $attributes)) { |
| 127 |
|
throw new \Exception(sprintf('These attributes are required: %s', implode(',', $attributes))); |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
protected function requiredOneAttribute(array $attributes, array $data) |
|
@@ 133-135 (lines=3) @@
|
| 130 |
|
|
| 131 |
|
protected function requiredOneAttribute(array $attributes, array $data) |
| 132 |
|
{ |
| 133 |
|
if (!ArrayUtils::containsSome($data, $attributes)) { |
| 134 |
|
throw new \Exception(sprintf('These attributes are required: %s', implode(',', $attributes))); |
| 135 |
|
} |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
protected function getMessagesTo(array $data) |