Completed
Push — master ( 1de13c...bf55ce )
by Alex
33:38
created

RequestEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 2 Features 1
Metric Value
wmc 2
c 3
b 2
f 1
lcom 0
cbo 1
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRequest() 0 4 1
1
<?php
2
/**
3
 * @author      Alex Bilbie <[email protected]>
4
 * @copyright   Copyright (c) Alex Bilbie
5
 * @license     http://mit-license.org/
6
 *
7
 * @link        https://github.com/thephpleague/oauth2-server
8
 */
9
namespace League\OAuth2\Server;
10
11
use League\Event\Event;
12
use Psr\Http\Message\ServerRequestInterface;
13
14
class RequestEvent extends Event
15
{
16
    /**
17
     * @var \Psr\Http\Message\ServerRequestInterface
18
     */
19
    private $request;
20
21
    /**
22
     * RequestEvent constructor.
23
     *
24
     * @param string                                   $name
25
     * @param \Psr\Http\Message\ServerRequestInterface $request
26
     */
27
    public function __construct($name, ServerRequestInterface $request)
28
    {
29
        parent::__construct($name);
30
        $this->request = $request;
31
    }
32
33
    /**
34
     * @return ServerRequestInterface
35
     * @codeCoverageIgnore
36
     */
37
    public function getRequest()
38
    {
39
        return $this->request;
40
    }
41
}
42