1 | <?php namespace Arcanedev\GeoLocation\Google\Directions\Entities; |
||
18 | class Step implements Arrayable, Jsonable, JsonSerializable |
||
19 | { |
||
20 | /* ----------------------------------------------------------------- |
||
21 | | Traits |
||
22 | | ----------------------------------------------------------------- |
||
23 | */ |
||
24 | |||
25 | use CanBeJsonable; |
||
26 | |||
27 | /* ----------------------------------------------------------------- |
||
28 | | Properties |
||
29 | | ----------------------------------------------------------------- |
||
30 | */ |
||
31 | |||
32 | /** |
||
33 | * The start location. |
||
34 | * |
||
35 | * @var \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
36 | */ |
||
37 | protected $start; |
||
38 | |||
39 | /** |
||
40 | * The end location. |
||
41 | * |
||
42 | * @var \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
43 | */ |
||
44 | protected $end; |
||
45 | |||
46 | /** |
||
47 | * The distance. |
||
48 | * |
||
49 | * @var \Arcanedev\GeoLocation\Entities\Measures\Distance |
||
50 | */ |
||
51 | protected $distance; |
||
52 | |||
53 | /** |
||
54 | * The duration. |
||
55 | * |
||
56 | * @var \Arcanedev\GeoLocation\Entities\Measures\Duration |
||
57 | */ |
||
58 | protected $duration; |
||
59 | |||
60 | /** |
||
61 | * The travel mode. |
||
62 | * |
||
63 | * @var string |
||
64 | */ |
||
65 | protected $mode; |
||
66 | |||
67 | /** |
||
68 | * The instructions (HTML format). |
||
69 | * |
||
70 | * @var string |
||
71 | */ |
||
72 | protected $instructions; |
||
73 | |||
74 | /** |
||
75 | * The polyline. |
||
76 | * |
||
77 | * @var array |
||
78 | */ |
||
79 | protected $polyline; |
||
80 | |||
81 | /* ----------------------------------------------------------------- |
||
82 | | Constructor |
||
83 | | ----------------------------------------------------------------- |
||
84 | */ |
||
85 | |||
86 | /** |
||
87 | * Step constructor. |
||
88 | * |
||
89 | * @param array $data |
||
90 | */ |
||
91 | 21 | public function __construct(array $data) |
|
101 | |||
102 | /* ----------------------------------------------------------------- |
||
103 | | Getters & Setters |
||
104 | | ----------------------------------------------------------------- |
||
105 | */ |
||
106 | |||
107 | /** |
||
108 | * Get the start location. |
||
109 | * |
||
110 | * @return \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
111 | */ |
||
112 | 9 | public function start() |
|
116 | |||
117 | /** |
||
118 | * Get the end location. |
||
119 | * |
||
120 | * @return \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
121 | */ |
||
122 | 9 | public function end() |
|
126 | |||
127 | /** |
||
128 | * Get the distance. |
||
129 | * |
||
130 | * @return \Arcanedev\GeoLocation\Entities\Measures\Distance |
||
131 | */ |
||
132 | 9 | public function distance() |
|
136 | |||
137 | /** |
||
138 | * Get the duration. |
||
139 | * |
||
140 | * @return \Arcanedev\GeoLocation\Entities\Measures\Duration |
||
141 | */ |
||
142 | 9 | public function duration() |
|
146 | |||
147 | /** |
||
148 | * Get the traveling mode. |
||
149 | * |
||
150 | * @return string |
||
151 | */ |
||
152 | 9 | public function mode() |
|
156 | |||
157 | /** |
||
158 | * Get the instructions (HTML format) |
||
159 | * @return string |
||
160 | */ |
||
161 | 9 | public function instructions() |
|
165 | |||
166 | /** |
||
167 | * Get the polyline. |
||
168 | * |
||
169 | * @return array |
||
170 | */ |
||
171 | 9 | public function polyline() |
|
175 | |||
176 | /* ----------------------------------------------------------------- |
||
177 | | Main Methods |
||
178 | | ----------------------------------------------------------------- |
||
179 | */ |
||
180 | |||
181 | /** |
||
182 | * Get the instance as an array. |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | 6 | public function toArray() |
|
198 | } |
||
199 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..