original_string: public function findObjectType($id)
      {
          $result = [];
  
          if ($this->getObjectType()->getPropertyDefinition($id) !== null) {
              $result[] = $this->getObjectType();
          }
  
          $secondaryTypes = $this->getSecondaryTypes();
          if ($secondaryTypes !== null) {
              foreach ($secondaryTypes as $secondaryType) {
                  if ($secondaryType->getPropertyDefinition($id) !== null) {
                      $result[] = $secondaryType;
                  }
              }
          }
  
          return empty($result) ? null : $result;
      }
code: public function findObjectType($id)
      {
          $result = [];
  
          if ($this->getObjectType()->getPropertyDefinition($id) !== null) {
              $result[] = $this->getObjectType();
          }
  
          $secondaryTypes = $this->getSecondaryTypes();
          if ($secondaryTypes !== null) {
              foreach ($secondaryTypes as $secondaryType) {
                  if ($secondaryType->getPropertyDefinition($id) !== null) {
                      $result[] = $secondaryType;
                  }
              }
          }
  
          return empty($result) ? null : $result;
      }
code_tokens: public function findObjectType ( $ id ) { $ result = [ ] ; if ( $ this -> getObjectType ( ) -> getPropertyDefinition ( $ id ) !== null ) { $ result [ ] = $ this -> getObjectType ( ) ; } $ secondaryTypes = $ this -> getSecondaryTypes ( ) ; if ( $ secondaryTypes !== null ) { foreach ( $ secondaryTypes as $ secondaryType ) { if ( $ secondaryType -> getPropertyDefinition ( $ id ) !== null ) { $ result [ ] = $ secondaryType ; } } } return empty ( $ result ) ? null : $ result ; }
docstring: Returns a list of primary and secondary object types that define the given property.
  
  @param string $id the ID of the property
  @return ObjectTypeInterface[]|null a list of object types that define the given property or <code>null</code>
  if the property could not be found in the object types that are attached to this object
docstring_tokens: Returns a list of primary and secondary object types that define the given property .