Passed
Branch master (6e6484)
by Petr
06:04
created

YourMembershipException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A __toString() 0 4 1
1
<?php
2
3
4
namespace P2A\YourMembership\Core;
5
6
7
/**
8
 *
9
 */
10
class YourMembershipException extends \Exception
11
{
12
	private $apiMethod;
13
14 2
	public function __construct(string $message, int $code = 0, string $apiMethod)
15
	{
16 2
		$this->apiMethod = $apiMethod;
17 2
		parent::__construct($message, $code, null);
18 2
	}
19
20 1
	public function __toString()
21
	{
22 1
	   return __CLASS__ . ": [{$this->apiMethod}]: {$this->message}\n";
23
   }
24
25
}
26