Code Duplication    Length = 8-8 lines in 2 locations

src/Service/BaseService.php 2 locations

@@ 107-114 (lines=8) @@
104
     * @return string
105
     * @throws \Exception
106
     */
107
    protected function validateName($name)
108
    {
109
        if (!v::alnum()->length(2, 100)->validate($name)) {
110
            throw new \Exception(self::USER_NAME_INVALID, 400);
111
        }
112
113
        return $name;
114
    }
115
116
    /**
117
     * Validate and sanitize a email address.
@@ 133-140 (lines=8) @@
130
        return $email;
131
    }
132
133
    protected function validateTaskName($name)
134
    {
135
        if (!v::alnum()->length(2, 100)->validate($name)) {
136
            throw new \Exception(self::TASK_NAME_INVALID, 400);
137
        }
138
139
        return $name;
140
    }
141
}
142