Search   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 10 2
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\SearchClient;
15
16
/**
17
 * Inherited methods from SearchClient
18
 *
19
 * @see SearchClient
20
 *
21
 * @method nearby(string $location, array $params)
22
 * @method text(string $query, array $params)
23
 * @method radar(string $location, string $radius, array $params)
24
 * @method autoComplete(string $input, string $language, array $params)
25
 */
26
class Search extends AbstractComponent
27
{
28
    /**
29
     * @return SearchClient
30
     */
31
    public function getClient()
32
    {
33
        if (null === $this->client) {
34
            $this->client = new SearchClient($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