GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#10)
by Lukáš
01:41
created

Psr7Trait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 27
wmc 3
lcom 0
cbo 3
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createServerRequest() 0 4 1
A createResponse() 0 4 1
A createStream() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Lookyman\Nette\OAuth2\Server\UI;
6
7
use Lookyman\Nette\OAuth2\Server\Psr7\ApplicationPsr7ResponseInterface;
8
use Lookyman\Nette\OAuth2\Server\Psr7\Response;
9
use Psr\Http\Message\ServerRequestInterface;
10
use Psr\Http\Message\StreamInterface;
11
use Zend\Diactoros\ServerRequestFactory;
12
use Zend\Diactoros\Stream;
13
14
trait Psr7Trait
15
{
16
17
	protected function createServerRequest(): ServerRequestInterface
18
	{
19
		return ServerRequestFactory::fromGlobals();
20
	}
21
22
	protected function createResponse(): ApplicationPsr7ResponseInterface
23
	{
24
		return new Response();
25
	}
26
27
	protected function createStream(): StreamInterface
28
	{
29
		return new Stream('php://temp', 'r+');
30
	}
31
32
}
33