public function filter($value)
    {
        $isInternalAllowed = $this->builder->isVisibilityAllowed(Settings::VISIBILITY_INTERNAL);
        if ($isInternalAllowed) {
            $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '$1', $value->getDescription()));

            return $value;
        }

        // remove inline @internal tags
        $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '', $value->getDescription()));

        // if internal elements are not allowed; filter this element
        if ($value->getTags()->get('internal')) {
            return null;
        }

        return $value;
    }
public function filter($value)
    {
        $isInternalAllowed = $this->builder->isVisibilityAllowed(Settings::VISIBILITY_INTERNAL);
        if ($isInternalAllowed) {
            $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '$1', $value->getDescription()));

            return $value;
        }

        // remove inline @internal tags
        $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '', $value->getDescription()));

        // if internal elements are not allowed; filter this element
        if ($value->getTags()->get('internal')) {
            return null;
        }

        return $value;
    }
public function filter ( $ value ) { $ isInternalAllowed = $ this -> builder -> isVisibilityAllowed ( Settings :: VISIBILITY_INTERNAL ) ; if ( $ isInternalAllowed ) { $ value -> setDescription ( preg_replace ( '/\{@internal\s(.+?)\}\}/' , '$1' , $ value -> getDescription ( ) ) ) ; return $ value ; } // remove inline @internal tags $ value -> setDescription ( preg_replace ( '/\{@internal\s(.+?)\}\}/' , '' , $ value -> getDescription ( ) ) ) ; // if internal elements are not allowed; filter this element if ( $ value -> getTags ( ) -> get ( 'internal' ) ) { return null ; } return $ value ; }
If the ProjectDescriptor's settings allow internal tags then return the Descriptor, otherwise null to filter it.

@param DescriptorAbstract $value

@return DescriptorAbstract|null
If the ProjectDescriptor s settings allow internal tags then return the Descriptor otherwise null to filter it .