ClientAddressRepository::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php 
2
3
namespace Hideyo\Ecommerce\Framework\Services\Client\Entity;
4
 
5
use Hideyo\Ecommerce\Framework\Services\Client\Entity\ClientAddress;
6
use Hideyo\Ecommerce\Framework\Services\BaseRepository;
7
 
8
class ClientAddressRepository extends BaseRepository
9
{
10
11
    protected $model;
12
13
    public function __construct(ClientAddress $model)
14
    {
15
        $this->model = $model;
16
    }
17
  
18
    public function selectAllByClientId($clientId)
19
    {
20
         return $this->model->where('client_id', '=', $clientId)->get();
21
    }
22
23
    public function selectOneByClientIdAndId($clientId, $id)
24
    {
25
        return $this->model->where('client_id', $clientId)->where('id', $id)->get()->first();
26
    }
27
}