Code Duplication    Length = 11-11 lines in 3 locations

src/Weew/Console/Console.php 3 locations

@@ 541-551 (lines=11) @@
538
    /**
539
     * @return ICommand[]
540
     */
541
    protected function getGlobalHiddenCommands() {
542
        $commands = [];
543
544
        foreach ($this->getCommands() as $command) {
545
            if ($command->isGlobal() && $command->isHidden()) {
546
                $commands[] = $command;
547
            }
548
        }
549
550
        return $commands;
551
    }
552
553
    /**
554
     * @return ICommand[]
@@ 556-566 (lines=11) @@
553
    /**
554
     * @return ICommand[]
555
     */
556
    protected function getGlobalNotHiddenCommands() {
557
        $commands = [];
558
559
        foreach ($this->getCommands() as $command) {
560
            if ($command->isGlobal() && ! $command->isHidden()) {
561
                $commands[] = $command;
562
            }
563
        }
564
565
        return $commands;
566
    }
567
568
    /**
569
     * @return ICommand[]
@@ 571-581 (lines=11) @@
568
    /**
569
     * @return ICommand[]
570
     */
571
    protected function getNotGlobalCommands() {
572
        $commands = [];
573
574
        foreach ($this->getCommands() as $command) {
575
            if ( ! $command->isGlobal()) {
576
                $commands[] = $command;
577
            }
578
        }
579
580
        return $commands;
581
    }
582
}
583