Code Duplication    Length = 9-9 lines in 3 locations

src/Storage/FluentAccessToken.php 1 location

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

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/FluentSession.php 1 location

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