ProjectRegistrator::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Finder\Spider\Registrator;
3
4
use Finder\Contracts\Spider\TargetManager;
5
6
use Stalker\Models\Project;
7
8
/**
9
 * Run all script analysers and outputs their result.
10
 */
11
class ProjectRegistrator extends TargetManager
12
{
13
14
    public function __construct($target, $parent = false)
15
    {
16
        parent::__construct($target, $parent);
17
18
        if (!Project::where('location', $this->getLocation())->first()) {
19
            Project::create($this->getArray());
20
        }
21
    }
22
23
    protected function getArray()
24
    {
25
        
26
    }
27
28
    public function registerAndReturnProject()
29
    {
30
31
    }
32
}