Passed
Push — 193-feature/search-permalink ( 77bed7 )
by Maria Daniel Deepak
06:34
created

AdvancedSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 8
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle_advanced_search() 0 3 1
A load() 0 2 1
1
<?php namespace EmailLog\Core;
2
3
use EmailLog\Util;
4
5
/**
6
 * Class AdvancedSearch
7
 * @package EmailLog\Core
8
 *
9
 * @since 2.3.0
10
 */
11
class AdvancedSearch implements Loadie {
12
	public function load() {
13
		add_action( 'el-log-list-adv-search', array( $this, 'handle_advanced_search' ) );
14
	}
15
16
	public function handle_advanced_search( $request ) {
17
		// Nonce verification handled in {@see \EmailLog\Core\Request\NonceChecker::check_nonce()}
18
		$to = Util\el_array_get( $request, 'to' );
0 ignored issues
show
Unused Code introduced by
The assignment to $to is dead and can be removed.
Loading history...
Bug introduced by
The function el_array_get was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
		$to = /** @scrutinizer ignore-call */ Util\el_array_get( $request, 'to' );
Loading history...
19
	}
20
}