for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Weather Mock
*/
namespace Hepa19\Weather;
* Mock weather model
*
class WeatherModelMock extends WeatherModel
{
* Mock data for successful curl
* @return array $res Result
public function getData()
$res = [
"location" => "8.8.8.8",
"longitude" => -122.074310302734375,
"latitude" => 37.388019561767578125,
"weather" => [
[
"date" => "17/11",
"temp" => 14,
"wind" => 2,
"desc" => "klar himmel",
"icon" => "http://openweathermap.org/img/wn/[email protected]"
],
"date" => "18/11",
"wind" => 6,
"desc" => "molnigt",
"date" => "19/11",
"temp" => 9,
"wind" => 1,
"date" => "20/11",
"temp" => 7,
"date" => "21/11",
"temp" => 8,
]
"map_link" => "https://www.openstreetmap.org/#map=13/37.388019561768/-122.07431030273"
];
return $res;
}