Code Duplication    Length = 9-9 lines in 3 locations

src/Storage/FluentAuthCode.php 1 location

@@ 85-93 (lines=9) @@
82
     *
83
     * @return void
84
     */
85
    public function associateScope(AuthCodeEntity $token, ScopeEntity $scope)
86
    {
87
        $this->getConnection()->table('oauth_auth_code_scopes')->insert([
88
            'auth_code_id' => $token->getId(),
89
            'scope_id' => $scope->getId(),
90
            'created_at' => Carbon::now(),
91
            'updated_at' => Carbon::now(),
92
        ]);
93
    }
94
95
    /**
96
     * Delete an access token.

src/Storage/FluentAccessToken.php 1 location

@@ 128-136 (lines=9) @@
125
     *
126
     * @return void
127
     */
128
    public function associateScope(AccessTokenEntity $token, ScopeEntity $scope)
129
    {
130
        $this->getConnection()->table('oauth_access_token_scopes')->insert([
131
            'access_token_id' => $token->getId(),
132
            'scope_id' => $scope->getId(),
133
            'created_at' => Carbon::now(),
134
            'updated_at' => Carbon::now(),
135
        ]);
136
    }
137
138
    /**
139
     * Delete an access token.

src/Storage/FluentSession.php 1 location

@@ 134-142 (lines=9) @@
131
     *
132
     * @return void
133
     */
134
    public function associateScope(SessionEntity $session, ScopeEntity $scope)
135
    {
136
        $this->getConnection()->table('oauth_session_scopes')->insert([
137
            'session_id' => $session->getId(),
138
            'scope_id' => $scope->getId(),
139
            'created_at' => Carbon::now(),
140
            'updated_at' => Carbon::now(),
141
        ]);
142
    }
143
144
    /**
145
     * Get a session from an auth code.