Code Duplication    Length = 3-3 lines in 8 locations

src/Customer/Helper.php 8 locations

@@ 45-47 (lines=3) @@
42
            $aErr['email'] = true;
43
        }
44
        $postcorpname = filter_input(INPUT_POST, 'corpname', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
45
        if (HelperConfig::$customer['validate_corpname'] && (empty($postcorpname) || strlen(trim($postcorpname)) < 3)) {
46
            $aErr['corpname'] = true;
47
        }
48
        $postname = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
49
        if (HelperConfig::$customer['validate_name'] && (empty($postname) || strlen(trim($postname)) < 3)) {
50
            $aErr['name'] = true;
@@ 49-51 (lines=3) @@
46
            $aErr['corpname'] = true;
47
        }
48
        $postname = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
49
        if (HelperConfig::$customer['validate_name'] && (empty($postname) || strlen(trim($postname)) < 3)) {
50
            $aErr['name'] = true;
51
        }
52
        $poststreet = filter_input(INPUT_POST, 'street', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
53
        if (HelperConfig::$customer['validate_street'] && (empty($poststreet) || strlen(trim($poststreet)) < 3)) {
54
            $aErr['street'] = true;
@@ 53-55 (lines=3) @@
50
            $aErr['name'] = true;
51
        }
52
        $poststreet = filter_input(INPUT_POST, 'street', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
53
        if (HelperConfig::$customer['validate_street'] && (empty($poststreet) || strlen(trim($poststreet)) < 3)) {
54
            $aErr['street'] = true;
55
        }
56
        $postzip = filter_input(INPUT_POST, 'zip', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
57
        if (HelperConfig::$customer['validate_zip'] && (empty($postzip) || strlen(trim($postzip)) < 4)) {
58
            $aErr['zip'] = true;
@@ 57-59 (lines=3) @@
54
            $aErr['street'] = true;
55
        }
56
        $postzip = filter_input(INPUT_POST, 'zip', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
57
        if (HelperConfig::$customer['validate_zip'] && (empty($postzip) || strlen(trim($postzip)) < 4)) {
58
            $aErr['zip'] = true;
59
        }
60
        $posttown = filter_input(INPUT_POST, 'town', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
61
        if (HelperConfig::$customer['validate_town'] && (empty($posttown) || strlen(trim($posttown)) < 3)) {
62
            $aErr['town'] = true;
@@ 61-63 (lines=3) @@
58
            $aErr['zip'] = true;
59
        }
60
        $posttown = filter_input(INPUT_POST, 'town', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
61
        if (HelperConfig::$customer['validate_town'] && (empty($posttown) || strlen(trim($posttown)) < 3)) {
62
            $aErr['town'] = true;
63
        }
64
        $postphone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
65
        if (HelperConfig::$customer['validate_phone'] && (empty($postphone) || strlen(trim($postphone)) < 6)) {
66
            $aErr['phone'] = true;
@@ 65-67 (lines=3) @@
62
            $aErr['town'] = true;
63
        }
64
        $postphone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
65
        if (HelperConfig::$customer['validate_phone'] && (empty($postphone) || strlen(trim($postphone)) < 6)) {
66
            $aErr['phone'] = true;
67
        }
68
        $postcellphone = filter_input(INPUT_POST, 'cellphone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
69
        if (HelperConfig::$customer['validate_cellphone'] && (empty($postcellphone) || strlen(trim($postcellphone)) < 11)) {
70
            $aErr['cellphone'] = true;
@@ 69-71 (lines=3) @@
66
            $aErr['phone'] = true;
67
        }
68
        $postcellphone = filter_input(INPUT_POST, 'cellphone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
69
        if (HelperConfig::$customer['validate_cellphone'] && (empty($postcellphone) || strlen(trim($postcellphone)) < 11)) {
70
            $aErr['cellphone'] = true;
71
        }
72
        $postfax = filter_input(INPUT_POST, 'fax', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
73
        if (HelperConfig::$customer['validate_fax'] && (empty($postfax) || strlen(trim($postfax)) < 6)) {
74
            $aErr['fax'] = true;
@@ 73-75 (lines=3) @@
70
            $aErr['cellphone'] = true;
71
        }
72
        $postfax = filter_input(INPUT_POST, 'fax', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
73
        if (HelperConfig::$customer['validate_fax'] && (empty($postfax) || strlen(trim($postfax)) < 6)) {
74
            $aErr['fax'] = true;
75
        }
76
        $postcountry = filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
77
        if (HelperConfig::$customer['validate_country'] && (empty($postcountry) || !isset(HelperConfig::$countries['countries_' .$sLang][$postcountry]))) {
78
            $aErr['country'] = true;