Places::getClient()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
/*
4
 * This file is part of the 2amigos/yii2-google-places-library project.
5
 *
6
 * (c) 2amigOS! <http://2amigos.us/>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace dosamigos\google\places;
13
14
use Da\Google\Places\Client\PlaceClient;
15
16
/**
17
 * Inherited methods from PlaceClient
18
 *
19
 * @see PlaceClient
20
 *
21
 * @method details(string $placeid, string $language, array $params) Returns the details of a place.
22
 * @method photo(string $reference, array $params) Returns a photo content.
23
 * @method add(array $location, string $name, array $types, string $accuracy, string $language, array $params)
24
 * @method delete(string $reference)
25
 */
26
class Places extends AbstractComponent
27
{
28
    /**
29
     * @return PlaceClient
30
     */
31
    public function getClient()
32
    {
33
        if (null === $this->client) {
34
            $this->client = new PlaceClient($this->key, $this->format);
35
        }
36
37
        $this->client->forceJsonArrayResponse($this->forceJsonArrayResponse);
0 ignored issues
show
Bug introduced by
The method forceJsonArrayResponse() does not seem to exist on object<Da\Google\Places\Client\AbstractClient>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
39
        return $this->client;
40
    }
41
}
42