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.

Collection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
eloc 13
c 2
b 0
f 2
dl 0
loc 44
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A _initSelect() 0 11 1
A addOmittedFilter() 0 4 1
A addExcludeGuestFilter() 0 4 1
A addIdFilter() 0 4 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaign\Model\ResourceModel\Order;
7
8
use CommerceLeague\ActiveCampaign\Setup\SchemaInterface;
9
use Magento\Sales\Model\ResourceModel\Order\Collection as ExtendCollection;
10
11
/**
12
 * Class Collection
13
 * @codeCoverageIgnore
14
 */
15
class Collection extends ExtendCollection
16
{
17
    /**
18
     * @inheritDoc
19
     */
20
    protected function _initSelect()
21
    {
22
        parent::_initSelect();
23
24
        $this->getSelect()->joinLeft(
25
            ['ac_order' => $this->_resource->getTable(SchemaInterface::ORDER_TABLE)],
0 ignored issues
show
Unused Code introduced by
The call to Magento\Framework\DB\Select::joinLeft() has too many arguments starting with array('ac_order' => $thi...nterface::ORDER_TABLE)). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        $this->getSelect()->/** @scrutinizer ignore-call */ joinLeft(

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
26
            'ac_order.magento_quote_id = main_table.quote_id',
27
            ['ac_order.activecampaign_id']
28
        );
29
30
        return $this;
31
    }
32
33
    /**
34
     * @return Collection
35
     */
36
    public function addExcludeGuestFilter(): self
37
    {
38
        $this->getSelect()->where('main_table.customer_is_guest = 0');
39
        return $this;
40
    }
41
42
    /**
43
     * @param int $orderId
44
     * @return Collection
45
     */
46
    public function addIdFilter(int $orderId): self
47
    {
48
        $this->getSelect()->where('main_table.entity_id = ?', $orderId);
49
        return $this;
50
    }
51
52
    /**
53
     * @return Collection
54
     */
55
    public function addOmittedFilter(): self
56
    {
57
        $this->getSelect()->where('ac_order.activecampaign_id IS NULL');
58
        return $this;
59
    }
60
}
61