1 | <?php |
||
24 | class DataProvidersImport extends Command |
||
25 | { |
||
26 | /** |
||
27 | * The name and signature of the console command. |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $signature = 'data-providers:import'; |
||
31 | |||
32 | /** |
||
33 | * The console command description. |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $description = 'Run import articles from external services'; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $published = []; |
||
42 | |||
43 | /** |
||
44 | * @param Manager $manager |
||
45 | * @throws \InvalidArgumentException |
||
46 | */ |
||
47 | public function handle(Manager $manager) |
||
53 | |||
54 | /** |
||
55 | * @param Manager $manager |
||
56 | * @return void |
||
57 | */ |
||
58 | private function importNotPublished(Manager $manager): void |
||
68 | |||
69 | /** |
||
70 | * @param \DateTime $time |
||
71 | * @param DataProviderInterface $provider |
||
72 | */ |
||
73 | private function import(\DateTime $time, DataProviderInterface $provider) |
||
89 | |||
90 | /** |
||
91 | * @param Manager $manager |
||
92 | * @throws \InvalidArgumentException |
||
93 | * @return void |
||
94 | */ |
||
95 | private function importPublished(Manager $manager): void |
||
107 | |||
108 | /** |
||
109 | * @return \Generator|Article[] |
||
110 | */ |
||
111 | private function getLatestBotArticles(): \Generator |
||
127 | } |
||
128 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.