Scope   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 2
c 4
b 0
f 1
lcom 0
cbo 0
dl 0
loc 24
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 8 2
1
<?php
2
namespace Redbox\Twitch;
3
4
/*
5
 * @depecated
6
 */
7
class Scope
8
{
9
    const SCOPE_USER_READ            = 'user_read';
10
    const SCOPE_USER_BLOCKS_EDIT     = 'user_blocks_edit';
11
    const SCOPE_USER_BLOCKS_READ     = 'user_blocks_read';
12
    const SCOPE_USER_FOLLOWERS_EDIT  = 'user_follows_edit';
13
    const CHANNEL_READ               = 'channel_read';
14
    const CHANNEL_EDITOR             = 'channel_editor';
15
    const CHANNEL_COMMERCIAL         = 'channel_commercial';
16
    const CHANNEL_STREAM             = 'channel_stream';
17
    const CHANNEL_SUBSCRIPTIONS      = 'channel_subscriptions';
18
    const USER_SUBSCRIPTIONS         = 'user_subscriptions';
19
    const CHANNEL_CHECK_SUBSCRIPTION = 'channel_check_subscription';
20
    const CHAT_LOGIN                 = 'chat_login';
21
22
    public static function generate($scopes = [])
23
    {
24
        $scps = [];
25
        foreach ($scopes as $scope) {
26
            $scps[] = $scope;
27
        }
28
        return trim(implode(' ', $scps));
29
    }
30
}