Code Duplication    Length = 13-13 lines in 11 locations

src/cli/Database/Base/ChannelQuery.php 2 locations

@@ 317-329 (lines=13) @@
314
     *
315
     * @return $this|ChildChannelQuery The current query, for fluid interface
316
     */
317
    public function filterByInstanceName($instanceName = null, $comparison = null)
318
    {
319
        if (null === $comparison) {
320
            if (is_array($instanceName)) {
321
                $comparison = Criteria::IN;
322
            } elseif (preg_match('/[\%\*]/', $instanceName)) {
323
                $instanceName = str_replace('*', '%', $instanceName);
324
                $comparison = Criteria::LIKE;
325
            }
326
        }
327
328
        return $this->addUsingAlias(ChannelTableMap::COL_INSTANCE_NAME, $instanceName, $comparison);
329
    }
330
331
    /**
332
     * Filter the query on the name column
@@ 346-358 (lines=13) @@
343
     *
344
     * @return $this|ChildChannelQuery The current query, for fluid interface
345
     */
346
    public function filterByName($name = null, $comparison = null)
347
    {
348
        if (null === $comparison) {
349
            if (is_array($name)) {
350
                $comparison = Criteria::IN;
351
            } elseif (preg_match('/[\%\*]/', $name)) {
352
                $name = str_replace('*', '%', $name);
353
                $comparison = Criteria::LIKE;
354
            }
355
        }
356
357
        return $this->addUsingAlias(ChannelTableMap::COL_NAME, $name, $comparison);
358
    }
359
360
    /**
361
     * Filter the query by a related \Jalle19\StatusManager\Database\Instance object

src/cli/Database/Base/ConnectionQuery.php 3 locations

@@ 332-344 (lines=13) @@
329
     *
330
     * @return $this|ChildConnectionQuery The current query, for fluid interface
331
     */
332
    public function filterByInstanceName($instanceName = null, $comparison = null)
333
    {
334
        if (null === $comparison) {
335
            if (is_array($instanceName)) {
336
                $comparison = Criteria::IN;
337
            } elseif (preg_match('/[\%\*]/', $instanceName)) {
338
                $instanceName = str_replace('*', '%', $instanceName);
339
                $comparison = Criteria::LIKE;
340
            }
341
        }
342
343
        return $this->addUsingAlias(ConnectionTableMap::COL_INSTANCE_NAME, $instanceName, $comparison);
344
    }
345
346
    /**
347
     * Filter the query on the user_id column
@@ 404-416 (lines=13) @@
401
     *
402
     * @return $this|ChildConnectionQuery The current query, for fluid interface
403
     */
404
    public function filterByPeer($peer = null, $comparison = null)
405
    {
406
        if (null === $comparison) {
407
            if (is_array($peer)) {
408
                $comparison = Criteria::IN;
409
            } elseif (preg_match('/[\%\*]/', $peer)) {
410
                $peer = str_replace('*', '%', $peer);
411
                $comparison = Criteria::LIKE;
412
            }
413
        }
414
415
        return $this->addUsingAlias(ConnectionTableMap::COL_PEER, $peer, $comparison);
416
    }
417
418
    /**
419
     * Filter the query on the started column
@@ 476-488 (lines=13) @@
473
     *
474
     * @return $this|ChildConnectionQuery The current query, for fluid interface
475
     */
476
    public function filterByType($type = null, $comparison = null)
477
    {
478
        if (null === $comparison) {
479
            if (is_array($type)) {
480
                $comparison = Criteria::IN;
481
            } elseif (preg_match('/[\%\*]/', $type)) {
482
                $type = str_replace('*', '%', $type);
483
                $comparison = Criteria::LIKE;
484
            }
485
        }
486
487
        return $this->addUsingAlias(ConnectionTableMap::COL_TYPE, $type, $comparison);
488
    }
489
490
    /**
491
     * Filter the query by a related \Jalle19\StatusManager\Database\Instance object

src/cli/Database/Base/InstanceQuery.php 1 location

@@ 286-298 (lines=13) @@
283
     *
284
     * @return $this|ChildInstanceQuery The current query, for fluid interface
285
     */
286
    public function filterByName($name = null, $comparison = null)
