code: private function filter($sources, array $filters = array())
      {
          $result = array();
  
          foreach ($sources as $source) {
  
              if (SourceFilterUtil::matches($source, $filters)) {
                  $result[] = $source;
              }
          }
  
          return $result;
      }
docs: Filter sources.
  
  Available filter criteria:
  * name: string
  * names: string[]
  
  @param SourceInterface[] $sources Sources to filter.
  @param array $filters Filter criteria.
  
  @return SourceInterface[]