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.

MethodNotSupported   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_method() 0 4 1
A __construct() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ICanBoogie\HTTP;
13
14
use ICanBoogie\Accessor\AccessorTrait;
15
16
/**
17
 * Exception thrown when the HTTP method is not supported.
18
 *
19
 * @property-read string $method The unsupported HTTP method.
20
 */
21
class MethodNotSupported extends ClientError implements Exception
22
{
23
	use AccessorTrait;
24
25
	/**
26
	 * @var string
27
	 */
28
	private $method;
29
30
	/**
31
	 * @return string
32
	 */
33
	protected function get_method()
34
	{
35
		return $this->method;
36
	}
37
38
	/**
39
	 * @param string $method The unsupported HTTP method.
40
	 * @param int $code
41
	 * @param \Exception $previous
42
	 */
43
	public function __construct($method, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null)
44
	{
45
		$this->method = $method;
46
47
		parent::__construct(\ICanboogie\format('Method not supported: %method', [ 'method' => $method ]), $code, $previous);
48
	}
49
}
50