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

AdvancedSearch::handle_advanced_search()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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
}