GnfSqlNot::isSwitchable()   B
last analyzed

Complexity

Conditions 5
Paths 5

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 7
nc 5
nop 1
dl 0
loc 11
rs 8.8571
c 0
b 0
f 0
1
<?php
2
3
namespace Gnf\db\Helper;
4
5
class GnfSqlNot extends GnfSqlCompareOperator
6
{
7
	public function __construct($in)
8
	{
9
		$this->dat = $in;
10
	}
11
12
	public static function isSwitchable($in)
13
	{
14
		return
15
			is_a($in, '\Gnf\db\Helper\GnfSqlNot') &&
16
			(
17
				is_a($in->dat, '\Gnf\db\Helper\GnfSqlCompareOperator')
18
				|| is_a($in->dat, '\Gnf\db\Helper\GnfSqlNull')
19
				|| is_scalar($in->dat)
20
				|| is_array($in->dat)
21
			);
22
	}
23
}
24