Code Duplication    Length = 8-8 lines in 3 locations

src/Query.php 3 locations

@@ 101-108 (lines=8) @@
98
     * @param mixed $return External variable to store query results
99
     * @return mixed If no arguments passed returns query results collection, otherwise query success status
100
     */
101
    public function exec(&$return = null)
102
    {
103
        /** @var RecordInterface[] $return Perform DB request */
104
        $return = $this->innerExecute('find', $this->class_name, $this);
105
106
        // Return bool or collection
107
        return func_num_args() ? sizeof($return) : $return;
108
    }
109
110
    /**
111
     * Execute current query and receive amount of resulting rows.
@@ 119-126 (lines=8) @@
116
     *                                  with query result status would be returned, otherwise
117
     *                                  query rows count would be returned.
118
     */
119
    public function count(&$return = null)
120
    {
121
        /** @var RecordInterface[] $return Perform DB request */
122
        $return = $this->innerExecute('count', $this->class_name, $this);
123
124
        // Return bool or collection
125
        return func_num_args() ? sizeof($return) : $return;
126
    }
127
128
    /**
129
     * Perform database request and get first record from results collection.
@@ 156-163 (lines=8) @@
153
     * @return mixed If no arguments passed returns query results first database record object,
154
     * otherwise query success status
155
     */
156
    public function fields($fieldName, &$return = null)
157
    {
158
        /** @var RecordInterface[] $return Perform DB request */
159
        $return = $this->innerExecute('fetchColumn', $this->class_name, $this, $fieldName);
160
161
        // Return bool or collection
162
        return func_num_args() > 1 ? sizeof($return) : $return;
163
    }
164
165
    /**
166
     * Set query entity to work with.