Code Duplication    Length = 22-22 lines in 6 locations

app/Models/Task/Base/TaskQuery.php 3 locations

@@ 252-273 (lines=22) @@
249
     *
250
     * @return $this|ChildTaskQuery The current query, for fluid interface
251
     */
252
    public function filterById($id = null, $comparison = null)
253
    {
254
        if (is_array($id)) {
255
            $useMinMax = false;
256
            if (isset($id['min'])) {
257
                $this->addUsingAlias(TaskTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);
258
                $useMinMax = true;
259
            }
260
            if (isset($id['max'])) {
261
                $this->addUsingAlias(TaskTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);
262
                $useMinMax = true;
263
            }
264
            if ($useMinMax) {
265
                return $this;
266
            }
267
            if (null === $comparison) {
268
                $comparison = Criteria::IN;
269
            }
270
        }
271
272
        return $this->addUsingAlias(TaskTableMap::COL_ID, $id, $comparison);
273
    }
274
275
    /**
276
     * Filter the query on the created_at column
@@ 295-316 (lines=22) @@
292
     *
293
     * @return $this|ChildTaskQuery The current query, for fluid interface
294
     */
295
    public function filterByCreatedAt($createdAt = null, $comparison = null)
296
    {
297
        if (is_array($createdAt)) {
298
            $useMinMax = false;
299
            if (isset($createdAt['min'])) {
300
                $this->addUsingAlias(TaskTableMap::COL_CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
301
                $useMinMax = true;
302
            }
303
            if (isset($createdAt['max'])) {
304
                $this->addUsingAlias(TaskTableMap::COL_CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
305
                $useMinMax = true;
306
            }
307
            if ($useMinMax) {
308
                return $this;
309
            }
310
            if (null === $comparison) {
311
                $comparison = Criteria::IN;
312
            }
313
        }
314
315
        return $this->addUsingAlias(TaskTableMap::COL_CREATED_AT, $createdAt, $comparison);
316
    }
317
318
    /**
319
     * Filter the query on the updated_at column
@@ 338-359 (lines=22) @@
335
     *
336
     * @return $this|ChildTaskQuery The current query, for fluid interface
337
     */
338
    public function filterByUpdatedAt($updatedAt = null, $comparison = null)
339
    {
340
        if (is_array($updatedAt)) {
341
            $useMinMax = false;
342
            if (isset($updatedAt['min'])) {
343
                $this->addUsingAlias(TaskTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
344
                $useMinMax = true;
345
            }
346
            if (isset($updatedAt['max'])) {
347
                $this->addUsingAlias(TaskTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
348
                $useMinMax = true;
349
            }
350
            if ($useMinMax) {
351
                return $this;
352
            }
353
            if (null === $comparison) {
354
                $comparison = Criteria::IN;
355
            }
356
        }
357
358
        return $this->addUsingAlias(TaskTableMap::COL_UPDATED_AT, $updatedAt, $comparison);
359
    }
360
361
    /**
362
     * Exclude object from result

app/Models/User/Base/UserQuery.php 3 locations

@@ 272-293 (lines=22) @@
269
     *
270
     * @return $this|ChildUserQuery The current query, for fluid interface
271
     */
272
    public function filterById($id = null, $comparison = null)
273
    {
274
        if (is_array($id)) {
275
            $useMinMax = false;
276
            if (isset($id['min'])) {
277
                $this->addUsingAlias(UserTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);
278
                $useMinMax = true;
279
            }
280
            if (isset($id['max'])) {
281
                $this->addUsingAlias(UserTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);
282
                $useMinMax = true;
283
            }
284
            if ($useMinMax) {
285
                return $this;
286
            }
287
            if (null === $comparison) {
288
                $comparison = Criteria::IN;
289
            }
290
        }
291
292
        return $this->addUsingAlias(UserTableMap::COL_ID, $id, $comparison);
293
    }
294
295
    /**
296
     * Filter the query on the name column
@@ 431-452 (lines=22) @@
428
     *
429
     * @return $this|ChildUserQuery The current query, for fluid interface
430
     */
431
    public function filterByCreatedAt($createdAt = null, $comparison = null)
432
    {
433
        if (is_array($createdAt)) {
434
            $useMinMax = false;
435
            if (isset($createdAt['min'])) {
436
                $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
437
                $useMinMax = true;
438
            }
439
            if (isset($createdAt['max'])) {
440
                $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
441
                $useMinMax = true;
442
            }
443
            if ($useMinMax) {
444
                return $this;
445
            }
446
            if (null === $comparison) {
447
                $comparison = Criteria::IN;
448
            }
449
        }
450
451
        return $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt, $comparison);
452
    }
453
454
    /**
455
     * Filter the query on the updated_at column
@@ 474-495 (lines=22) @@
471
     *
472
     * @return $this|ChildUserQuery The current query, for fluid interface
473
     */
474
    public function filterByUpdatedAt($updatedAt = null, $comparison = null)
475
    {
476
        if (is_array($updatedAt)) {
477
            $useMinMax = false;
478
            if (isset($updatedAt['min'])) {
479
                $this->addUsingAlias(UserTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
480
                $useMinMax = true;
481
            }
482
            if (isset($updatedAt['max'])) {
483
                $this->addUsingAlias(UserTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
484
                $useMinMax = true;
485
            }
486
            if ($useMinMax) {
487
                return $this;
488
            }
489
            if (null === $comparison) {
490
                $comparison = Criteria::IN;
491
            }
492
        }
493
494
        return $this->addUsingAlias(UserTableMap::COL_UPDATED_AT, $updatedAt, $comparison);
495
    }
496
497
    /**
498
     * Exclude object from result