Code Duplication    Length = 22-22 lines in 2 locations

base/Container.php 1 location

@@ 228-249 (lines=22) @@
225
     * @param array $params
226
     * @return array
227
     */
228
    private function buildCalls(array $params)
229
    {
230
        $callers = [];
231
232
        if (!is_array($params[0])) {
233
            $params = [
234
                $params
235
            ];
236
        }
237
238
        foreach ($params as $arguments) {
239
            if (is_string($arguments[0])) {
240
                if (!empty($arguments[1]) && is_array($arguments[1])) {
241
                    $callers[$arguments[0]] = $this->buildParams($arguments[1]);
242
                } else {
243
                    $callers[$arguments[0]] = null;
244
                }
245
            }
246
        }
247
248
        return $callers;
249
    }
250
251
    /**
252
     * Make object with arguments

base/Injector.php 1 location

@@ 182-203 (lines=22) @@
179
     * @param array $params
180
     * @return array
181
     */
182
    private function buildCalls(array $params)
183
    {
184
        $callers = [];
185
186
        if (!is_array($params[0])) {
187
            $params = [
188
                $params
189
            ];
190
        }
191
192
        foreach ($params as $arguments) {
193
            if (is_string($arguments[0])) {
194
                if (!empty($arguments[1]) && is_array($arguments[1])) {
195
                    $callers[$arguments[0]] = $this->buildParams($arguments[1]);
196
                } else {
197
                    $callers[$arguments[0]] = null;
198
                }
199
            }
200
        }
201
202
        return $callers;
203
    }
204
205
    /**
206
     * Make object with arguments