Test Failed
Push — develop ( afdfe8...4f2671 )
by Nikita
13:43
created

DedicatedServersController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 6
c 0
b 0
f 0
dl 0
loc 36
ccs 0
cts 6
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getBusyPorts() 0 3 1
A getIpList() 0 3 1
1
<?php
2
3
namespace Gameap\Http\Controllers\API;
4
5
use Gameap\Http\Controllers\AuthController;
6
use Gameap\Repositories\DedicatedServersRepository;
7
use Gameap\Models\DedicatedServer;
8
9
class DedicatedServersController extends AuthController
10
{
11
    /**
12
     * The DedicatedServersRepository instance.
13
     *
14
     * @var \Gameap\Repositories\DedicatedServersRepository
15
     */
16
    public $repository;
17
18
    /**
19
     * DedicatedServersController constructor.
20
     * @param DedicatedServersRepository $repository
21
     */
22
    public function __construct(DedicatedServersRepository $repository)
23
    {
24
        parent::__construct();
25
26
        $this->repository = $repository;
27
    }
28
29
    /**
30
     * @param int $id
31
     * @return array
32
     */
33
    public function getIpList(int $id)
34
    {
35
        return $this->repository->getIpList($id);
36
    }
37
38
    /**
39
     * @param int $id
40
     * @return array
41
     */
42
    public function getBusyPorts(int $id)
43
    {
44
        return $this->repository->getBusyPorts($id);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->repository->getBusyPorts($id) returns the type Illuminate\Support\Collection which is incompatible with the documented return type array.
Loading history...
45
    }
46
}