Code Duplication    Length = 10-10 lines in 3 locations

packages/selfprice/src/Models/Selfprice/Base/SelfpriceQuery.php 1 location

@@ 178-187 (lines=10) @@
175
     *
176
     * @return ChildSelfprice|array|mixed the result, formatted by the current formatter
177
     */
178
    protected function findPkComplex($key, ConnectionInterface $con)
179
    {
180
        // As the query uses a PK condition, no limit(1) is necessary.
181
        $criteria = $this->isKeepQuery() ? clone $this : $this;
182
        $dataFetcher = $criteria
183
            ->filterByPrimaryKey($key)
184
            ->doSelect($con);
185
186
        return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
187
    }
188
189
    /**
190
     * Find objects by primary key

packages/core/src/Models/Task/Base/TaskQuery.php 1 location

@@ 183-192 (lines=10) @@
180
     *
181
     * @return ChildTask|array|mixed the result, formatted by the current formatter
182
     */
183
    protected function findPkComplex($key, ConnectionInterface $con)
184
    {
185
        // As the query uses a PK condition, no limit(1) is necessary.
186
        $criteria = $this->isKeepQuery() ? clone $this : $this;
187
        $dataFetcher = $criteria
188
            ->filterByPrimaryKey($key)
189
            ->doSelect($con);
190
191
        return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
192
    }
193
194
    /**
195
     * Find objects by primary key

packages/core/src/Models/User/Base/UserQuery.php 1 location

@@ 203-212 (lines=10) @@
200
     *
201
     * @return ChildUser|array|mixed the result, formatted by the current formatter
202
     */
203
    protected function findPkComplex($key, ConnectionInterface $con)
204
    {
205
        // As the query uses a PK condition, no limit(1) is necessary.
206
        $criteria = $this->isKeepQuery() ? clone $this : $this;
207
        $dataFetcher = $criteria
208
            ->filterByPrimaryKey($key)
209
            ->doSelect($con);
210
211
        return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
212
    }
213
214
    /**
215
     * Find objects by primary key