Code Duplication    Length = 5-5 lines in 4 locations

core/SanityTests.php 4 locations

@@ 201-205 (lines=5) @@
198
     * test if zip is available
199
     */
200
    private function zip_test() {
201
        if (exec("which zip") != "") {
202
            $this->test_return(\core\common\Entity::L_OK, "<strong>zip</strong> binary found.");
203
        } else {
204
            $this->test_return(\core\common\Entity::L_ERROR, "<strong>zip</strong> not found in your \$PATH!");
205
        }
206
    }
207
208
    /**
@@ 215-219 (lines=5) @@
212
        exec(CONFIG_DIAGNOSTICS['PATHS']['eapol_test'], $out, $retval);
213
        if ($retval == 255) {
214
            $o = preg_grep('/-o<server cert/', $out);
215
            if (count($o) > 0) {
216
                $this->test_return(\core\common\Entity::L_OK, "<strong>eapol_test</strong> script found.");
217
            } else {
218
                $this->test_return(\core\common\Entity::L_ERROR, "<strong>eapol_test</strong> found, but is too old!");
219
            }
220
        } else {
221
            $this->test_return(\core\common\Entity::L_ERROR, "<strong>eapol_test</strong> not found!");
222
        }
@@ 469-473 (lines=5) @@
466
                $allthere .= $onelanguage['locale'] . " ";
467
            }
468
        }
469
        if ($allthere == "") {
470
            $this->test_return(\core\common\Entity::L_OK, "All of your configured locales are available on your system.");
471
        } else {
472
            $this->test_return(\core\common\Entity::L_WARN, "Some of your configured locales (<strong>$allthere</strong>) are not installed and will not be displayed correctly!");
473
        }
474
    }
475
476
    /**
@@ 536-540 (lines=5) @@
533
                fclose($handle);
534
            }
535
        }
536
        if ($defaultvalues != "") {
537
            $this->test_return(\core\common\Entity::L_WARN, "Your configuration in config/config.php contains unchanged default values or links to inexistent files: <strong>$defaultvalues</strong>!");
538
        } else {
539
            $this->test_return(\core\common\Entity::L_OK, "Your configuration does not contain any unchanged defaults, which is a good sign.");
540
        }
541
    }
542
543
    /**