Code Duplication    Length = 16-16 lines in 9 locations

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

@@ 370-385 (lines=16) @@
367
     *
368
     * @return ChildChannelQuery The current query, for fluid interface
369
     */
370
    public function filterByInstance($instance, $comparison = null)
371
    {
372
        if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
373
            return $this
374
                ->addUsingAlias(ChannelTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
375
        } elseif ($instance instanceof ObjectCollection) {
376
            if (null === $comparison) {
377
                $comparison = Criteria::IN;
378
            }
379
380
            return $this
381
                ->addUsingAlias(ChannelTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
382
        } else {
383
            throw new PropelException('filterByInstance() only accepts arguments of type \Jalle19\StatusManager\Database\Instance or Collection');
384
        }
385
    }
386
387
    /**
388
     * Adds a JOIN clause to the query using the Instance relation

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

@@ 500-515 (lines=16) @@
497
     *
498
     * @return ChildConnectionQuery The current query, for fluid interface
499
     */
500
    public function filterByInstance($instance, $comparison = null)
501
    {
502
        if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
503
            return $this
504
                ->addUsingAlias(ConnectionTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
505
        } elseif ($instance instanceof ObjectCollection) {
506
            if (null === $comparison) {
507
                $comparison = Criteria::IN;
508
            }
509
510
            return $this
511
                ->addUsingAlias(ConnectionTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
512
        } else {
513
            throw new PropelException('filterByInstance() only accepts arguments of type \Jalle19\StatusManager\Database\Instance or Collection');
514
        }
515
    }
516
517
    /**
518
     * Adds a JOIN clause to the query using the Instance relation
@@ 577-592 (lines=16) @@
574
     *
575
     * @return ChildConnectionQuery The current query, for fluid interface
576
     */
577
    public function filterByUser($user, $comparison = null)
578
    {
579
        if ($user instanceof \Jalle19\StatusManager\Database\User) {
580
            return $this
581
                ->addUsingAlias(ConnectionTableMap::COL_USER_ID, $user->getId(), $comparison);
582
        } elseif ($user instanceof ObjectCollection) {
583
            if (null === $comparison) {
584
                $comparison = Criteria::IN;
585
            }
586
587
            return $this
588
                ->addUsingAlias(ConnectionTableMap::COL_USER_ID, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
589
        } else {
590
            throw new PropelException('filterByUser() only accepts arguments of type \Jalle19\StatusManager\Database\User or Collection');
591
        }
592
    }
593
594
    /**
595
     * Adds a JOIN clause to the query using the User relation

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

@@ 380-395 (lines=16) @@
377
     *
378
     * @return ChildUserQuery The current query, for fluid interface
379
     */
380
    public function filterByInstance($instance, $comparison = null)
381
    {
382
        if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
383
            return $this
384
                ->addUsingAlias(UserTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
385
        } elseif ($instance instanceof ObjectCollection) {
386
            if (null === $comparison) {
387
                $comparison = Criteria::IN;
388
            }
389
390
            return $this
391
                ->addUsingAlias(UserTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
392
        } else {
393
            throw new PropelException('filterByInstance() only accepts arguments of type \Jalle19\StatusManager\Database\Instance or Collection');
394
        }
395
    }
396
397
    /**
398
     * Adds a JOIN clause to the query using the Instance relation

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

@@ 520-535 (lines=16) @@
517
     *
518
     * @return ChildInputQuery The current query, for fluid interface
519
     */
520
    public function filterByInstance($instance, $comparison = null)
521
    {
522
        if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
523
            return $this
524
                ->addUsingAlias(InputTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
525
        } elseif ($instance instanceof ObjectCollection) {
526
            if (null === $comparison) {
527
                $comparison = Criteria::IN;
528
            }
529
530
            return $this
531
                ->addUsingAlias(InputTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
532
        } else {
533
            throw new PropelException('filterByInstance() only accepts arguments of type \Jalle19\StatusManager\Database\Instance or Collection');
534
        }
535
    }
536
537
    /**
538
     * Adds a JOIN clause to the query using the Instance relation

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

@@ 696-711 (lines=16) @@
693
     *
694
     * @return ChildSubscriptionQuery The current query, for fluid interface
695
     */
696
    public function filterByInstance($instance, $comparison = null)
697
    {
698
        if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
699
            return $this
700
                ->addUsingAlias(SubscriptionTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
701
        } elseif ($instance instanceof ObjectCollection) {
702
            if (null === $comparison) {
703
                $comparison = Criteria::IN;
704
            }
705
706
            return $this
707
                ->addUsingAlias(SubscriptionTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
708
        } else {
709
            throw new PropelException('filterByInstance() only accepts arguments of type \Jalle19\StatusManager\Database\Instance or Collection');
710
        }
711
    }
712
713
    /**
714
     * Adds a JOIN clause to the query using the Instance relation
@@ 773-788 (lines=16) @@
770
     *
771
     * @return ChildSubscriptionQuery The current query, for fluid interface
772
     */
773
    public function filterByInput($input, $comparison = null)
774
    {
775
        if ($input instanceof \Jalle19\StatusManager\Database\Input) {
776
            return $this
777
                ->addUsingAlias(SubscriptionTableMap::COL_INPUT_UUID, $input->getUuid(), $comparison);
778
        } elseif ($input instanceof ObjectCollection) {
779
            if (null === $comparison) {
780
                $comparison = Criteria::IN;
781
            }
782
783
            return $this
784
                ->addUsingAlias(SubscriptionTableMap::COL_INPUT_UUID, $input->toKeyValue('PrimaryKey', 'Uuid'), $comparison);
785
        } else {
786
            throw new PropelException('filterByInput() only accepts arguments of type \Jalle19\StatusManager\Database\Input or Collection');
787
        }
788
    }
789
790
    /**
791
     * Adds a JOIN clause to the query using the Input relation
@@ 850-865 (lines=16) @@
847
     *
848
     * @return ChildSubscriptionQuery The current query, for fluid interface
849
     */
850
    public function filterByUser($user, $comparison = null)
851
    {
852
        if ($user instanceof \Jalle19\StatusManager\Database\User) {
853
            return $this
854
                ->addUsingAlias(SubscriptionTableMap::COL_USER_ID, $user->getId(), $comparison);
855
        } elseif ($user instanceof ObjectCollection) {
856
            if (null === $comparison) {
857
                $comparison = Criteria::IN;
858
            }
859
860
            return $this
861
                ->addUsingAlias(SubscriptionTableMap::COL_USER_ID, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
862
        } else {
863
            throw new PropelException('filterByUser() only accepts arguments of type \Jalle19\StatusManager\Database\User or Collection');
864
        }
865
    }
866
867
    /**
868
     * Adds a JOIN clause to the query using the User relation
@@ 927-942 (lines=16) @@
924
     *
925
     * @return ChildSubscriptionQuery The current query, for fluid interface
926
     */
927
    public function filterByChannel($channel, $comparison = null)
928
    {
929
        if ($channel instanceof \Jalle19\StatusManager\Database\Channel) {
930
            return $this
931
                ->addUsingAlias(SubscriptionTableMap::COL_CHANNEL_ID, $channel->getId(), $comparison);
932
        } elseif ($channel instanceof ObjectCollection) {
933
            if (null === $comparison) {
934
                $comparison = Criteria::IN;
935
            }
936
937
            return $this
938
                ->addUsingAlias(SubscriptionTableMap::COL_CHANNEL_ID, $channel->toKeyValue('PrimaryKey', 'Id'), $comparison);
939
        } else {
940
            throw new PropelException('filterByChannel() only accepts arguments of type \Jalle19\StatusManager\Database\Channel or Collection');
941
        }
942
    }
943
944
    /**
945
     * Adds a JOIN clause to the query using the Channel relation