public static function formatResult($result, $decorate = true)
    {
        $name = isset(self::$stateNames[$result]) ? self::$stateNames[$result] : $result;

        return $decorate && $result === Activity::RESULT_FAILURE
            ? '<error>' . $name . '</error>'
            : $name;
    }
public static function formatResult($result, $decorate = true)
    {
        $name = isset(self::$stateNames[$result]) ? self::$stateNames[$result] : $result;

        return $decorate && $result === Activity::RESULT_FAILURE
            ? '<error>' . $name . '</error>'
            : $name;
    }
public static function formatResult ( $ result , $ decorate = true ) { $ name = isset ( self :: $ stateNames [ $ result ] ) ? self :: $ stateNames [ $ result ] : $ result ; return $ decorate && $ result === Activity :: RESULT_FAILURE ? '<error>' . $ name . '</error>' : $ name ; }
Format a result.

@param string $result
@param bool   $decorate

@return string
Format a result .