Passed
Push — main ( e110ad...47f0cd )
by Dylan
02:09
created

MockResource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getService() 0 3 1
1
<?php
2
3
namespace Lifeboat\Tests\Resource;
4
5
use Lifeboat\Client;
6
use Lifeboat\Resource\ObjectResource;
7
use Lifeboat\Services\ApiService;
8
use Lifeboat\Tests\Services\MockService;
9
10
/**
11
 * Class MockResource
12
 * @package Lifeboat\Tests
13
 *
14
 * @property bool $bool_test
15
 * @property int $int_test
16
 * @property float $float_test
17
 * @property \DateTime $date_test
18
 */
19
class MockResource extends ObjectResource {
20
21
    protected static array $casting = [
22
        'bool_test'     => 'boolval',
23
        'int_test'      => 'intval',
24
        'float_test'    => 'floatval',
25
        'date_test'     => 'lifeboat_date_formatter'
26
    ];
27
28
    public function getService(): ApiService
29
    {
30
        return new MockService(new Client('mock', 'mock'));
31
    }
32
33
}
34