WeatherMock::getWeatherPast()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
namespace Blixter\Mock;
3
4
class WeatherMock
5
{
6
    /**
7
     * Function that takes an coordinate and gets upcomming weather.
8
     *
9
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
10
     * @return array $result
11
     */
12 1
    public function getWeatherUpcoming(): array
13
    {
14 1
        $json = file_get_contents(ANAX_INSTALL_PATH . "/src/Mock/weather-upcoming.json");
15
16 1
        return [$json];
17
    }
18
    /**
19
     * Function that takes an coordinate and get past 30 days weather
20
     *
21
     *
22
     * @return array $result
23
     */
24 1
    public function getWeatherPast(): array
25
    {
26
27 1
        $json = file_get_contents(ANAX_INSTALL_PATH . "/src/Mock/weather-past.json");
28
29 1
        return [$json];
30
    }
31
}
32