Code Duplication    Length = 8-8 lines in 2 locations

src/Query.php 2 locations

@@ 96-103 (lines=8) @@
93
     * @param mixed $return External variable to store query results
94
     * @return mixed If no arguments passed returns query results collection, otherwise query success status
95
     */
96
    public function exec(&$return = null)
97
    {
98
        /** @var RecordInterface[] $return Perform DB request */
99
        $return = $this->innerExecute('find', $this->class_name, $this);
100
101
        // Return bool or collection
102
        return func_num_args() ? sizeof($return) : $return;
103
    }
104
105
    /**
106
     * Perform database request and get first record from results collection.
@@ 133-140 (lines=8) @@
130
     * @return mixed If no arguments passed returns query results first database record object,
131
     * otherwise query success status
132
     */
133
    public function fields($fieldName, &$return = null)
134
    {
135
        /** @var RecordInterface[] $return Perform DB request */
136
        $return = $this->innerExecute('fetchColumn', $this->class_name, $this, $fieldName);
137
138
        // Return bool or collection
139
        return func_num_args() > 1 ? sizeof($return) : $return;
140
    }
141
142
    /**
143
     * Set query entity to work with.