Code Duplication    Length = 8-8 lines in 2 locations

src/Field.php 1 location

@@ 22-29 (lines=8) @@
19
     * @param self $return Variable to return found database record
20
     * @return bool|null|self  Field instance or null if 3rd parameter not passed
21
     */
22
    public static function byName(QueryInterface $query, $name, self & $return = null)
23
    {
24
        // Get field record by name column
25
        $return = static::oneByColumn($query, 'Name', $name);
26
27
        // If only one argument is passed - return null, otherwise bool
28
        return func_num_args() > 1 ? $return == null : $return;
29
    }
30
}
31

src/Material.php 1 location

@@ 32-39 (lines=8) @@
29
     * @param self[]|array|null $return Variable where request result would be returned
30
     * @return bool|self[] True if material entities has been found
31
     */
32
    public static function byUrl(QueryInterface $query, $url, & $return = array())
33
    {
34
        // Get field record by identifier column
35
        $return = static::collectionByColumn($query, 'Url', $url);
36
37
        // If only one argument is passed - return null, otherwise bool
38
        return func_num_args() > 1 ? $return == null : $return;
39
    }
40
41
    /**
42
     * Set additional material field value by field identifier