Total Complexity | 8 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class OAuth2 |
||
24 | { |
||
25 | /** |
||
26 | * @var null|string |
||
27 | */ |
||
28 | private $scope; |
||
29 | |||
30 | /** |
||
31 | * @var null|string |
||
32 | */ |
||
33 | private $token_type; |
||
34 | |||
35 | /** |
||
36 | * @var null|string |
||
37 | */ |
||
38 | private $client_id; |
||
39 | |||
40 | /** |
||
41 | * @var null|string |
||
42 | */ |
||
43 | private $resource_owner_id; |
||
44 | |||
45 | /** |
||
46 | * @var null|array |
||
47 | */ |
||
48 | private $custom; |
||
49 | |||
50 | public function __construct(array $data) |
||
51 | { |
||
52 | foreach ($data as $key => $value) { |
||
53 | if (!property_exists($this, $key)) { |
||
54 | throw new BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, \get_class($this))); |
||
55 | } |
||
56 | $this->{$key} = $value; |
||
57 | } |
||
58 | } |
||
59 | |||
60 | public function getClientId(): ?string |
||
63 | } |
||
64 | |||
65 | public function getResourceOwnerId(): ?string |
||
68 | } |
||
69 | |||
70 | public function getScope(): ?string |
||
73 | } |
||
74 | |||
75 | public function getTokenType(): ?string |
||
76 | { |
||
77 | return $this->token_type; |
||
78 | } |
||
79 | |||
80 | public function getCustom(): ?array |
||
83 | } |
||
84 | } |
||
85 |