Completed
Push — develop ( 2f7818...6928d3 )
by Gennady
12:35
created

GV_License_Handler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_instance() 0 4 1
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 10 and the first side effect is on line 4.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/** If this file is called directly, abort. */
3
if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
4
	die();
5
}
6
7
/**
8
 * @deprecated Use \GV\License_Handler instead.
9
 */
10
class GV_License_Handler extends \GV\License_Handler {
0 ignored issues
show
Coding Style introduced by
Since you have declared the constructor as private, maybe you should also declare the class as final.
Loading history...
11
	/**
12
	 * @param \GV\Addon_Settings $GFAddOn
0 ignored issues
show
Bug introduced by
There is no parameter named $GFAddOn. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
13
	 *
14
	 * @deprecated Use \GV\License_Handler::get instead
15
	 *
16
	 * @return GV\License_Handler
17
	 */
18
	public static function get_instance( $settings ) {
19
		gravityview()->log->warning( 'GV_License_Handler::get_instance() is deprated in favor of \GV\License_Handler::get()' );
20
		return \GV\License_Handler::get( $settings );
21
	}
22
}
23