287
    {
288
        if (null === $comparison) {
289
            if (is_array($name)) {
290
                $comparison = Criteria::IN;
291
            } elseif (preg_match('/[\%\*]/', $name)) {
292
                $name = str_replace('*', '%', $name);
293
                $comparison = Criteria::LIKE;
294
            }
295
        }
296
297
        return $this->addUsingAlias(InstanceTableMap::COL_NAME, $name, $comparison);
298
    }
299
300
    /**
301
     * Filter the query by a related \Jalle19\StatusManager\Database\User object

src/cli/Database/Base/SubscriptionQuery.php 3 locations

@@ 357-369 (lines=13) @@
354
     *
355
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
356
     */
357
    public function filterByInstanceName($instanceName = null, $comparison = null)
358
    {
359
        if (null === $comparison) {
360
            if (is_array($instanceName)) {
361
                $comparison = Criteria::IN;
362
            } elseif (preg_match('/[\%\*]/', $instanceName)) {
363
                $instanceName = str_replace('*', '%', $instanceName);
364
                $comparison = Criteria::LIKE;
365
            }
366
        }
367
368
        return $this->addUsingAlias(SubscriptionTableMap::COL_INSTANCE_NAME, $instanceName, $comparison);
369
    }
370
371
    /**
372
     * Filter the query on the user_id column
@@ 599-611 (lines=13) @@
596
     *
597
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
598
     */
599
    public function filterByTitle($title = null, $comparison = null)
600
    {
601
        if (null === $comparison) {
602
            if (is_array($title)) {
603
                $comparison = Criteria::IN;
604
            } elseif (preg_match('/[\%\*]/', $title)) {
605
                $title = str_replace('*', '%', $title);
606
                $comparison = Criteria::LIKE;
607
            }
608
        }
609
610
        return $this->addUsingAlias(SubscriptionTableMap::COL_TITLE, $title, $comparison);
611
    }
612
613
    /**
614
     * Filter the query on the service column
@@ 628-640 (lines=13) @@
625
     *
626
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
627
     */
628
    public function filterByService($service = null, $comparison = null)
629
    {
630
        if (null === $comparison) {
631
            if (is_array($service)) {
632
                $comparison = Criteria::IN;
633
            } elseif (preg_match('/[\%\*]/', $service)) {
634
                $service = str_replace('*', '%', $service);
635
                $comparison = Criteria::LIKE;
636
            }
637
        }
638
639
        return $this->addUsingAlias(SubscriptionTableMap::COL_SERVICE, $service, $comparison);
640
    }
641
642
    /**
643
     * Filter the query by a related \Jalle19\StatusManager\Database\Instance object

src/cli/Database/Base/UserQuery.php 2 locations

@@ 327-339 (lines=13) @@
324
     *
325
     * @return $this|ChildUserQuery The current query, for fluid interface
326
     */
327
    public function filterByInstanceName($instanceName = null, $comparison = null)
328
    {
329
        if (null === $comparison) {
330
            if (is_array($instanceName)) {
331
                $comparison = Criteria::IN;
332
            } elseif (preg_match('/[\%\*]/', $instanceName)) {
333
                $instanceName = str_replace('*', '%', $instanceName);
334
                $comparison = Criteria::LIKE;
335
            }
336
        }
337
338
        return $this->addUsingAlias(UserTableMap::COL_INSTANCE_NAME, $instanceName, $comparison);
339
    }
340
341
    /**
342
     * Filter the query on the name column
@@ 356-368 (lines=13) @@
353
     *
354
     * @return $this|ChildUserQuery The current query, for fluid interface
355
     */
356
    public function filterByName($name = null, $comparison = null)
357
    {
358
        if (null === $comparison) {
359
            if (is_array($name)) {
360
                $comparison = Criteria::IN;
361
            } elseif (preg_match('/[\%\*]/', $name)) {
362
                $name = str_replace('*', '%', $name);
363
                $comparison = Criteria::LIKE;
364
            }
365
        }
366
367
        return $this->addUsingAlias(UserTableMap::COL_NAME, $name, $comparison);
368
    }
369
370
    /**
371
     * Filter the query by a related \Jalle19\StatusManager\Database\Instance object