Code Duplication    Length = 10-10 lines in 2 locations

htdocs/xoops_lib/Xoops/Form/ElementTray.php 1 location

@@ 92-101 (lines=10) @@
89
     *
90
     * @return array array of Element objects
91
     */
92
    public function getRequired()
93
    {
94
        $required = [];
95
        foreach ($this->elements as $el) {
96
            if ($el->isRequired()) {
97
                $required[] = $el;
98
            }
99
        }
100
        return $required;
101
    }
102
103
    /**
104
     * Get an array of the elements in this group

htdocs/xoops_lib/Xoops/Form/Form.php 1 location

@@ 394-403 (lines=10) @@
391
     *
392
     * @return array array of Xoops\Form\Element
393
     */
394
    public function getRequired()
395
    {
396
        $required = [];
397
        foreach ($this->elements as $el) {
398
            if ($el->isRequired()) {
399
                $required[] = $el;
400
            }
401
        }
402
        return $required;
403
    }
404
405
    /**
406
     * render - returns rendered form