Code Duplication    Length = 11-11 lines in 2 locations

Model/QueueHandler/VarnishUrlPurger.php 1 location

@@ 75-85 (lines=11) @@
72
    /**
73
     * @return void
74
     */
75
    public function runPurgeQueue(): void
76
    {
77
        while (!empty($this->urls)) {
78
            for($i = 0; $i < $this->getMaxNumberOfProcesses(); $i++) {
79
                if (!empty($this->urls)) {
80
                    $this->createRequest(array_pop($this->urls));
81
                }
82
            }
83
            $this->loop->run();
84
        }
85
    }
86
87
    /**
88
     * @return int

Model/QueueHandler/VarnishUrlRegenerator.php 1 location

@@ 38-48 (lines=11) @@
35
    /**
36
     * @return void
37
     */
38
    public function runRegenerationQueue(): void
39
    {
40
        while (!empty($this->urls)) {
41
            for($i = 0; $i < $this->getMaxNumberOfProcesses(); $i++) {
42
                if (!empty($this->urls)) {
43
                    $this->createRequest(array_pop($this->urls));
44
                }
45
            }
46
            $this->loop->run();
47
        }
48
    }
49
50
    /**
51
     * @return int