Code Duplication    Length = 3-3 lines in 5 locations

examples/SafeBrowsing/index.php 1 location

@@ 46-48 (lines=3) @@
43
44
        $settings = require_once '../settings.php';
45
46
        if (!isset($settings["safebrowsing"]["key"]) || !$settings["safebrowsing"]["key"]) {
47
            throw new SafeBrowsingException('Empty Safe Browsing key');
48
        }
49
50
        if (isset($_GET['url']) && $_GET['url']) {
51
            $url = $_GET['url'];

examples/SafeBrowsing/local-search.php 1 location

@@ 85-87 (lines=3) @@
82
83
        $settings = require_once '../settings.php';
84
85
        if (!isset($settings["safebrowsing"]["key"]) || !$settings["safebrowsing"]["key"]) {
86
            throw new SafeBrowsingException('Empty Safe Browsing key');
87
        }
88
89
        if (isset($_GET['url']) && $_GET['url']) {
90
            $url = $_GET['url'];

examples/SafeBrowsing/lookup.php 1 location

@@ 44-46 (lines=3) @@
41
42
        $settings = require_once '../settings.php';
43
44
        if (!isset($settings["safebrowsing"]["key"]) || !$settings["safebrowsing"]["key"]) {
45
            throw new SafeBrowsingException('Empty Safe Browsing key');
46
        }
47
48
        if (isset($_GET['url']) && $_GET['url']) {
49
            $url = $_GET['url'];

examples/SafeBrowsing/save-prefixes-db.php 1 location

@@ 38-40 (lines=3) @@
35
36
        $settings = require_once '../settings.php';
37
38
        if (!isset($settings["safebrowsing"]["key"]) || !$settings["safebrowsing"]["key"]) {
39
            throw new SafeBrowsingException('Empty Safe Browsing key');
40
        }
41
42
        $key = $settings["safebrowsing"]["key"];
43

examples/SafeBrowsing/update-prefixes-db.php 1 location

@@ 39-41 (lines=3) @@
36
37
        $settings = require_once '../settings.php';
38
39
        if (!isset($settings["safebrowsing"]["key"]) || !$settings["safebrowsing"]["key"]) {
40
            throw new SafeBrowsingException('Empty Safe Browsing key');
41
        }
42
43
        $key = $settings["safebrowsing"]["key"];
44