public function satisfy(array $configuration, AstClassReferenceInterface $abstractClassReference, AstMap $astMap, CollectorFactory $collectorFactory, AstParserInterface $astParser)
 {
     if (!isset($configuration['must'])) {
         $configuration['must'] = [];
     }
     if (!isset($configuration['must_not'])) {
         $configuration['must_not'] = [];
     }
     if (!$configuration['must'] && !$configuration['must_not']) {
         throw new \InvalidArgumentException('bool collector must have a must or a must_not attribute');
     }
     foreach ($configuration['must'] as $v) {
         $configurationForCollector = ConfigurationCollector::fromArray($v);
         if (!$collectorFactory->getCollector($configurationForCollector->getType())->satisfy($configurationForCollector->getArgs(), $abstractClassReference, $astMap, $collectorFactory, $astParser)) {
             return false;
         }
     }
     foreach ($configuration['must_not'] as $v) {
         $configurationForCollector = ConfigurationCollector::fromArray($v);
         if ($collectorFactory->getCollector($configurationForCollector->getType())->satisfy($configurationForCollector->getArgs(), $abstractClassReference, $astMap, $collectorFactory, $astParser)) {
             return false;
         }
     }
     return true;
 }
 public static function fromArray(array $arr)
 {
     $options = (new OptionsResolver())->setRequired(['name', 'collectors'])->resolve($arr);
     return new static(array_map(function ($v) {
         return ConfigurationCollector::fromArray($v);
     }, $options['collectors']), $options['name']);
 }
 public function testFromArray()
 {
     $configurationCollector = ConfigurationCollector::fromArray($args = ['type' => 'foo', 'abc' => 'def']);
     $this->assertEquals('foo', $configurationCollector->getType());
     $this->assertEquals($args, $configurationCollector->getArgs());
 }