original_string: public function convertExtensionFeatures(array $data = null)
      {
          $features = [];
          $extendedFeatures = array_filter(array_filter((array) $data, 'is_array'), function ($item) { return !empty($item); });
  
          foreach ($extendedFeatures as $extendedFeature) {
  
              $feature = new ExtensionFeature();
              $feature->setId((string) $extendedFeature[JSONConstants::JSON_FEATURE_ID]);
              $feature->setUrl((string) $extendedFeature[JSONConstants::JSON_FEATURE_URL]);
              $feature->setCommonName((string) $extendedFeature[JSONConstants::JSON_FEATURE_COMMON_NAME]);
              $feature->setVersionLabel((string) $extendedFeature[JSONConstants::JSON_FEATURE_VERSION_LABEL]);
              $feature->setDescription((string) $extendedFeature[JSONConstants::JSON_FEATURE_DESCRIPTION]);
  
              $featureData = [];
              foreach ($extendedFeature[JSONConstants::JSON_FEATURE_DATA] ?? [] as $key => $value) {
                  $featureData[$key] = $value;
              }
  
              $feature->setFeatureData($featureData);
  
              $feature->setExtensions($this->convertExtension($extendedFeature, JSONConstants::getFeatureKeys()));
  
              $features[] = $feature;
          }
  
          return $features;
      }
code: public function convertExtensionFeatures(array $data = null)
      {
          $features = [];
          $extendedFeatures = array_filter(array_filter((array) $data, 'is_array'), function ($item) { return !empty($item); });
  
          foreach ($extendedFeatures as $extendedFeature) {
  
              $feature = new ExtensionFeature();
              $feature->setId((string) $extendedFeature[JSONConstants::JSON_FEATURE_ID]);
              $feature->setUrl((string) $extendedFeature[JSONConstants::JSON_FEATURE_URL]);
              $feature->setCommonName((string) $extendedFeature[JSONConstants::JSON_FEATURE_COMMON_NAME]);
              $feature->setVersionLabel((string) $extendedFeature[JSONConstants::JSON_FEATURE_VERSION_LABEL]);
              $feature->setDescription((string) $extendedFeature[JSONConstants::JSON_FEATURE_DESCRIPTION]);
  
              $featureData = [];
              foreach ($extendedFeature[JSONConstants::JSON_FEATURE_DATA] ?? [] as $key => $value) {
                  $featureData[$key] = $value;
              }
  
              $feature->setFeatureData($featureData);
  
              $feature->setExtensions($this->convertExtension($extendedFeature, JSONConstants::getFeatureKeys()));
  
              $features[] = $feature;
          }
  
          return $features;
      }
code_tokens: public function convertExtensionFeatures ( array $ data = null ) { $ features = [ ] ; $ extendedFeatures = array_filter ( array_filter ( ( array ) $ data , 'is_array' ) , function ( $ item ) { return ! empty ( $ item ) ; } ) ; foreach ( $ extendedFeatures as $ extendedFeature ) { $ feature = new ExtensionFeature ( ) ; $ feature -> setId ( ( string ) $ extendedFeature [ JSONConstants :: JSON_FEATURE_ID ] ) ; $ feature -> setUrl ( ( string ) $ extendedFeature [ JSONConstants :: JSON_FEATURE_URL ] ) ; $ feature -> setCommonName ( ( string ) $ extendedFeature [ JSONConstants :: JSON_FEATURE_COMMON_NAME ] ) ; $ feature -> setVersionLabel ( ( string ) $ extendedFeature [ JSONConstants :: JSON_FEATURE_VERSION_LABEL ] ) ; $ feature -> setDescription ( ( string ) $ extendedFeature [ JSONConstants :: JSON_FEATURE_DESCRIPTION ] ) ; $ featureData = [ ] ; foreach ( $ extendedFeature [ JSONConstants :: JSON_FEATURE_DATA ] ?? [ ] as $ key => $ value ) { $ featureData [ $ key ] = $ value ; } $ feature -> setFeatureData ( $ featureData ) ; $ feature -> setExtensions ( $ this -> convertExtension ( $ extendedFeature , JSONConstants :: getFeatureKeys ( ) ) ) ; $ features [ ] = $ feature ; } return $ features ; }
docstring: Convert given input data to an ExtensionFeature object
  
  @param array|null $data
  @return ExtensionFeature[]
docstring_tokens: Convert given input data to an ExtensionFeature object