original_string: public function validateProperties(array $properties)
      {
          $definedProperties = $this->defineProperties() ?: [];
  
          /*
           * Determine and implement default values
           */
          $defaultProperties = [];
  
          foreach ($definedProperties as $name => $information) {
              if (array_key_exists('default', $information)) {
                  $defaultProperties[$name] = $information['default'];
              }
          }
  
          $properties = array_merge($defaultProperties, $properties);
  
          return $properties;
      }
code: public function validateProperties(array $properties)
      {
          $definedProperties = $this->defineProperties() ?: [];
  
          /*
           * Determine and implement default values
           */
          $defaultProperties = [];
  
          foreach ($definedProperties as $name => $information) {
              if (array_key_exists('default', $information)) {
                  $defaultProperties[$name] = $information['default'];
              }
          }
  
          $properties = array_merge($defaultProperties, $properties);
  
          return $properties;
      }
code_tokens: public function validateProperties ( array $ properties ) { $ definedProperties = $ this -> defineProperties ( ) ? : [ ] ; /*
           * Determine and implement default values
           */ $ defaultProperties = [ ] ; foreach ( $ definedProperties as $ name => $ information ) { if ( array_key_exists ( 'default' , $ information ) ) { $ defaultProperties [ $ name ] = $ information [ 'default' ] ; } } $ properties = array_merge ( $ defaultProperties , $ properties ) ; return $ properties ; }
docstring: Validates the properties against the defined properties of the class.
  This method also sets default properties.
  @param array $properties The supplied property values.
  @return array The validated property set, with defaults applied.
docstring_tokens: Validates the properties against the defined properties of the class . This method also sets default properties .