Test Setup Failed
Push — master ( 4c0917...56b13c )
by Php Easy Api
04:17
created

Pushing::getClassName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Migratio\Resource\PushManager;
4
5
use Migratio\SchemaCapsule;
6
use Migratio\Resource\BaseManager;
7
8
class Pushing extends BaseManager
9
{
10
    //get pushing
11
    use PushingProcess;
12
13
    /**
14
     * @var array
15
     */
16
    protected $list = array();
17
18
    /**
19
     * pushing handle
20
     *
21
     * @return void|mixed
22
     */
23
    public function handle()
24
    {
25
        foreach ($this->tableFilters() as $table=>$files){
26
27
            $table = strtolower($table);
28
29
            foreach ($files as $file) {
30
31
                $getClassName = preg_replace('@(\d+)_@is','',$file);
32
                $className = $this->getClassName($getClassName);
33
34
                require_once ($file);
35
36
                $capsule = new SchemaCapsule($this->config,$file,$table);
37
38
                $this->list[$table][] = (new $className)->up($capsule);
39
            }
40
        }
41
42
        return $this->processHandler();
43
    }
44
45
46
}