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

HasRelationships::withRelationships()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 2
b 1
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
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