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

DedicatedServersController::getBusyPorts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
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
}