Test Setup Failed
Push — master ( d6fde7...1e848b )
by Php Easy Api
04:20
created

Pulling   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 20 3
1
<?php
2
3
namespace Migratio\Resource\PullManager;
4
5
use Migratio\Schema;
6
use Migratio\Resource\BaseManager;
7
use Migratio\Contract\QueryBaseContract;
8
use Migratio\Resource\Request\BaseRequestProcess;
9
use Migratio\SchemaCapsule;
10
11
class Pulling extends BaseManager
12
{
13
    /**
14
     * @return mixed
15
     */
16
    public function get()
17
    {
18
        BaseRequestProcess::$paths=$this->config['paths'];
19
20
        $allFiles = BaseRequestProcess::getAllFiles();
21
22
        foreach ($allFiles as $table=>$files){
23
24
            foreach ($files as $file) {
25
26
                $className = str_replace(".php","",BaseRequestProcess::getFileName($file));
27
                $className = ucfirst($className);
28
29
                $require = require_once ($file);
0 ignored issues
show
Unused Code introduced by
The assignment to $require is dead and can be removed.
Loading history...
30
31
                $up = new $className;
32
33
                $capsule = new SchemaCapsule($this->config,$file);
0 ignored issues
show
Bug introduced by
The call to Migratio\SchemaCapsule::__construct() has too few arguments starting with table. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

33
                $capsule = /** @scrutinizer ignore-call */ new SchemaCapsule($this->config,$file);

This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
34
35
                dd($up->up($capsule));
36
            }
37
38
39
        }
40
41
42
    }
43
}