Passed
Push — master ( e21a18...bb0e2b )
by Stephen
04:20 queued 01:59
created

HasRelationships   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 4
c 2
b 1
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A withRelationships() 0 5 1
1
<?php
2
3
namespace Sfneal\Queries\Traits;
4
5
trait HasRelationships
6
{
7
    /**
8
     * @var array
9
     */
10
    protected $relationships = [];
11
12
    /**
13
     * Scope Plan search results to only plans that are 'public'.
14
     *
15
     * @param array $relationships
16
     * @return $this
17
     */
18
    public function withRelationships(array $relationships = []): self
19
    {
20
        $this->relationships = $relationships;
21
22
        return $this;
23
    }
24
}
25