Completed
Push — master ( 89477f...f97380 )
by Mahmoud
08:17
created

FindCountryTaskById::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace App\Containers\Countries\Tasks;
4
5
use App\Containers\Countries\Data\Repositories\CountryRepository;
6
use App\Port\Task\Abstracts\Task;
7
8
/**
9
 * Class FindCountryTaskById.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class FindCountryTaskById extends Task
14
{
15
16
    /**
17
     * @var  \App\Containers\Countries\Data\Repositories\CountryRepository
18
     */
19
    private $countryRepository;
20
21
    /**
22
     * FindCountryTaskByIso constructor.
23
     *
24
     * @param \App\Containers\Countries\Data\Repositories\CountryRepository $countryRepository
25
     */
26
    public function __construct(CountryRepository $countryRepository)
27
    {
28
        $this->countryRepository = $countryRepository;
29
    }
30
31
    /**
32
     * @param $id
33
     *
34
     * @return  mixed
35
     */
36
    public function run($id)
37
    {
38
        return $this->countryRepository->find($id);
39
    }
40
41
}
42