RegionsController::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Yajra\Address\Controllers;
4
5
use Illuminate\Routing\Controller;
6
use Yajra\Address\Repositories\Regions\RegionsRepository;
7
8
class RegionsController extends Controller
9
{
10
    /**
11
     * @var RegionsRepository
12
     */
13
    private $repository;
14
15
    /**
16
     * RegionsController constructor.
17
     *
18
     * @param RegionsRepository $repository
19
     */
20
    public function __construct(RegionsRepository $repository)
21
    {
22
        $this->repository = $repository;
23
    }
24
25
    /**
26
     * Get all regions.
27
     *
28
     * @return \Illuminate\Database\Eloquent\Collection
29
     */
30
    public function all()
31
    {
32
        return $this->repository->all();
33
    }
34
}
35