Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct() |
||
27 | { |
||
28 | $this->baseUrl = self::YAHOO_API; |
||
29 | $this->client = new Client(['base_uri' => $this->baseUrl]); |
||
30 | |||
31 | $query = "SELECT * FROM weather.forecast WHERE (location = 10007)"; |
||
32 | |||
33 | $relativeUrl = '?q=' . $query . '&format=json'; |
||
34 | $this->setGetResponse($relativeUrl); |
||
35 | } |
||
36 | |||
77 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: