Code Duplication    Length = 17-19 lines in 5 locations

Command/DisconnectCommand.php 1 location

@@ 35-53 (lines=19) @@
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function configure(): void
36
    {
37
        $this
38
            ->setDescription('Disconnect user by ID')
39
            ->setDefinition(
40
                new InputDefinition([
41
                    new InputArgument('user', InputArgument::REQUIRED, 'User ID'),
42
                ])
43
            )
44
            ->setHelp(
45
                <<<'HELP'
46
The <info>%command.name%</info> command allows to disconnect user by ID:
47
48
<info>%command.full_name%</info> <comment>user123</comment>
49
50
Read more at https://centrifugal.github.io/centrifugo/server/http_api/#disconnect
51
HELP
52
            )
53
        ;
54
    }
55
56
    /**

Command/HistoryCommand.php 1 location

@@ 51-69 (lines=19) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    protected function configure(): void
52
    {
53
        $this
54
            ->setDescription('Get channel history information (list of last messages published into channel)')
55
            ->setDefinition(
56
                new InputDefinition([
57
                    new InputArgument('channel', InputArgument::REQUIRED, 'Channel name'),
58
                ])
59
            )
60
            ->setHelp(
61
                <<<'HELP'
62
The <info>%command.name%</info> command allows to get channel history information (list of last messages published into channel):
63
64
<info>%command.full_name%</info> <comment>channelAbc</comment>
65
66
Read more at https://centrifugal.github.io/centrifugo/server/http_api/#history
67
HELP
68
            )
69
        ;
70
    }
71
72
    /**

Command/HistoryRemoveCommand.php 1 location

@@ 51-67 (lines=17) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    protected function configure(): void
52
    {
53
        $this
54
            ->setDescription('Remove history for channel')
55
            ->setDefinition(
56
                new InputDefinition([
57
                    new InputArgument('channel', InputArgument::REQUIRED, 'Channel name'),
58
                ])
59
            )
60
            ->setHelp(
61
                <<<'HELP'
62
The <info>%command.name%</info> command allows to remove history for channel:
63
64
<info>%command.full_name%</info> <comment>channelAbc</comment>
65
HELP
66
            )
67
        ;
68
    }
69
70
    /**

Command/PresenceCommand.php 1 location

@@ 51-69 (lines=19) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    protected function configure(): void
52
    {
53
        $this
54
            ->setDescription('Get channel presence information')
55
            ->setDefinition(
56
                new InputDefinition([
57
                    new InputArgument('channel', InputArgument::REQUIRED, 'Channel name'),
58
                ])
59
            )
60
            ->setHelp(
61
                <<<'HELP'
62
The <info>%command.name%</info> command allows to get channel presence information:
63
64
<info>%command.full_name%</info> <comment>channelAbc</comment>
65
66
Read more at https://centrifugal.github.io/centrifugo/server/http_api/#presence
67
HELP
68
            )
69
        ;
70
    }
71
72
    /**

Command/PresenceStatsCommand.php 1 location

@@ 51-69 (lines=19) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    protected function configure(): void
52
    {
53
        $this
54
            ->setDescription('Get short channel presence information')
55
            ->setDefinition(
56
                new InputDefinition([
57
                    new InputArgument('channel', InputArgument::REQUIRED, 'Channel name'),
58
                ])
59
            )
60
            ->setHelp(
61
                <<<'HELP'
62
The <info>%command.name%</info> command allows to get short channel presence information:
63
64
<info>%command.full_name%</info> <comment>channelAbc</comment>
65
66
Read more at https://centrifugal.github.io/centrifugo/server/http_api/#presence_stats
67
HELP
68
            )
69
        ;
70
    }
71
72
    /**