Page MenuHomeWickedGov Phorge

CategoryIssueFilter.php
No OneTemporary

Size
703 B
Referenced Files
None
Subscribers
None

CategoryIssueFilter.php

<?php
declare(strict_types=1);
namespace Phan\Output\Filter;
use Phan\IssueInstance;
use Phan\Output\IssueFilterInterface;
/**
* This is a filter which limits `IssueInstance`s to specific categories,
* represented as the bitmask $this->mask
*/
final class CategoryIssueFilter implements IssueFilterInterface
{
/** @var int a bitmask of categories to allow */
private $mask;
/**
* CategoryIssueFilter constructor.
* @param int $mask
*/
public function __construct(int $mask = -1)
{
$this->mask = $mask;
}
public function supports(IssueInstance $issue): bool
{
return (bool)($issue->getIssue()->getCategory() & $this->mask);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 21:07 (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9b/67/298e54d91980abd995aeee862694
Default Alt Text
CategoryIssueFilter.php (703 B)

Event Timeline