original_string: public function getStatus()
      {
          $status = self::STATUS_OK;
  
          foreach ($this->getItems() as $item) {
              if ($item->getStatus() === self::STATUS_ERROR) {
                  return self::STATUS_ERROR;
              }
  
              if ($item->getStatus() === self::STATUS_WARNING) {
                  $status = self::STATUS_WARNING;
              }
          }
  
          return $status;
      }
code: public function getStatus()
      {
          $status = self::STATUS_OK;
  
          foreach ($this->getItems() as $item) {
              if ($item->getStatus() === self::STATUS_ERROR) {
                  return self::STATUS_ERROR;
              }
  
              if ($item->getStatus() === self::STATUS_WARNING) {
                  $status = self::STATUS_WARNING;
              }
          }
  
          return $status;
      }
code_tokens: public function getStatus ( ) { $ status = self :: STATUS_OK ; foreach ( $ this -> getItems ( ) as $ item ) { if ( $ item -> getStatus ( ) === self :: STATUS_ERROR ) { return self :: STATUS_ERROR ; } if ( $ item -> getStatus ( ) === self :: STATUS_WARNING ) { $ status = self :: STATUS_WARNING ; } } return $ status ; }
docstring: Returns the worst status of the items.
  
  @return string One of the `STATUS_*` constants.
docstring_tokens: Returns the worst status of the items .