Code Duplication    Length = 12-12 lines in 2 locations

src/SelfTest/Cli/SelfTestCliArguments.php 2 locations

@@ 93-104 (lines=12) @@
90
     *
91
     * @return bool
92
     */
93
    private function testMemoryLimit()
94
    {
95
        $output = $this->testCliRuntime('echo ini_get(\'memory_limit\');');
96
        if ('-1' !== $output) {
97
            if ($this->testOverride('echo ini_get(\'memory_limit\');', '-d memory_limit=1G', '1G')) {
98
                $this->getAutoConfig()->addCommandLineArgument('-d memory_limit=1G');
99
                $this->log->writeln('Will override memory_limit of ' . $output . ' with 1G.');
100
            }
101
        }
102
103
        return true;
104
    }
105
106
    /**
107
     * Test if raising the memory limit is needed.
@@ 111-122 (lines=12) @@
108
     *
109
     * @return bool
110
     */
111
    private function testMaxExecutionTime()
112
    {
113
        $output = $this->testCliRuntime('echo ini_get(\'max_execution_time\');');
114
        if (900 > intval($output)) {
115
            if ($this->testOverride('echo ini_get(\'max_execution_time\');', '-d max_execution_time=900', '900')) {
116
                $this->getAutoConfig()->addCommandLineArgument('-d max_execution_time=900');
117
                $this->log->writeln('Will override max_execution_time of ' . $output . ' with 900 seconds.');
118
            }
119
        }
120
121
        return true;
122
    }
123
124
    /**
125
     * Test if overriding a parameter works.