1 | <?php |
||
22 | class SyncTimings extends Command |
||
23 | { |
||
24 | /** |
||
25 | * @var SymfonyStyle |
||
26 | */ |
||
27 | private $io; |
||
28 | |||
29 | /** |
||
30 | * @var TogglClient |
||
31 | */ |
||
32 | private $togglClient; |
||
33 | |||
34 | /** |
||
35 | * @var ReportsClient |
||
36 | */ |
||
37 | private $reportsClient; |
||
38 | |||
39 | /** |
||
40 | * @var InvoiceNinjaClient |
||
41 | */ |
||
42 | private $invoiceNinjaClient; |
||
43 | |||
44 | /** |
||
45 | * @var array |
||
46 | */ |
||
47 | private $clients; |
||
48 | |||
49 | /** |
||
50 | * @var array |
||
51 | */ |
||
52 | private $projects; |
||
53 | |||
54 | /** |
||
55 | * SyncTimings constructor. |
||
56 | * |
||
57 | * @param TogglClient $togglClient |
||
58 | * @param ReportsClient $reportsClient |
||
59 | * @param InvoiceNinjaClient $invoiceNinjaClient |
||
60 | * @param array $clients |
||
61 | * @param array $projects |
||
62 | */ |
||
63 | public function __construct( |
||
78 | |||
79 | /** |
||
80 | * Configure the command |
||
81 | */ |
||
82 | protected function configure() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | protected function execute(InputInterface $input, OutputInterface $output) |
||
124 | |||
125 | /** |
||
126 | * @param $config |
||
127 | * @param $entryKey |
||
128 | * @param $hasAlreadyBeenSent |
||
129 | * |
||
130 | * @return bool |
||
131 | */ |
||
132 | private function timeEntryCanBeLoggedByConfig($config, $entryKey, $hasAlreadyBeenSent) |
||
140 | |||
141 | /** |
||
142 | * @param TimeEntry $entry |
||
143 | * @param array $config |
||
144 | * @param $key |
||
145 | */ |
||
146 | private function logTask(TimeEntry $entry, array $config, $key) |
||
156 | |||
157 | /** |
||
158 | * @param TimeEntry $entry |
||
159 | * |
||
160 | * @return string |
||
161 | */ |
||
162 | private function buildTaskDescription(TimeEntry $entry) |
||
174 | |||
175 | /** |
||
176 | * @param TimeEntry $entry |
||
177 | * |
||
178 | * @return string |
||
179 | */ |
||
180 | private function buildTimeLog(TimeEntry $entry) |
||
189 | } |
||
190 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.