original_string: public static function statusLabel($status = null)
      {
          switch ($status) {
              case User::STATUS_ACTIVE:
                  $label = 'info';
                  $name = ArrayHelper::getValue(User::getStatuses(), $status);
                  break;
              case User::STATUS_BANNED:
                  $label = 'warning';
                  $name = ArrayHelper::getValue(User::getStatuses(), $status);
                  break;
              default:
                  $label = 'default';
                  $name = ArrayHelper::getValue(User::getStatuses(), User::STATUS_REGISTERED);
          }
  
          return Html::tag('span', $name, ['class' => 'label label-' . $label]);
      }
code: public static function statusLabel($status = null)
      {
          switch ($status) {
              case User::STATUS_ACTIVE:
                  $label = 'info';
                  $name = ArrayHelper::getValue(User::getStatuses(), $status);
                  break;
              case User::STATUS_BANNED:
                  $label = 'warning';
                  $name = ArrayHelper::getValue(User::getStatuses(), $status);
                  break;
              default:
                  $label = 'default';
                  $name = ArrayHelper::getValue(User::getStatuses(), User::STATUS_REGISTERED);
          }
  
          return Html::tag('span', $name, ['class' => 'label label-' . $label]);
      }
code_tokens: public static function statusLabel ( $ status = null ) { switch ( $ status ) { case User :: STATUS_ACTIVE : $ label = 'info' ; $ name = ArrayHelper :: getValue ( User :: getStatuses ( ) , $ status ) ; break ; case User :: STATUS_BANNED : $ label = 'warning' ; $ name = ArrayHelper :: getValue ( User :: getStatuses ( ) , $ status ) ; break ; default : $ label = 'default' ; $ name = ArrayHelper :: getValue ( User :: getStatuses ( ) , User :: STATUS_REGISTERED ) ; } return Html :: tag ( 'span' , $ name , [ 'class' => 'label label-' . $ label ] ) ; }
docstring: Returns User status label.
  @param int|null $status status ID
  @return string label HTML
docstring_tokens: Returns User status label .