original_string: public function getMaxWeight($type, $pos)
      {
          if (empty($this->assets[$type][$pos])) {
              return null;
          }
  
          $weights = array();
  
          foreach ($this->assets[$type][$pos] as $asset) {
              $weights[] = $asset['weight'];
          }
  
          return max($weights);
      }
code: public function getMaxWeight($type, $pos)
      {
          if (empty($this->assets[$type][$pos])) {
              return null;
          }
  
          $weights = array();
  
          foreach ($this->assets[$type][$pos] as $asset) {
              $weights[] = $asset['weight'];
          }
  
          return max($weights);
      }
code_tokens: public function getMaxWeight ( $ type , $ pos ) { if ( empty ( $ this -> assets [ $ type ] [ $ pos ] ) ) { return null ; } $ weights = array ( ) ; foreach ( $ this -> assets [ $ type ] [ $ pos ] as $ asset ) { $ weights [ ] = $ asset [ 'weight' ] ; } return max ( $ weights ) ; }
docstring: Returns the max weight of added assets
  @param string $type
  @param string $pos
  @return int|null
docstring_tokens: Returns the max weight of added assets