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.

OrderInformationExtractor   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
A extract() 0 8 3
1
<?php
2
3
namespace Magium\Magento\Extractors\Admin;
4
5
use Magium\Extractors\AbstractExtractor;
6
use Magium\Magento\Extractors\Admin\Order\AccountInformation;
7
use Magium\Magento\Extractors\Admin\Order\BillingAddress;
8
use Magium\Magento\Extractors\Admin\Order\OrderItems;
9
use Magium\Magento\Extractors\Admin\Order\OrderSummary;
10
use Magium\Magento\Extractors\Admin\Order\PaymentInformation;
11
use Magium\Magento\Extractors\Admin\Order\ShippingAddress;
12
use Magium\Magento\Extractors\Admin\Order\ShippingInformation;
13
use Magium\Magento\Extractors\Admin\Order\Totals;
14
15
class OrderInformationExtractor extends AbstractExtractor
16
{
17
    const EXTRACTOR = 'Admin\OrderInformationExtractor';
18
    protected $extractors = [];
19
20
    public function __construct(
21
        AccountInformation      $accountInformation,
22
        BillingAddress          $billingAddress,
23
        OrderItems              $orderItems,
24
        OrderSummary            $orderSummary,
25
        PaymentInformation      $paymentInformation,
26
        ShippingAddress         $shippingAddress,
27
        ShippingInformation     $shippingInformation,
28
        Totals                  $totals
29
    )
30
    {
31
        $this->extractors[] = $accountInformation;
32
        $this->extractors[] = $billingAddress;
33
        $this->extractors[] = $orderItems;
34
        $this->extractors[] = $orderSummary;
35
        $this->extractors[] = $paymentInformation;
36
        $this->extractors[] = $shippingAddress;
37
        $this->extractors[] = $shippingInformation;
38
        $this->extractors[] = $totals;
39
    }
40
41
    public function extract()
42
    {
43
        foreach ($this->extractors as $extractor) {
44
            if ($extractor instanceof AbstractExtractor) {
45
                $extractor->extract();
46
            }
47
        }
48
    }
49
50
}