Completed
Push — main ( f9c7f4...aea9b1 )
by Emmanuel
06:11
created

FeedInTimezone::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Epmnzava\Eticket\Console;
4
5
use Epmnzava\Eticket\Actions\GetTimezone;
6
use Illuminate\Console\Command;
7
use Illuminate\Support\Facades\File;
8
use Illuminate\Support\Facades\Http;
9
use GuzzleHttp\Exception\GuzzleException;
10
use GuzzleHttp\Client;
11
use GuzzleHttp\Psr7\Request;
12
13
class FeedInTimezone extends Command
14
{
15
    protected $signature = 'eticket:feedtimezone';
16
17
    protected $description = 'feed in timezone ';
18
19
    public function handle()
20
    {
21
        $this->info('Begining to feed in timezone');
22
23
        $timezones = $this->fetchTimezones();
24
25
        $this->saveUtcData($timezones);
0 ignored issues
show
Unused Code introduced by
The call to FeedInTimezone::saveUtcData() has too many arguments starting with $timezones.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
26
27
28
29
        $this->info('End setting ticket timezone feedin');
30
    }
31
32
    public function saveUtcData()
33
    {
34
    }
35
36
    public function fetchTimezones()
37
    {
38
39
40
        $timezones = new GetTimezone;
41
        $reponse = $timezones->getTimezones();
42
        return json_decode($reponse->getBody());
43
    }
44
}
45