Code Duplication    Length = 16-16 lines in 3 locations

src/plugins/onTick/fleetUpOperations.php 1 location

@@ 64-79 (lines=16) @@
61
     * @param $discord
62
     * @param $logger
63
     */
64
    function init($config, $discord, $logger)
65
    {
66
        $this->config = $config;
67
        $this->discord = $discord;
68
        $this->logger = $logger;
69
        $this->toDiscordChannel = $config["plugins"]["fleetUp"]["channelID"];
70
        $this->userID = $config["plugins"]["fleetUp"]["userID"];
71
        $this->groupID = $config["plugins"]["fleetUp"]["groupID"];
72
        $this->apiKey = $config["plugins"]["fleetUp"]["apiKey"];
73
        $this->guild = $config["bot"]["guild"];
74
        $lastCheck = getPermCache("fleetUpPostLastChecked");
75
        if ($lastCheck == NULL) {
76
            // Schedule it for right now if first run
77
            setPermCache("fleetUpPostLastChecked", time() - 5);
78
        }
79
    }
80
81
    /**
82
     *

src/plugins/onTick/siloFull.php 1 location

@@ 59-74 (lines=16) @@
56
     * @param $discord
57
     * @param $logger
58
     */
59
    function init($config, $discord, $logger)
60
    {
61
        $this->config = $config;
62
        $this->discord = $discord;
63
        $this->logger = $logger;
64
        $this->guild = $config["bot"]["guild"];
65
        $this->toDiscordChannel = $config["plugins"]["siloFull"]["channelID"];
66
        $this->keyID = $config["plugins"]["siloFull"]["keyID"];
67
        $this->vCode = $config["plugins"]["siloFull"]["vCode"];
68
        $this->towerRace = $config["plugins"]["siloFull"]["towerRace"];
69
        $lastCheck = getPermCache("siloLastChecked{$this->keyID}");
70
        if ($lastCheck == NULL) {
71
            // Schedule it for right now if first run
72
            setPermCache("siloLastChecked{$this->keyID}", time() - 5);
73
        }
74
    }
75
    /**
76
     *
77
     */

src/plugins/onTick/siphons.php 1 location

@@ 58-73 (lines=16) @@
55
     * @param $discord
56
     * @param $logger
57
     */
58
    function init($config, $discord, $logger)
59
    {
60
        $this->config = $config;
61
        $this->discord = $discord;
62
        $this->logger = $logger;
63
        $this->guild = $config["bot"]["guild"];
64
        $this->toDiscordChannel = $config["plugins"]["siphons"]["channelID"];
65
        $this->keyID = $config["plugins"]["siphons"]["keyID"];
66
        $this->vCode = $config["plugins"]["siphons"]["vCode"];
67
        $this->prefix = $config["plugins"]["siphons"]["prefix"];
68
        $lastCheck = getPermCache("siphonLastChecked{$this->keyID}");
69
        if ($lastCheck == NULL) {
70
            // Schedule it for right now if first run
71
            setPermCache("siphonLastChecked{$this->keyID}", time() - 5);
72
        }
73
    }
74
75
    /**
76
     *