Passed
Push — feature/v4 ( dac4aa...0faea2 )
by Samuel
04:34
created

AbstractPlaceSerializableService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 17
ccs 7
cts 8
cp 0.875
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Ivory Google Map package.
7
 *
8
 * (c) Eric GELOEN <[email protected]>
9
 *
10
 * For the full copyright and license information, please read the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ivory\GoogleMap\Service\Place;
15
16
use Ivory\GoogleMap\Service\AbstractSerializableService;
17
use Ivory\Serializer\SerializerInterface;
18
use Psr\Http\Client\ClientInterface as HttpClient;
19
use Psr\Http\Message\RequestFactoryInterface as MessageFactory;
20
21
abstract class AbstractPlaceSerializableService extends AbstractSerializableService
22
{
23 2
    public function __construct(
24
        HttpClient $client,
25
        MessageFactory $messageFactory,
26
        SerializerInterface $serializer = null,
27
        string $context = null
28
    ) {
29 2
        if (null !== $context) {
30
            $context = '/'.$context;
31
        }
32
33 2
        parent::__construct(
34 2
            'https://maps.googleapis.com/maps/api/place'.$context,
35 2
            $client,
36 2
            $messageFactory,
37 2
            $serializer
38
        );
39 2
    }
40
}
41