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.
Completed
Push — master ( c8c4e6...db9143 )
by Andreas
03:30
created

AbstractExportCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 7
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 Magento\Framework\MessageQueue\PublisherInterface;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Helper\ProgressBar;
11
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...
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
/**
15
 * Class AbstractExportCommand
16
 */
17
abstract class AbstractExportCommand extends Command
18
{
19
    /**
20
     * @var ProgressBarFactory
21
     */
22
    private $progressBarFactory;
23
24
    /**
25
     * @var PublisherInterface
26
     */
27
    protected $publisher;
28
29
    /**
30
     * @param ProgressBarFactory $progressBarFactory
31
     * @param PublisherInterface $publisher
32
     */
33
    public function __construct(
34
        ProgressBarFactory $progressBarFactory,
35
        PublisherInterface $publisher
36
    ) {
37
        $this->progressBarFactory = $progressBarFactory;
38
        $this->publisher = $publisher;
39
        parent::__construct();
40
    }
41
42
    /**
43
     * @param OutputInterface $output
44
     * @param string $message
45
     * @param int $max
46
     * @return ProgressBar
47
     */
48
    protected function createProgressBar(OutputInterface $output, int $max, string $message): ProgressBar
49
    {
50
        /** @var ProgressBar $progressBar */
51
        $progressBar = $this->progressBarFactory->create(['output' => $output, 'max' => $max]);
52
        $progressBar->setFormat('<comment>%message%</comment> %current%/%max% [%bar%] %percent:3s%% %elapsed%');
53
        $progressBar->setMessage($message);
54
55
        return $progressBar;
56
    }
57
}
58