Code Duplication    Length = 10-10 lines in 3 locations

src/Sylius/Component/Order/Model/OrderItem.php 1 location

@@ 263-272 (lines=10) @@
260
    /**
261
     * {@inheritdoc}
262
     */
263
    public function getAdjustments($type = null)
264
    {
265
        if (null === $type) {
266
            return $this->adjustments;
267
        }
268
269
        return $this->adjustments->filter(function (AdjustmentInterface $adjustment) use ($type) {
270
            return $type === $adjustment->getType();
271
        });
272
    }
273
274
    /**
275
     * {@inheritdoc}

src/Sylius/Component/Order/Model/OrderItemUnit.php 1 location

@@ 86-95 (lines=10) @@
83
    /**
84
     * {@inheritdoc}
85
     */
86
    public function getAdjustments($type = null)
87
    {
88
        if (null === $type) {
89
            return $this->adjustments;
90
        }
91
92
        return $this->adjustments->filter(function (AdjustmentInterface $adjustment) use ($type) {
93
            return $type === $adjustment->getType();
94
        });
95
    }
96
97
    /**
98
     * {@inheritdoc}

src/Sylius/Component/Order/Model/Order.php 1 location

@@ 379-388 (lines=10) @@
376
    /**
377
     * {@inheritdoc}
378
     */
379
    public function getAdjustments($type = null)
380
    {
381
        if (null === $type) {
382
            return $this->adjustments;
383
        }
384
385
        return $this->adjustments->filter(function (AdjustmentInterface $adjustment) use ($type) {
386
            return $type === $adjustment->getType();
387
        });
388
    }
389
390
    /**
391
     * {@inheritdoc}