Code Duplication    Length = 9-13 lines in 8 locations

src/MetadataV3/mapping/cs/Groups/TPropertyGroup.php 1 location

@@ 68-76 (lines=9) @@
65
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
66
     * @return self
67
     */
68
    public function setScalarProperty(TScalarPropertyType $scalarProperty)
69
    {
70
        $msg = null;
71
        if (!$scalarProperty->isOK($msg)) {
72
            throw new \InvalidArgumentException($msg);
73
        }
74
        $this->scalarProperty = $scalarProperty;
75
        return $this;
76
    }
77
78
    /**
79
     * Gets as condition

src/MetadataV3/mapping/cs/TComplexPropertyType.php 1 location

@@ 137-145 (lines=9) @@
134
     * @return self
135
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
136
     */
137
    public function addToScalarProperty(TScalarPropertyType $scalarProperty)
138
    {
139
        $msg = null;
140
        if (!$scalarProperty->isOK($msg)) {
141
            throw new \InvalidArgumentException($msg);
142
        }
143
        $this->scalarProperty[] = $scalarProperty;
144
        return $this;
145
    }
146
147
    /**
148
     * isset scalarProperty

src/MetadataV3/mapping/cs/TComplexTypeMappingType.php 1 location

@@ 98-106 (lines=9) @@
95
     * @return self
96
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
97
     */
98
    public function addToScalarProperty(TScalarPropertyType $scalarProperty)
99
    {
100
        $msg = null;
101
        if (!$scalarProperty->isOK($msg)) {
102
            throw new \InvalidArgumentException($msg);
103
        }
104
        $this->scalarProperty[] = $scalarProperty;
105
        return $this;
106
    }
107
108
    /**
109
     * isset scalarProperty

src/MetadataV3/mapping/cs/TEndPropertyType.php 2 locations

@@ 64-72 (lines=9) @@
61
     * @return self
62
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
63
     */
64
    public function addToScalarProperty(TScalarPropertyType $scalarProperty)
65
    {
66
        $msg = null;
67
        if (!$scalarProperty->isOK($msg)) {
68
            throw new \InvalidArgumentException($msg);
69
        }
70
        $this->scalarProperty[] = $scalarProperty;
71
        return $this;
72
    }
73
74
    /**
75
     * isset scalarProperty
@@ 112-124 (lines=13) @@
109
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType[] $scalarProperty
110
     * @return self
111
     */
112
    public function setScalarProperty(array $scalarProperty)
113
    {
114
        $msg = null;
115
        if (!$this->isValidArrayOK(
116
            $scalarProperty,
117
            '\AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType',
118
            $msg
119
        )) {
120
            throw new \InvalidArgumentException($msg);
121
        }
122
        $this->scalarProperty = $scalarProperty;
123
        return $this;
124
    }
125
126
    public function isOK(&$msg = null)
127
    {

src/MetadataV3/mapping/cs/TFunctionImportComplexTypeMappingType.php 2 locations

@@ 59-67 (lines=9) @@
56
     * @return self
57
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
58
     */
59
    public function addToScalarProperty(TScalarPropertyType $scalarProperty)
60
    {
61
        $msg = null;
62
        if (!$scalarProperty->isOK($msg)) {
63
            throw new \InvalidArgumentException($msg);
64
        }
65
        $this->scalarProperty[] = $scalarProperty;
66
        return $this;
67
    }
68
69
    /**
70
     * isset scalarProperty
@@ 107-119 (lines=13) @@
104
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType[] $scalarProperty
105
     * @return self
106
     */
107
    public function setScalarProperty(array $scalarProperty)
108
    {
109
        $msg = null;
110
        if (!$this->isValidArrayOK(
111
            $scalarProperty,
112
            '\AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType',
113
            $msg
114
        )) {
115
            throw new \InvalidArgumentException($msg);
116
        }
117
        $this->scalarProperty = $scalarProperty;
118
        return $this;
119
    }
120
121
    public function isOK(&$msg = null)
122
    {

src/MetadataV3/mapping/cs/TFunctionImportEntityTypeMappingType.php 1 location

@@ 64-72 (lines=9) @@
61
     * @return self
62
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
63
     */
64
    public function addToScalarProperty(TScalarPropertyType $scalarProperty)
65
    {
66
        $msg = null;
67
        if (!$scalarProperty->isOK($msg)) {
68
            throw new \InvalidArgumentException($msg);
69
        }
70
        $this->scalarProperty[] = $scalarProperty;
71
        return $this;
72
    }
73
74
    /**
75
     * isset scalarProperty