Ignore:
Timestamp:
2012/02/06 11:05:15 (12 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • Zend Framework PHP 標準コーディング規約への準拠を高めた
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/graph/SC_GraphLine.php

    r21420 r21441  
    6565    function drawYTitle() { 
    6666        // Y軸にタイトルを入れる 
    67         if($this->YTitle != "") { 
     67        if ($this->YTitle != "") { 
    6868            $text_width = $this->getTextWidth($this->YTitle, FONT_SIZE); 
    6969            $x_pos = $this->left - ($text_width / 2); 
     
    7676    function drawXTitle() { 
    7777        // Y軸にタイトルを入れる 
    78         if($this->XTitle != "") { 
     78        if ($this->XTitle != "") { 
    7979            $text_width = $this->getTextWidth($this->XTitle, FONT_SIZE); 
    8080            $x_pos = $this->left + $this->area_width - ($text_width / 2) + 30; 
     
    9191        // 上から目盛りを入れていく 
    9292        $pos = 0; 
    93         for($i = 0; $i < (LINE_Y_SCALE * 2); $i++) { 
     93        for ($i = 0; $i < (LINE_Y_SCALE * 2); $i++) { 
    9494            // 目盛り幅 
    95             if(($i % 2) == 0) { 
     95            if (($i % 2) == 0) { 
    9696                $sw = LINE_SCALE_SIZE; 
    97                 if($this->ygrid_on) { 
     97                if ($this->ygrid_on) { 
    9898                    imageline($this->image, $this->left, $this->top + $pos, $this->left + $this->area_width, $this->top + $pos, $this->grid_color); 
    9999                } 
     
    116116 
    117117        // 棒グラフの場合は半目盛りずらす 
    118         if($bar) { 
     118        if ($bar) { 
    119119            $half_scale = intval($this->area_width / ($count + 1) / 2); 
    120120        } else { 
     
    124124        // ラベルの表示インターバルを算出 
    125125        $interval = ceil($count / LINE_XLABEL_MAX); // 切り上げ 
    126         for($i = 0; $i < $count; $i++) { 
     126        for ($i = 0; $i < $count; $i++) { 
    127127            // X軸に目盛りを入れる 
    128128            $x = $arrPointList[$i][0]; 
     
    130130            imageline($this->image, $x - $half_scale, $pos, $x - $half_scale, $pos - LINE_SCALE_SIZE,  $this->flame_color); 
    131131            // ラベルを入れる 
    132             if(($i % $interval) == 0) { 
     132            if (($i % $interval) == 0) { 
    133133                $text_width = $this->getTextWidth($this->arrXLabel[$i], FONT_SIZE); 
    134134                $x_pos = $x; 
     
    145145 
    146146        // 棒グラフの場合は最後の目盛りを一つ追加する 
    147         if($bar) { 
     147        if ($bar) { 
    148148            imageline($this->image, $x + $half_scale, $pos, $x + $half_scale, $pos - LINE_SCALE_SIZE,  $this->flame_color); 
    149149        } 
     
    179179        $size = $this->area_height / LINE_Y_SCALE; 
    180180        $pos = 0; 
    181         for($i = 0; $i <= LINE_Y_SCALE; $i++) { 
     181        for ($i = 0; $i <= LINE_Y_SCALE; $i++) { 
    182182            $snumber = $number * (LINE_Y_SCALE - $i); 
    183183            $disp_number = number_format($snumber); 
     
    199199        $this->graph_max = $tenval * (intval($data_max / $tenval) + 1); 
    200200        // 最大値が10未満の場合の対応 
    201         if($this->graph_max < 10) { 
     201        if ($this->graph_max < 10) { 
    202202            $this->graph_max = 10; 
    203203        } 
     
    211211 
    212212        // 折れ線グラフ描画 
    213         for($i = 0; $i < $this->line_max; $i++) { 
     213        for ($i = 0; $i < $this->line_max; $i++) { 
    214214            $this->drawLine($i); 
    215215        } 
    216216 
    217217        // マークを描画 
    218         for($i = 0; $i < $this->line_max; $i++) { 
     218        for ($i = 0; $i < $this->line_max; $i++) { 
    219219            $this->drawMark($i); 
    220220        } 
    221221 
    222222        // ラベルを描画 
    223         for($i = 0; $i < $this->line_max; $i++) { 
     223        for ($i = 0; $i < $this->line_max; $i++) { 
    224224            $this->drawLabel($i); 
    225225        } 
     
    234234 
    235235        $count = count($arrPointList); 
    236         for($i = 0; $i < $count; $i++) { 
     236        for ($i = 0; $i < $count; $i++) { 
    237237            $x = $arrPointList[$i][0]; 
    238238            $y = $arrPointList[$i][1]; 
    239             if(isset($arrPointList[$i + 1])) { 
     239            if (isset($arrPointList[$i + 1])) { 
    240240                $next_x = $arrPointList[$i + 1][0]; 
    241241                $next_y = $arrPointList[$i + 1][1]; 
     
    249249        $arrPointList = $this->arrPointList[$line_no]; 
    250250        $count = count($arrPointList); 
    251         for($i = 0; $i < $count; $i++) { 
     251        for ($i = 0; $i < $count; $i++) { 
    252252            $x = $arrPointList[$i][0]; 
    253253            $y = $arrPointList[$i][1]; 
     
    261261        $arrPointList = $this->arrPointList[$line_no]; 
    262262        $count = count($arrPointList); 
    263         for($i = 0; $i < $count; $i++) { 
     263        for ($i = 0; $i < $count; $i++) { 
    264264            $x = $arrPointList[$i][0]; 
    265265            $y = $arrPointList[$i][1]; 
     
    281281        $scale_width = $this->area_width / ($count + 1); 
    282282        $this->arrPointList[$this->line_max] = array(); 
    283         for($i = 0; $i < $count; $i++) { 
     283        for ($i = 0; $i < $count; $i++) { 
    284284            // X座標を求める 
    285285            $x = intval($this->left + ($scale_width * ($i + 1))); 
Note: See TracChangeset for help on using the changeset viewer.