Code Duplication    Length = 11-11 lines in 7 locations

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

@@ 1247-1257 (lines=11) @@
1244
     *
1245
     * @return void
1246
     */
1247
    public function initSubscriptions($overrideExisting = true)
1248
    {
1249
        if (null !== $this->collSubscriptions && !$overrideExisting) {
1250
            return;
1251
        }
1252
1253
        $collectionClassName = SubscriptionTableMap::getTableMap()->getCollectionClassName();
1254
1255
        $this->collSubscriptions = new $collectionClassName;
1256
        $this->collSubscriptions->setModel('\Jalle19\StatusManager\Database\Subscription');
1257
    }
1258
1259
    /**
1260
     * Gets an array of ChildSubscription objects which contain a foreign key that references this object.

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

@@ 1197-1207 (lines=11) @@
1194
     *
1195
     * @return void
1196
     */
1197
    public function initUsers($overrideExisting = true)
1198
    {
1199
        if (null !== $this->collUsers && !$overrideExisting) {
1200
            return;
1201
        }
1202
1203
        $collectionClassName = UserTableMap::getTableMap()->getCollectionClassName();
1204
1205
        $this->collUsers = new $collectionClassName;
1206
        $this->collUsers->setModel('\Jalle19\StatusManager\Database\User');
1207
    }
1208
1209
    /**
1210
     * Gets an array of ChildUser objects which contain a foreign key that references this object.
@@ 1422-1432 (lines=11) @@
1419
     *
1420
     * @return void
1421
     */
1422
    public function initConnections($overrideExisting = true)
1423
    {
1424
        if (null !== $this->collConnections && !$overrideExisting) {
1425
            return;
1426
        }
1427
1428
        $collectionClassName = ConnectionTableMap::getTableMap()->getCollectionClassName();
1429
1430
        $this->collConnections = new $collectionClassName;
1431
        $this->collConnections->setModel('\Jalle19\StatusManager\Database\Connection');
1432
    }
1433
1434
    /**
1435
     * Gets an array of ChildConnection objects which contain a foreign key that references this object.
@@ 1672-1682 (lines=11) @@
1669
     *
1670
     * @return void
1671
     */
1672
    public function initChannels($overrideExisting = true)
1673
    {
1674
        if (null !== $this->collChannels && !$overrideExisting) {
1675
            return;
1676
        }
1677
1678
        $collectionClassName = ChannelTableMap::getTableMap()->getCollectionClassName();
1679
1680
        $this->collChannels = new $collectionClassName;
1681
        $this->collChannels->setModel('\Jalle19\StatusManager\Database\Channel');
1682
    }
1683
1684
    /**
1685
     * Gets an array of ChildChannel objects which contain a foreign key that references this object.
@@ 1897-1907 (lines=11) @@
1894
     *
1895
     * @return void
1896
     */
1897
    public function initSubscriptions($overrideExisting = true)
1898
    {
1899
        if (null !== $this->collSubscriptions && !$overrideExisting) {
1900
            return;
1901
        }
1902
1903
        $collectionClassName = SubscriptionTableMap::getTableMap()->getCollectionClassName();
1904
1905
        $this->collSubscriptions = new $collectionClassName;
1906
        $this->collSubscriptions->setModel('\Jalle19\StatusManager\Database\Subscription');
1907
    }
1908
1909
    /**
1910
     * Gets an array of ChildSubscription objects which contain a foreign key that references this object.

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

@@ 1307-1317 (lines=11) @@
1304
     *
1305
     * @return void
1306
     */
1307
    public function initConnections($overrideExisting = true)
1308
    {
1309
        if (null !== $this->collConnections && !$overrideExisting) {
1310
            return;
1311
        }
1312
1313
        $collectionClassName = ConnectionTableMap::getTableMap()->getCollectionClassName();
1314
1315
        $this->collConnections = new $collectionClassName;
1316
        $this->collConnections->setModel('\Jalle19\StatusManager\Database\Connection');
1317
    }
1318
1319
    /**
1320
     * Gets an array of ChildConnection objects which contain a foreign key that references this object.
@@ 1557-1567 (lines=11) @@
1554
     *
1555
     * @return void
1556
     */
1557
    public function initSubscriptions($overrideExisting = true)
1558
    {
1559
        if (null !== $this->collSubscriptions && !$overrideExisting) {
1560
            return;
1561
        }
1562
1563
        $collectionClassName = SubscriptionTableMap::getTableMap()->getCollectionClassName();
1564
1565
        $this->collSubscriptions = new $collectionClassName;
1566
        $this->collSubscriptions->setModel('\Jalle19\StatusManager\Database\Subscription');
1567
    }
1568
1569
    /**
1570
     * Gets an array of ChildSubscription objects which contain a foreign key that references this object.