Code Duplication    Length = 8-8 lines in 2 locations

src/Service/BaseService.php 2 locations

@@ 124-131 (lines=8) @@
121
     * @return string
122
     * @throws \Exception
123
     */
124
    protected function validateName($name)
125
    {
126
        if (!v::alnum()->length(2, 100)->validate($name)) {
127
            throw new \Exception(self::USER_NAME_INVALID, 400);
128
        }
129
130
        return $name;
131
    }
132
133
    /**
134
     * Validate and sanitize a email address.
@@ 150-157 (lines=8) @@
147
        return $email;
148
    }
149
150
    protected function validateTaskName($name)
151
    {
152
        if (!v::alnum()->length(2, 100)->validate($name)) {
153
            throw new \Exception(self::TASK_NAME_INVALID, 400);
154
        }
155
156
        return $name;
157
    }
158
159
    protected function validateStatus($status)
160
    {