Completed
Push — master ( ba6641...734696 )
by Hamoud
27:01 queued 12:22
created

AddShipResponse::setAddShipResult()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 5
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of Smsa WebService package.
5
 * (c) Hamoud Alhoqbani <[email protected]>
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Alhoqbani\SmsaWebService\Soap\Type;
11
12
use \WsdlToPhp\PackageBase\AbstractStructBase;
13
14
/**
15
 * This class stands for addShipResponse Type
16
 *
17
 * @date 2018/04/06
18
 * @codeVersion 0.0.1
19
 */
20 View Code Duplication
class AddShipResponse extends AbstractStructBase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
{
22
    /**
23
     * The addShipResult
24
     * Meta informations extracted from the WSDL
25
     * - maxOccurs: 1
26
     * - minOccurs: 0
27
     *
28
     * @var string
29
     */
30
    public $addShipResult;
31
32
    /**
33
     * Constructor method for addShipResponse
34
     *
35
     * @uses AddShipResponse::setAddShipResult()
36
     *
37
     * @param string $addShipResult
38
     */
39
    public function __construct($addShipResult = null)
40
    {
41
        $this
42
            ->setAddShipResult($addShipResult);
43
    }
44
45
    /**
46
     * Get addShipResult value
47
     *
48
     * @return string|null
49
     */
50
    public function getAddShipResult()
51
    {
52
        return $this->addShipResult;
53
    }
54
55
    /**
56
     * Set addShipResult value
57
     *
58
     * @param string $addShipResult
59
     *
60
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipResponse
61
     */
62
    public function setAddShipResult($addShipResult = null)
63
    {
64
        // validation for constraint: string
65
        if (!is_null($addShipResult) && !is_string($addShipResult)) {
66
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($addShipResult)), __LINE__);
67
        }
68
        $this->addShipResult = $addShipResult;
69
70
        return $this;
71
    }
72
73
    /**
74
     * Method called when an object has been exported with var_export() functions
75
     * It allows to return an object instantiated with the values
76
     *
77
     * @see AbstractStructBase::__set_state()
78
     *
79
     * @uses AbstractStructBase::__set_state()
80
     *
81
     * @param array $array the exported values
82
     *
83
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipResponse
84
     */
85
    public static function __set_state(array $array)
86
    {
87
        return parent::__set_state($array);
88
    }
89
90
    /**
91
     * Method returning the class name
92
     *
93
     * @return string __CLASS__
94
     */
95
    public function __toString()
96
    {
97
        return __CLASS__;
98
    }
99
}
100