Passed
Push — master ( 6aff30...239879 )
by Thijs
09:39
created

ManagesProjects   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A projects() 0 5 1
1
<?php
2
3
namespace TestMonitor\DevOps\Actions;
4
5
use TestMonitor\DevOps\Transforms\TransformsProjects;
6
7
trait ManagesProjects
8
{
9
    use TransformsProjects;
10
11
    /**
12
     * Get a list of of projects.
13
     *
14
     * @throws \TestMonitor\DevOps\Exceptions\InvalidDataException
15
     *
16
     * @return \TestMonitor\DevOps\Resources\Project[]
17
     */
18 11
    public function projects()
19
    {
20 11
        $response = $this->get('_apis/projects');
0 ignored issues
show
Bug introduced by
It seems like get() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

20
        /** @scrutinizer ignore-call */ 
21
        $response = $this->get('_apis/projects');
Loading history...
21
22 1
        return $this->fromDevOpsProjects($response['value']);
23
    }
24
}
25