Code Duplication    Length = 12-14 lines in 3 locations

src/YahooShoppingJp/Request/UpdateOrderShippingStatusRequest.php 3 locations

@@ 119-132 (lines=14) @@
116
     * @param string $shipNotes
117
     * @return self
118
     */
119
    public function setShipNotes(string $shipNotes): self
120
    {
121
        if (isset($this->params['Order']['Ship']['ShipNotes'])) {
122
            throw new LogicException('ShipNotes is already set.');
123
        }
124
125
        if(strlen($shipNotes) > 500){
126
            throw new InvalidArgumentException('ShipNotes is invalid.');
127
        }
128
129
        $this->params['Order']['Ship']['ShipNotes'] = $shipNotes;
130
131
        return $this;
132
    }
133
134
    /**
135
     * @param string $shipInvoiceNumber1
@@ 183-194 (lines=12) @@
180
     * @param \DateTimeImmutable $shipDate
181
     * @return self
182
     */
183
    public function setShipDate(\DateTimeImmutable $shipDate): self
184
    {
185
        if (isset($this->params['Order']['Ship']['ShipDate'])) {
186
            throw new LogicException('ShipDate is already set.');
187
        }
188
189
        $this->params['Order']['Ship']['ShipDate'] = $shipDate
190
                                                ->setTimeZone(new DateTimeZone('Asia/Tokyo'))
191
                                                ->format('Ymd');
192
193
        return $this;
194
    }
195
196
    /**
197
     * @param \DateTimeImmutable $arrivalDate
@@ 200-211 (lines=12) @@
197
     * @param \DateTimeImmutable $arrivalDate
198
     * @return self
199
     */
200
    public function setArrivalDate(\DateTimeImmutable $arrivalDate): self
201
    {
202
        if (isset($this->params['Order']['Ship']['ArrivalDate'])) {
203
            throw new LogicException('ArrivalDate is already set.');
204
        }
205
206
        $this->params['Order']['Ship']['ArrivalDate'] = $arrivalDate
207
                                                    ->setTimeZone(new DateTimeZone('Asia/Tokyo'))
208
                                                    ->format('Ymd');
209
210
        return $this;
211
    }
212
213
    /**
214
     * @throws InvalidRequestException