Потеря данных в case

Issue #28 resolved
sidxx55 created an issue
function getParamsByGroupType( $GroupType = self::PARAM_TYPE_PARAMS )
{
switch ( $GroupType )
{
case self::PARAM_TYPE_PARAMS :
return $this->getParams( );
case self::PARAM_TYPE_METRICS :
return $this->getMetrics( );
case self::PARAM_TYPE_IMAGES :
return $this->getImages( );
case self::PARAM_TYPE_SEO :
return $this->getSeoParams( );
}
}
switch (true) {
                        case $ord_var_c == 0x08:
                            $ascii .= '\b';
                            break;
                        case $ord_var_c == 0x09:
                            $ascii .= '\t';
                            break;
                      case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
                            // characters U-00000000 - U-0000007F (same as ASCII)
                            $ascii .= $var{$c};
                            break;
                        case $ord_var_c == 0x0A:
                            $ascii .= '\n';
                            break;
                }

выход как

{
switch ($GroupType) {
case self:
return $this->getParams();
case :
return $this->getMetrics();
case :
return $this->getImages();
case :
return $this->getSeoParams();
}
switch (true) {
case $ord_var_c == 8:
        $ascii .= "\b";
        break;

case :
        $ascii .= "\\t";
        break;

case :
        $ascii .= $var[$c];
        break;

case :
        $ascii .= "\\n";
        break;
}

Comments (2)

  1. Log in to comment