Code Duplication    Length = 15-17 lines in 2 locations

src/module/Categories/One/Model.php 1 location

@@ 17-31 (lines=15) @@
14
     *
15
     * @return array
16
     */
17
    public function getCategoryInfo($slug, $type)
18
    {
19
        $stmt = $this->pdo->prepare("
20
            SELECT *
21
            FROM {$this->prefix}categories
22
            WHERE slug = :slug
23
              AND TYPE = :type
24
        ");
25
        $stmt->bindValue(':slug', $slug, \PDO::PARAM_INT);
26
        $stmt->bindValue(':type', $type, \PDO::PARAM_STR);
27
        $stmt->execute();
28
        $results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
29
30
        return $results[0];
31
    }
32
33
    /**
34
     * Get category info.

src/component/Auth/Auth.php 1 location

@@ 170-186 (lines=17) @@
167
     *
168
     * @return array|bool
169
     */
170
    public function getUserDataByEmail($email)
171
    {
172
        $stmt = $this->pdo->prepare("
173
            SELECT *
174
            FROM {$this->table}
175
            WHERE email = :email
176
        ");
177
        $stmt->bindValue(':email', $email, \PDO::PARAM_STR);
178
        $stmt->execute();
179
        $results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
180
181
        if (empty($results[0])) {
182
            return false;
183
        }
184
185
        return $results[0];
186
    }
187
188
    /**
189
     * Validate email.