Code Duplication    Length = 12-12 lines in 2 locations

src/Charcoal/Ui/UiGroupingTrait.php 1 location

@@ 56-67 (lines=12) @@
53
     * @throws InvalidArgumentException If the priority is not an integer.
54
     * @return self
55
     */
56
    public function setPriority($priority)
57
    {
58
        if (!is_numeric($priority)) {
59
            throw new InvalidArgumentException(
60
                'Priority must be an integer'
61
            );
62
        }
63
64
        $this->priority = intval($priority);
65
66
        return $this;
67
    }
68
69
    /**
70
     * Retrieve the group's priority or sorting index.

src/Charcoal/Ui/FormGroup/FormGroupTrait.php 1 location

@@ 260-271 (lines=12) @@
257
     * @throws InvalidArgumentException If the priority is not an integer.
258
     * @return self
259
     */
260
    public function setPriority($priority)
261
    {
262
        if (!is_numeric($priority)) {
263
            throw new InvalidArgumentException(
264
                'Priority must be an integer'
265
            );
266
        }
267
268
        $this->priority = intval($priority);
269
270
        return $this;
271
    }
272
273
    /**
274
     * Retrieve the group's priority or sorting index.