RegionsController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A all() 0 4 1
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