code: private function filterActiveDefinitions(array $definitions)
      {
          return array_filter($definitions, function (Definition $definition) {
              if (!$definition->isActive()) {
                  return false;
              }
  
              return true;
          });
      }
docs: @param Definition[] $definitions
  
  @return Definition[]