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.

ModuleNotDefined::get_module_id()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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\Module;
13
14
use ICanBoogie\Accessor\AccessorTrait;
15
use ICanBoogie\HTTP\Status;
16
17
/**
18
 * Exception thrown when a requested module is not defined.
19
 *
20
 * @property-read string $module_id The identifier of the module that is not defined.
21
 */
22 View Code Duplication
class ModuleNotDefined extends \RuntimeException
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
	use AccessorTrait;
25
26
	/**
27
	 * Identifier of the module.
28
	 *
29
	 * @var string
30
	 */
31
	private $module_id;
32
33
	/**
34
	 * @return string
35
	 */
36
	protected function get_module_id()
37
	{
38
		return $this->module_id;
39
	}
40
41
	/**
42
	 * @param string $module_id
43
	 * @param int $code
44
	 * @param \Exception|null $previous
45
	 */
46
	public function __construct($module_id, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null)
47
	{
48
		$this->module_id = $module_id;
49
50
		parent::__construct(\ICanBoogie\format('Module is not defined: %module_id', [
51
52
			'module_id' => $module_id
53
54
		]), $code, $previous);
55
	}
56
}
57