Completed
Pull Request — master (#1)
by Arthur
02:26
created

TextSearchQuery::getQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Arthem\GoogleApi\Domain\Place\Query\Search;
4
5
use Arthem\GoogleApi\Domain\Place\VO\Location;
6
use Arthem\GoogleApi\Domain\Place\VO\Query;
7
use Arthem\GoogleApi\Domain\Place\VO\Radius;
8
9
class TextSearchQuery
10
{
11
    /**
12
     * @var Query
13
     */
14
    private $query;
15
16
    /**
17
     * @var Location
18
     */
19
    private $location;
20
21
    /**
22
     * @var Radius
23
     */
24
    private $radius;
25
26
    /**
27
     * @param string         $query
28
     * @param float|null     $latitude
29
     * @param float|null     $longitude
30
     * @param int|float|null $radius
31
     * @param string|null    $name
0 ignored issues
show
Bug introduced by
There is no parameter named $name. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
32
     */
33
    public function __construct($query, $latitude = null, $longitude = null, $radius = null)
34
    {
35
        $this->query = new Query($query);
36
37
        if (null !== $latitude) {
38
            $this->location = new Location($latitude, $longitude);
39
        }
40
41
        if (null !== $radius) {
42
            $this->radius = new Radius($radius);
43
        }
44
    }
45
46
    /**
47
     * @return Query
48
     */
49
    public function getQuery()
50
    {
51
        return $this->query;
52
    }
53
54
    /**
55
     * @return Location|null
56
     */
57
    public function getLocation()
58
    {
59
        return $this->location;
60
    }
61
62
    /**
63
     * @return Radius|null
64
     */
65
    public function getRadius()
66
    {
67
        return $this->radius;
68
    }
69
}
70