Code Duplication    Length = 14-14 lines in 7 locations

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

@@ 445-458 (lines=14) @@
442
     *
443
     * @return ChildChannelQuery The current query, for fluid interface
444
     */
445
    public function filterBySubscription($subscription, $comparison = null)
446
    {
447
        if ($subscription instanceof \Jalle19\StatusManager\Database\Subscription) {
448
            return $this
449
                ->addUsingAlias(ChannelTableMap::COL_ID, $subscription->getChannelId(), $comparison);
450
        } elseif ($subscription instanceof ObjectCollection) {
451
            return $this
452
                ->useSubscriptionQuery()
453
                ->filterByPrimaryKeys($subscription->getPrimaryKeys())
454
                ->endUse();
455
        } else {
456
            throw new PropelException('filterBySubscription() only accepts arguments of type \Jalle19\StatusManager\Database\Subscription or Collection');
457
        }
458
    }
459
460
    /**
461
     * Adds a JOIN clause to the query using the Subscription relation

src/cli/Database/Base/InstanceQuery.php 4 locations

@@ 308-321 (lines=14) @@
305
     *
306
     * @return ChildInstanceQuery The current query, for fluid interface
307
     */
308
    public function filterByUser($user, $comparison = null)
309
    {
310
        if ($user instanceof \Jalle19\StatusManager\Database\User) {
311
            return $this
312
                ->addUsingAlias(InstanceTableMap::COL_NAME, $user->getInstanceName(), $comparison);
313
        } elseif ($user instanceof ObjectCollection) {
314
            return $this
315
                ->useUserQuery()
316
                ->filterByPrimaryKeys($user->getPrimaryKeys())
317
                ->endUse();
318
        } else {
319
            throw new PropelException('filterByUser() only accepts arguments of type \Jalle19\StatusManager\Database\User or Collection');
320
        }
321
    }
322
323
    /**
324
     * Adds a JOIN clause to the query using the User relation
@@ 381-394 (lines=14) @@
378
     *
379
     * @return ChildInstanceQuery The current query, for fluid interface
380
     */
381
    public function filterByConnection($connection, $comparison = null)
382
    {
383
        if ($connection instanceof \Jalle19\StatusManager\Database\Connection) {
384
            return $this
385
                ->addUsingAlias(InstanceTableMap::COL_NAME, $connection->getInstanceName(), $comparison);
386
        } elseif ($connection instanceof ObjectCollection) {
387
            return $this
388
                ->useConnectionQuery()
389
                ->filterByPrimaryKeys($connection->getPrimaryKeys())
390
                ->endUse();
391
        } else {
392
            throw new PropelException('filterByConnection() only accepts arguments of type \Jalle19\StatusManager\Database\Connection or Collection');
393
        }
394
    }
395
396
    /**
397
     * Adds a JOIN clause to the query using the Connection relation
@@ 454-467 (lines=14) @@
451
     *
452
     * @return ChildInstanceQuery The current query, for fluid interface
453
     */
454
    public function filterByChannel($channel, $comparison = null)
455
    {
456
        if ($channel instanceof \Jalle19\StatusManager\Database\Channel) {
457
            return $this
458
                ->addUsingAlias(InstanceTableMap::COL_NAME, $channel->getInstanceName(), $comparison);
459
        } elseif ($channel instanceof ObjectCollection) {
460
            return $this
461
                ->useChannelQuery()
462
                ->filterByPrimaryKeys($channel->getPrimaryKeys())
463
                ->endUse();
464
        } else {
465
            throw new PropelException('filterByChannel() only accepts arguments of type \Jalle19\StatusManager\Database\Channel or Collection');
466
        }
467
    }
468
469
    /**
470
     * Adds a JOIN clause to the query using the Channel relation
@@ 527-540 (lines=14) @@
524
     *
525
     * @return ChildInstanceQuery The current query, for fluid interface
526
     */
527
    public function filterBySubscription($subscription, $comparison = null)
528
    {
529
        if ($subscription instanceof \Jalle19\StatusManager\Database\Subscription) {
530
            return $this
531
                ->addUsingAlias(InstanceTableMap::COL_NAME, $subscription->getInstanceName(), $comparison);
532
        } elseif ($subscription instanceof ObjectCollection) {
533
            return $this
534
                ->useSubscriptionQuery()
535
                ->filterByPrimaryKeys($subscription->getPrimaryKeys())
536
                ->endUse();
537
        } else {
538
            throw new PropelException('filterBySubscription() only accepts arguments of type \Jalle19\StatusManager\Database\Subscription or Collection');
539
        }
540
    }
541
542
    /**
543
     * Adds a JOIN clause to the query using the Subscription relation

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

@@ 455-468 (lines=14) @@
452
     *
453
     * @return ChildUserQuery The current query, for fluid interface
454
     */
455
    public function filterByConnection($connection, $comparison = null)
456
    {
457
        if ($connection instanceof \Jalle19\StatusManager\Database\Connection) {
458
            return $this
459
                ->addUsingAlias(UserTableMap::COL_ID, $connection->getUserId(), $comparison);
460
        } elseif ($connection instanceof ObjectCollection) {
461
            return $this
462
                ->useConnectionQuery()
463
                ->filterByPrimaryKeys($connection->getPrimaryKeys())
464
                ->endUse();
465
        } else {
466
            throw new PropelException('filterByConnection() only accepts arguments of type \Jalle19\StatusManager\Database\Connection or Collection');
467
        }
468
    }
469
470
    /**
471
     * Adds a JOIN clause to the query using the Connection relation
@@ 528-541 (lines=14) @@
525
     *
526
     * @return ChildUserQuery The current query, for fluid interface
527
     */
528
    public function filterBySubscription($subscription, $comparison = null)
529
    {
530
        if ($subscription instanceof \Jalle19\StatusManager\Database\Subscription) {
531
            return $this
532
                ->addUsingAlias(UserTableMap::COL_ID, $subscription->getUserId(), $comparison);
533
        } elseif ($subscription instanceof ObjectCollection) {
534
            return $this
535
                ->useSubscriptionQuery()
536
                ->filterByPrimaryKeys($subscription->getPrimaryKeys())
537
                ->endUse();
538
        } else {
539
            throw new PropelException('filterBySubscription() only accepts arguments of type \Jalle19\StatusManager\Database\Subscription or Collection');
540
        }
541
    }
542
543
    /**
544
     * Adds a JOIN clause to the query using the Subscription relation