PlaceDetailsHandler::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Arthem\GoogleApi\Domain\Place\Query\Place;
4
5
use Arthem\GoogleApi\Domain\Place\Place;
6
use Arthem\GoogleApi\Domain\Place\Query\AbstractHandler;
7
use Arthem\GooglePlaces\Domain\Place\Exception\PlaceNotFoundException;
8
9
class PlaceDetailsHandler extends AbstractHandler
10
{
11
    /**
12
     * @param PlaceDetailsQuery $query
13
     *
14
     * @return Place
15
     *
16
     * @throws PlaceNotFoundException
17
     */
18
    public function handle(PlaceDetailsQuery $query)
19
    {
20
        $params = [
21
            'placeid' => $query->getId()->getId(),
22
        ];
23
24
        return $this->client->details($params);
25
    }
26
}
27