Code Duplication    Length = 8-8 lines in 2 locations

src/query/Generic.php 1 location

@@ 121-128 (lines=8) @@
118
     * @param string $order Sorting order
119
     * @return $this Chaining
120
     */
121
    public function orderBy($fieldName, $order = 'ASC')
122
    {
123
        if (array_key_exists($fieldName, static::$parentFields)) {
124
            $this->orderBy = array($fieldName, $order);
125
        }
126
127
        return $this;
128
    }
129
130
    /**
131
     * Add primary field query condition.

src/query/Record.php 1 location

@@ 92-99 (lines=8) @@
89
     *
90
     * @return $this Chaining
91
     */
92
    public function orderBy($fieldName, $order = 'ASC')
93
    {
94
        if (array_key_exists($fieldName, static::$parentFields)) {
95
            $this->orderBy = array($fieldName, $order);
96
        }
97
98
        return $this;
99
    }
100
101
    /**
102
     * Perform SamsonCMS query and get entities collection.