src/Filter/PassFilter.php
public function canHandle(ThingInterface $thing)
    {
        $ok = false;

        if ($this->defaults->passIfCategory()) {
            $category = $this->defaults->getCategory();
            if ($category === 'image' && $thing instanceof ImageInterface
                || $category === 'document' && $thing instanceof DocumentInterface
                || $category === 'audio' && $thing instanceof AudioInterface
                || $category === 'video' && $thing instanceof VideoInterface
                || $category === 'text' && $thing instanceof TextInterface
            ) {
                $ok = true;
            }
        }
        if ($this->defaults->passIfMime()) {
            $mime = $this->defaults->getMime();
            $ok   = $mime === $thing->getMime();
        }

        return $ok;
    }
public function canHandle(ThingInterface $thing)
    {
        $ok = false;

        if ($this->defaults->passIfCategory()) {
            $category = $this->defaults->getCategory();
            if ($category === 'image' && $thing instanceof ImageInterface
                || $category === 'document' && $thing instanceof DocumentInterface
                || $category === 'audio' && $thing instanceof AudioInterface
                || $category === 'video' && $thing instanceof VideoInterface
                || $category === 'text' && $thing instanceof TextInterface
            ) {
                $ok = true;
            }
        }
        if ($this->defaults->passIfMime()) {
            $mime = $this->defaults->getMime();
            $ok   = $mime === $thing->getMime();
        }

        return $ok;
    }
@param ThingInterface $thing

@return boolean