ChannelQuery   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 13
rs 10
ccs 0
cts 4
cp 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A hasChannel() 0 4 1
1
<?php
2
3
namespace Jalle19\StatusManager\Database;
4
5
use Jalle19\StatusManager\Database\Base\ChannelQuery as BaseChannelQuery;
6
7
/**
8
 * @package   Jalle19\StatusManager\Database
9
 * @copyright Copyright &copy; Sam Stenvall 2015-
10
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
11
 */
12
class ChannelQuery extends BaseChannelQuery
13
{
14
15
	/**
16
	 * @param string $instanceName
17
	 * @param string $channelName
18
	 *
19
	 * @return bool
20
	 */
21
	public function hasChannel($instanceName, $channelName)
22
	{
23
		return $this->filterByInstanceName($instanceName)->filterByName($channelName)
24
		            ->findOne() !== null;
25
	}
26
27
}
28