@@ 78-86 (lines=9) @@ | ||
75 | protected function getWildcardKeys($data, array $keys) { |
|
76 | $values = []; |
|
77 | ||
78 | if ( ! is_array($data) && ! $data instanceof Traversable) { |
|
79 | if ($data instanceof IArrayable) { |
|
80 | $data = $data->toArray(); |
|
81 | } |
|
82 | ||
83 | if ( ! is_array($data)) { |
|
84 | $data = []; |
|
85 | } |
|
86 | } |
|
87 | ||
88 | foreach ($data as $itemKey => $itemValue) { |
|
89 | $values[$itemKey] = $itemKey; |
|
@@ 104-112 (lines=9) @@ | ||
101 | protected function getWildcardValues($data, array $keys) { |
|
102 | $values = []; |
|
103 | ||
104 | if ( ! is_array($data) && ! $data instanceof Traversable) { |
|
105 | if ($data instanceof IArrayable) { |
|
106 | $data = $data->toArray(); |
|
107 | } |
|
108 | ||
109 | if ( ! is_array($data)) { |
|
110 | $data = []; |
|
111 | } |
|
112 | } |
|
113 | ||
114 | if (count($keys) === 0) { |
|
115 | foreach ($data as $itemKey => $itemValue) { |