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::_initSelect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 6
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 11
rs 10
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