public function accept(LogEvent $event) : bool
    {
        if (empty($event['origin']['class'])) {
            return false;
        }

        switch ($this->searchMethod) {
            case static::SEARCH_METHOD_STARTS_WITH:
                return (strpos($event['origin']['class'], $this->expectedNamespace) === 0);
            case static::SEARCH_METHOD_CONTAINS:
                $pos = strpos($event['origin']['class'], $this->expectedNamespace);
                if ($pos === false) {
                    return false;
                }

                return ($pos >= 0);
            case static::SEARCH_METHOD_REGEXP:
                return (preg_match($this->expectedNamespace, $event['origin']['class']) > 0);
        }
    // @codeCoverageIgnoreStart
    }
public function accept(LogEvent $event) : bool
    {
        if (empty($event['origin']['class'])) {
            return false;
        }

        switch ($this->searchMethod) {
            case static::SEARCH_METHOD_STARTS_WITH:
                return (strpos($event['origin']['class'], $this->expectedNamespace) === 0);
            case static::SEARCH_METHOD_CONTAINS:
                $pos = strpos($event['origin']['class'], $this->expectedNamespace);
                if ($pos === false) {
                    return false;
                }

                return ($pos >= 0);
            case static::SEARCH_METHOD_REGEXP:
                return (preg_match($this->expectedNamespace, $event['origin']['class']) > 0);
        }
    // @codeCoverageIgnoreStart
    }
public function accept ( LogEvent $ event ) : bool { if ( empty ( $ event [ 'origin' ] [ 'class' ] ) ) { return false ; } switch ( $ this -> searchMethod ) { case static :: SEARCH_METHOD_STARTS_WITH : return ( strpos ( $ event [ 'origin' ] [ 'class' ] , $ this -> expectedNamespace ) === 0 ) ; case static :: SEARCH_METHOD_CONTAINS : $ pos = strpos ( $ event [ 'origin' ] [ 'class' ] , $ this -> expectedNamespace ) ; if ( $ pos === false ) { return false ; } return ( $ pos >= 0 ) ; case static :: SEARCH_METHOD_REGEXP : return ( preg_match ( $ this -> expectedNamespace , $ event [ 'origin' ] [ 'class' ] ) > 0 ) ; } // @codeCoverageIgnoreStart }
Those coverage comments uglify the code quite a lot, but otherwise this area is "not executed"
@param LogEvent $event
@return bool
Those coverage comments uglify the code quite a lot but otherwise this area is not executed