ProjectRegistrator   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getArray() 0 4 1
A registerAndReturnProject() 0 4 1
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
}