Inheritance: implements Neos\Flow\Aop\Pointcut\PointcutFilterInterface
 /**
  * @test
  */
 public function reduceTargetClassNamesFiltersAllClassesNotMatchedByAClassNameFilterWithRegularExpressions()
 {
     $availableClassNames = ['TestPackage\\Subpackage\\Class1', 'TestPackage\\Class2', 'TestPackage\\Subpackage\\SubSubPackage\\Class3', 'TestPackage\\Subpackage2\\Class4'];
     sort($availableClassNames);
     $availableClassNamesIndex = new Aop\Builder\ClassNameIndex();
     $availableClassNamesIndex->setClassNames($availableClassNames);
     $expectedClassNames = ['TestPackage\\Subpackage\\Class1', 'TestPackage\\Subpackage\\SubSubPackage\\Class3'];
     sort($expectedClassNames);
     $expectedClassNamesIndex = new Aop\Builder\ClassNameIndex();
     $expectedClassNamesIndex->setClassNames($expectedClassNames);
     $classNameFilter = new Aop\Pointcut\PointcutClassNameFilter('TestPackage\\Subpackage\\.*');
     $result = $classNameFilter->reduceTargetClassNames($availableClassNamesIndex);
     $this->assertEquals($expectedClassNamesIndex, $result, 'The wrong class names have been filtered');
 }
 /**
  * Splits the parameters of the pointcut designator "method" into a class
  * and a method part and adds the appropriately configured filters to the
  * filter composite object.
  *
  * @param string $operator The operator
  * @param string $signaturePattern The pattern expression defining the class and method - the "signature"
  * @param PointcutFilterComposite $pointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class and method filter) will be added to this composite object.
  * @return void
  * @throws InvalidPointcutExpressionException if there's an error in the pointcut expression
  */
 protected function parseDesignatorMethod($operator, $signaturePattern, PointcutFilterComposite $pointcutFilterComposite)
 {
     if (strpos($signaturePattern, '->') === false) {
         throw new InvalidPointcutExpressionException('Syntax error: "->" expected in "' . $signaturePattern . '", defined in ' . $this->sourceHint, 1169027339);
     }
     $methodVisibility = $this->getVisibilityFromSignaturePattern($signaturePattern);
     list($classPattern, $methodPattern) = explode('->', $signaturePattern, 2);
     if (strpos($methodPattern, '(') === false) {
         throw new InvalidPointcutExpressionException('Syntax error: "(" expected in "' . $methodPattern . '", defined in ' . $this->sourceHint, 1169144299);
     }
     $matches = [];
     preg_match(self::PATTERN_MATCHMETHODNAMEANDARGUMENTS, $methodPattern, $matches);
     $methodNamePattern = $matches['MethodName'];
     $methodArgumentPattern = $matches['MethodArguments'];
     $methodArgumentConstraints = $this->getArgumentConstraintsFromMethodArgumentsPattern($methodArgumentPattern);
     $classNameFilter = new PointcutClassNameFilter($classPattern);
     $classNameFilter->injectReflectionService($this->reflectionService);
     $methodNameFilter = new PointcutMethodNameFilter($methodNamePattern, $methodVisibility, $methodArgumentConstraints);
     /** @var SystemLoggerInterface $systemLogger */
     $systemLogger = $this->objectManager->get(SystemLoggerInterface::class);
     $methodNameFilter->injectSystemLogger($systemLogger);
     $methodNameFilter->injectReflectionService($this->reflectionService);
     if ($operator !== '&&') {
         $subComposite = new PointcutFilterComposite();
         $subComposite->addFilter('&&', $classNameFilter);
         $subComposite->addFilter('&&', $methodNameFilter);
         $pointcutFilterComposite->addFilter($operator, $subComposite);
     } else {
         $pointcutFilterComposite->addFilter('&&', $classNameFilter);
         $pointcutFilterComposite->addFilter('&&', $methodNameFilter);
     }
 }