Code Duplication    Length = 5-5 lines in 2 locations

app/lib/FFCMS/Controllers/API/Token.php 1 location

@@ 95-99 (lines=5) @@
92
        }
93
94
        // code expired!
95
        if (time() > strtotime($tokensMapper->expires)) {
96
            $this->failure('authentication_error', "The token expired.", 401);
97
            $this->setOAuthError('invalid_grant');
98
            return;
99
        }
100
101
        // now set a token into the the same token object
102
        $tokensMapper->setUUID('token');

app/lib/FFCMS/Controllers/API/API.php 1 location

@@ 357-361 (lines=5) @@
354
                return false;
355
            }
356
            // check token is not out-of-date
357
            if (time() > strtotime($tokensMapper->expires)) {
358
                $this->failure('authentication_error', "The token expired!", 401);
359
                $this->setOAuthError('invalid_grant');
360
361
                return false;
362
            }
363
            // if token found load the user for the token
364
            $usersModel->getUserByUUID($tokensMapper->users_uuid);