Completed
Branch FET-8385-datetime-ticket-selec... (cac7e5)
by
unknown
67:23 queued 43:13
created

InvalidSessionDataException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 6 6 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
namespace EventEspresso\core\exceptions;
3
4
defined( 'ABSPATH' ) || exit;
5
6
7
8
/**
9
 * Class InvalidSessionDataException
10
 * throw when the session data can not be reconstructed from what was in the database
11
 *
12
 * @package       Event Espresso
13
 * @author        Brent Christensen
14
 * @since         $VID:$
15
 */
16 View Code Duplication
class InvalidSessionDataException extends \Exception {
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...
17
18
	/**
19
	 * InvalidInterfaceException constructor.
20
	 *
21
	 * @param string     $message
22
	 * @param int        $code
23
	 * @param \Exception $previous
24
	 */
25
	public function __construct( $message = '', $code = 0, \Exception $previous = null ) {
26
		if ( empty( $message ) ) {
27
			$message = esc_html__( 'The session data is either missing or invalid.', 'event_espresso' );
28
		}
29
		parent::__construct( $message, $code, $previous );
30
	}
31
32
33
}
34
// End of file InvalidSessionDataException.php
35
// Location: EventEspresso\core\exceptions\InvalidSessionDataException.php