Code Duplication    Length = 8-8 lines in 2 locations

src/query/Generic.php 1 location

@@ 151-158 (lines=8) @@
148
     *
149
     * @return $this Chaining
150
     */
151
    public function orderBy($fieldName, $order = 'ASC')
152
    {
153
        if (in_array($fieldName, self::$fieldIDs)) {
154
            $this->orderBy = array($fieldName, $order);
155
        }
156
157
        return $this;
158
    }
159
160
    /**
161
     * Add sorting to entity identifiers.

src/query/Record.php 1 location

@@ 97-104 (lines=8) @@
94
     *
95
     * @return $this Chaining
96
     */
97
    public function orderBy($fieldName, $order = 'ASC')
98
    {
99
        if (in_array($fieldName, static::$fieldIDs)) {
100
            $this->orderBy = array($fieldName, $order);
101
        }
102
103
        return $this;
104
    }
105
106
    /**
107
     * Perform SamsonCMS query and get entities collection.