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 ( 4f7bd5...08f33b )
by Andreas
03:20
created

Collection::getAggregations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaign\Model\ResourceModel\Contact\Grid;
7
8
use CommerceLeague\ActiveCampaign\Model\ResourceModel\Contact\Collection as ExtendCollection;
9
use Magento\Framework\Api\Search\AggregationInterface;
10
use Magento\Framework\Api\Search\SearchResultInterface;
11
use Magento\Framework\Api\SearchCriteriaInterface;
12
use Magento\Framework\Data\Collection\Db\FetchStrategyInterface;
13
use Magento\Framework\Data\Collection\EntityFactoryInterface;
14
use Magento\Framework\DB\Adapter\AdapterInterface;
15
use Magento\Framework\Event\ManagerInterface;
16
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
17
use Magento\Framework\View\Element\UiComponent\DataProvider\Document;
18
use Psr\Log\LoggerInterface;
19
20
/**
21
 * Class Collection
22
 */
23
class Collection extends ExtendCollection implements SearchResultInterface
24
{
25
    /**
26
     * @var AggregationInterface
27
     */
28
    private $aggregations;
29
30
    /**
31
     * @param EntityFactoryInterface $entityFactory
32
     * @param LoggerInterface $logger
33
     * @param FetchStrategyInterface $fetchStrategy
34
     * @param ManagerInterface $eventManager
35
     * @param string $mainTable
36
     * @param string $eventPrefix
37
     * @param string $eventObject
38
     * @param string $resourceModel
39
     * @param string $model
40
     * @param AdapterInterface|null $connection
41
     * @param AbstractDb|null $resource
42
     */
43
    public function __construct(
44
        EntityFactoryInterface $entityFactory,
45
        LoggerInterface $logger,
46
        FetchStrategyInterface $fetchStrategy,
47
        ManagerInterface $eventManager,
48
        string $mainTable,
49
        string $eventPrefix,
50
        string $eventObject,
51
        string $resourceModel,
52
        string $model = Document::class,
53
        AdapterInterface $connection = null,
54
        AbstractDb $resource = null
55
    ) {
56
        parent::__construct(
57
            $entityFactory,
58
            $logger,
59
            $fetchStrategy,
60
            $eventManager,
61
            $connection,
62
            $resource
63
        );
64
65
        $this->_eventPrefix = $eventPrefix;
66
        $this->_eventObject = $eventObject;
67
        $this->_init($model, $resourceModel);
68
        $this->setMainTable($mainTable);
69
    }
70
71
    /**
72
     * @inheritDoc
73
     */
74
    public function setItems(array $items = null)
75
    {
76
        return $this;
77
    }
78
79
    /**
80
     * @inheritDoc
81
     */
82
    public function getAggregations()
83
    {
84
        return $this->aggregations;
85
    }
86
87
    /**
88
     * @inheritDoc
89
     */
90
    public function setAggregations($aggregations)
91
    {
92
        $this->aggregations = $aggregations;
93
        return $this;
94
    }
95
96
    /**
97
     * @inheritDoc
98
     */
99
    public function getSearchCriteria()
100
    {
101
        return null;
102
    }
103
104
    /**
105
     * @inheritDoc
106
     */
107
    public function setSearchCriteria(SearchCriteriaInterface $searchCriteria = null)
108
    {
109
        return $this;
110
    }
111
112
    /**
113
     * @inheritDoc
114
     */
115
    public function getTotalCount()
116
    {
117
        return $this->getSize();
118
    }
119
120
    /**
121
     * @inheritDoc
122
     */
123
    public function setTotalCount($totalCount)
124
    {
125
        return $this;
126
    }
127
}
128