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.

OperationTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 29
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setResponseGroup() 0 6 1
A getOperationParameter() 0 4 1
1
<?php
2
/*
3
 * Copyright 2016 Jan Eichhorn <[email protected]>
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
18
namespace ApaiIO\Common;
19
20
/**
21
 * This trait allows you to add the basic operation functions to your class.
22
 *
23
 * @author Jan Eichhorn <[email protected]>
24
 */
25
trait OperationTrait
26
{
27
    protected $parameters = [];
28
29
    /**
30
     * Sets the responsegroups for the current operation
31
     * Which responsegroups are available depends on the Operation you perform
32
     *
33
     * @param array $responseGroup The responsegroup as an array
34
     *
35
     * @see http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_ResponseGroupsList.html
36
     */
37 1
    public function setResponseGroup(array $responseGroup)
38
    {
39 1
        $this->parameters['ResponseGroup'] = $responseGroup;
40
41 1
        return $this;
42
    }
43
44
    /**
45
     * Returns all paramerters belonging to the current operation
46
     *
47
     * @return array
48
     */
49 1
    public function getOperationParameter()
50
    {
51 1
        return $this->parameters;
52
    }
53
}
54