GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AbstractExportCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 9
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaign\Console\Command;
7
8
use CommerceLeague\ActiveCampaign\Helper\Config as ConfigHelper;
9
use Magento\Framework\MessageQueue\PublisherInterface;
10
use Symfony\Component\Console\Command\Command;
11
use Symfony\Component\Console\Helper\ProgressBar;
12
use Symfony\Component\Console\Helper\ProgressBarFactory;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Consol...lper\ProgressBarFactory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use Symfony\Component\Console\Output\OutputInterface;
14
15
/**
16
 * Class AbstractExportCommand
17
 */
18
abstract class AbstractExportCommand extends Command
19
{
20
    /**
21
     * @var ConfigHelper
22
     */
23
    protected $configHelper;
24
25
    /**
26
     * @var ProgressBarFactory
27
     */
28
    private $progressBarFactory;
29
30
    /**
31
     * @var PublisherInterface
32
     */
33
    protected $publisher;
34
35
    /**
36
     * @param ConfigHelper $configHelper
37
     * @param ProgressBarFactory $progressBarFactory
38
     * @param PublisherInterface $publisher
39
     */
40
    public function __construct(
41
        ConfigHelper $configHelper,
42
        ProgressBarFactory $progressBarFactory,
43
        PublisherInterface $publisher
44
    ) {
45
        $this->configHelper = $configHelper;
46
        $this->progressBarFactory = $progressBarFactory;
47
        $this->publisher = $publisher;
48
        parent::__construct();
49
    }
50
51
    /**
52
     * @param OutputInterface $output
53
     * @param string $message
54
     * @param int $max
55
     * @return ProgressBar
56
     */
57
    protected function createProgressBar(OutputInterface $output, int $max, string $message): ProgressBar
58
    {
59
        /** @var ProgressBar $progressBar */
60
        $progressBar = $this->progressBarFactory->create(['output' => $output, 'max' => $max]);
61
        $progressBar->setFormat('<comment>%message%</comment> %current%/%max% [%bar%] %percent:3s%% %elapsed%');
62
        $progressBar->setMessage($message);
63
64
        return $progressBar;
65
    }
66
}
67