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

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

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

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/test/createEcCubeData-v25.php

    r21480 r21481  
    4343 
    4444/** 規格1の生成数 */ 
    45 define("CLASSCATEGORY1_VOLUME", 10); 
     45define('CLASSCATEGORY1_VOLUME', 10); 
    4646 
    4747/** 規格2の生成数 */ 
    48 define("CLASSCATEGORY2_VOLUME", 10); 
     48define('CLASSCATEGORY2_VOLUME', 10); 
    4949 
    5050/** 商品の生成数 */ 
     
    145145        $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    146146        $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    147         $sqlval['del_flg'] = (string) "0"; 
     147        $sqlval['del_flg'] = (string) '0'; 
    148148 
    149149        // 大カテゴリを生成 
    150150        for ($i = 0; $i < TOP_CATEGORIES_VOLUME; $i++) { 
    151151            $sqlval['category_name'] = sprintf("Category%d00", $i); 
    152             $sqlval['parent_category_id'] = (string) "0"; 
     152            $sqlval['parent_category_id'] = (string) '0'; 
    153153            $sqlval['level'] = 1; 
    154154            $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 
    155             $sqlval['category_id'] = $this->objQuery->nextVal("dtb_category_category_id"); 
    156  
    157             $this->objQuery->insert("dtb_category", $sqlval); 
     155            $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 
     156 
     157            $this->objQuery->insert('dtb_category', $sqlval); 
    158158            $this->arrCategory1[] = $sqlval['category_id']; 
    159159            $count++; 
     
    167167                $sqlval['level'] = 2; 
    168168                $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 
    169                 $sqlval['category_id'] = $this->objQuery->nextVal("dtb_category_category_id"); 
    170  
    171                 $this->objQuery->insert("dtb_category", $sqlval); 
     169                $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 
     170 
     171                $this->objQuery->insert('dtb_category', $sqlval); 
    172172                $this->arrCategory2[] = $sqlval['category_id']; 
    173173                $count++; 
     
    182182                    $sqlval['level'] = 3; 
    183183                    $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 
    184                     $sqlval['category_id'] = $this->objQuery->nextVal("dtb_category_category_id"); 
    185  
    186                     $this->objQuery->insert("dtb_category", $sqlval); 
     184                    $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 
     185 
     186                    $this->objQuery->insert('dtb_category', $sqlval); 
    187187                    $this->arrCategory3[] = $sqlval['category_id']; 
    188188                    $count++; 
     
    207207        } 
    208208 
    209         $this->createClass("Size"); 
    210         $this->createClass("Color"); 
     209        $this->createClass('Size'); 
     210        $this->createClass('Color'); 
    211211        print("\n"); 
    212212 
     
    221221        for ($i = 0; $i < CLASSCATEGORY1_VOLUME; $i++) { 
    222222            $this->createClassCategory($this->arrSize[$i], 
    223                                        $this->arrclass_id[0], "size"); 
     223                                       $this->arrclass_id[0], 'size'); 
    224224        } 
    225225 
     
    227227        for ($i = 0; $i < CLASSCATEGORY2_VOLUME; $i++) { 
    228228            $this->createClassCategory($this->arrColor[$i], 
    229                                        $this->arrclass_id[1], "color"); 
     229                                       $this->arrclass_id[1], 'color'); 
    230230        } 
    231231 
     
    267267 
    268268        for ($i = 0; $i < PRODUCTS_VOLUME; $i++) { 
    269             $sqlval['product_id'] = $this->objQuery->nextval("dtb_products_product_id"); 
     269            $sqlval['product_id'] = $this->objQuery->nextval('dtb_products_product_id'); 
    270270            $sqlval['name'] = sprintf("商品%d", $i); 
    271271            $sqlval['status'] = 1; 
     
    277277            $sqlval['main_large_image'] = "08311203_44f651959bcb5.jpg"; 
    278278            $sqlval['sub_comment1'] = "コメント"; 
    279             $sqlval['del_flg'] = (string) "0"; 
     279            $sqlval['del_flg'] = (string) '0'; 
    280280            $sqlval['creator_id'] = 2; 
    281281            $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    282282            $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    283283            $sqlval['deliv_date_id'] = 2; 
    284             $this->objQuery->insert("dtb_products", $sqlval); 
     284            $this->objQuery->insert('dtb_products', $sqlval); 
    285285 
    286286            $this->arrProduct_id[] = $sqlval['product_id']; 
     
    298298    function createClass($class_name) { 
    299299        // class_idを取得 
    300         $sqlval['class_id'] = $this->objQuery->nextVal("dtb_class_class_id"); 
     300        $sqlval['class_id'] = $this->objQuery->nextVal('dtb_class_class_id'); 
    301301        $sqlval['name'] = $class_name; 
    302302        $arrRaw['rank'] = "(SELECT x.rank FROM (SELECT CASE 
     
    309309        $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    310310        $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    311         $sqlval['del_flg'] = (string) "0"; 
    312         $this->objQuery->insert("dtb_class", $sqlval, $arrRaw); 
     311        $sqlval['del_flg'] = (string) '0'; 
     312        $this->objQuery->insert('dtb_class', $sqlval, $arrRaw); 
    313313 
    314314        $this->arrclass_id[] = $sqlval['class_id']; 
     
    323323     */ 
    324324    function createClassCategory($classcategory_name, $class_id, $class_name) { 
    325         $sqlval['classcategory_id'] = $this->objQuery->nextVal("dtb_classcategory_classcategory_id"); 
     325        $sqlval['classcategory_id'] = $this->objQuery->nextVal('dtb_classcategory_classcategory_id'); 
    326326        $sqlval['name'] = $classcategory_name; 
    327327        $sqlval['class_id'] = $class_id; 
     
    336336        $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    337337        $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    338         $sqlval['del_flg'] = (string) "0"; 
    339  
    340         $this->objQuery->insert("dtb_classcategory", $sqlval, $arrRaw); 
     338        $sqlval['del_flg'] = (string) '0'; 
     339 
     340        $this->objQuery->insert('dtb_classcategory', $sqlval, $arrRaw); 
    341341 
    342342        switch ($class_name) { 
    343         case "size": 
     343        case 'size': 
    344344            $this->arrClassCategory_id1[] = $sqlval['classcategory_id']; 
    345345            break; 
    346346 
    347         case "color": 
     347        case 'color': 
    348348            $this->arrClassCategory_id2[] = $sqlval['classcategory_id']; 
    349349            break; 
     
    380380                $c1['class_combination_id'] = $this->objQuery->nextVal('dtb_class_combination_class_combination_id'); 
    381381                $c1['level'] = 1; 
    382                 $this->objQuery->insert("dtb_class_combination", $c1); 
     382                $this->objQuery->insert('dtb_class_combination', $c1); 
    383383 
    384384                $c2['classcategory_id'] = $classCategory_id2; 
     
    386386                $c2['parent_class_combination_id'] = $c1['class_combination_id']; 
    387387                $c2['level'] = 2; 
    388                 $this->objQuery->insert("dtb_class_combination", $c2); 
     388                $this->objQuery->insert('dtb_class_combination', $c2); 
    389389 
    390390                $sqlval['product_class_id'] = 
     
    393393 
    394394                $sqlval['class_combination_id'] = $c2['class_combination_id']; 
    395                 $this->objQuery->insert("dtb_products_class", $sqlval); 
     395                $this->objQuery->insert('dtb_products_class', $sqlval); 
    396396 
    397397                $count++; 
     
    404404        $sqlval['class_combination_id'] = null; 
    405405        $sqlval['del_flg'] = 1; 
    406         $this->objQuery->insert("dtb_products_class", $sqlval); 
     406        $this->objQuery->insert('dtb_products_class', $sqlval); 
    407407 
    408408        print("\n"); 
     
    444444                $sqlval['rank'] = $count; 
    445445 
    446                 $this->objQuery->insert("dtb_product_categories", $sqlval); 
     446                $this->objQuery->insert('dtb_product_categories', $sqlval); 
    447447                $count++; 
    448448                print("$"); 
     
    460460                         ,"m8 1/2(26.5cm)" 
    461461                         ,"m8(26cm)" 
    462                          ,"43" 
    463                          ,"42" 
    464                          ,"41" 
     462                         ,'43' 
     463                         ,'42' 
     464                         ,'41' 
    465465                         ,"43(27.0cm?27.5cm)" 
    466466                         ,"42(26.5cm?27.0cm)" 
     
    468468                         ,"42(約27.5cm)" 
    469469                         ,"41(約26.5cm)" 
    470                          ,"W36" 
    471                          ,"W34" 
    472                          ,"W32" 
    473                          ,"43" 
    474                          ,"42" 
    475                          ,"41" 
    476                          ,"m11" 
    477                          ,"m10" 
     470                         ,'W36' 
     471                         ,'W34' 
     472                         ,'W32' 
     473                         ,'43' 
     474                         ,'42' 
     475                         ,'41' 
     476                         ,'m11' 
     477                         ,'m10' 
    478478                         ,"m9.5" 
    479                          ,"m9" 
    480                          ,"m8" 
     479                         ,'m9' 
     480                         ,'m8' 
    481481                         ,'FREE' 
    482482                         ,'XS' 
     
    487487                         ,"25-27" 
    488488                         ,"27-29" 
    489                          ,"W28" 
    490                          ,"W29" 
    491                          ,"W30" 
    492                          ,"W31" 
    493                          ,"W32" 
    494                          ,"W33" 
    495                          ,"W34" 
    496                          ,"W35" 
    497                          ,"W36" 
    498                          ,"4" 
    499                          ,"6" 
    500                          ,"8" 
    501                          ,"10" 
    502                          ,"12" 
    503                          ,"10cm" 
    504                          ,"12cm" 
    505                          ,"14cm" 
    506                          ,"16cm" 
    507                          ,"18cm" 
    508                          ,"20cm" 
    509                          ,"22cm" 
    510                          ,"24cm" 
    511                          ,"26cm" 
    512                          ,"28cm" 
    513                          ,"30cm" 
    514                          ,"32cm" 
    515                          ,"34cm" 
    516                          ,"36cm" 
    517                          ,"38cm" 
    518                          ,"40cm" 
    519                          ,"10g" 
    520                          ,"20g" 
    521                          ,"30g" 
    522                          ,"40g" 
    523                          ,"50g" 
    524                          ,"60g" 
    525                          ,"70g" 
    526                          ,"80g" 
    527                          ,"90g" 
    528                          ,"100g" 
    529                          ,"110g" 
    530                          ,"120g" 
    531                          ,"130g" 
    532                          ,"140g" 
    533                          ,"150g" 
    534                          ,"160g" 
    535                          ,"170g" 
    536                          ,"180g" 
    537                          ,"190g" 
    538                          ,"200g" 
    539                          ,"8inch" 
    540                          ,"10inch" 
    541                          ,"12inch" 
    542                          ,"14inch" 
    543                          ,"16inch" 
    544                          ,"18inch" 
    545                          ,"20inch" 
    546                          ,"22inch" 
    547                          ,"24inch" 
    548                          ,"26inch" 
    549                          ,"28inch" 
    550                          ,"30inch" 
    551                          ,"32inch" 
    552                          ,"34inch" 
    553                          ,"36inch" 
    554                          ,"38inch" 
     489                         ,'W28' 
     490                         ,'W29' 
     491                         ,'W30' 
     492                         ,'W31' 
     493                         ,'W32' 
     494                         ,'W33' 
     495                         ,'W34' 
     496                         ,'W35' 
     497                         ,'W36' 
     498                         ,'4' 
     499                         ,'6' 
     500                         ,'8' 
     501                         ,'10' 
     502                         ,'12' 
     503                         ,'10cm' 
     504                         ,'12cm' 
     505                         ,'14cm' 
     506                         ,'16cm' 
     507                         ,'18cm' 
     508                         ,'20cm' 
     509                         ,'22cm' 
     510                         ,'24cm' 
     511                         ,'26cm' 
     512                         ,'28cm' 
     513                         ,'30cm' 
     514                         ,'32cm' 
     515                         ,'34cm' 
     516                         ,'36cm' 
     517                         ,'38cm' 
     518                         ,'40cm' 
     519                         ,'10g' 
     520                         ,'20g' 
     521                         ,'30g' 
     522                         ,'40g' 
     523                         ,'50g' 
     524                         ,'60g' 
     525                         ,'70g' 
     526                         ,'80g' 
     527                         ,'90g' 
     528                         ,'100g' 
     529                         ,'110g' 
     530                         ,'120g' 
     531                         ,'130g' 
     532                         ,'140g' 
     533                         ,'150g' 
     534                         ,'160g' 
     535                         ,'170g' 
     536                         ,'180g' 
     537                         ,'190g' 
     538                         ,'200g' 
     539                         ,'8inch' 
     540                         ,'10inch' 
     541                         ,'12inch' 
     542                         ,'14inch' 
     543                         ,'16inch' 
     544                         ,'18inch' 
     545                         ,'20inch' 
     546                         ,'22inch' 
     547                         ,'24inch' 
     548                         ,'26inch' 
     549                         ,'28inch' 
     550                         ,'30inch' 
     551                         ,'32inch' 
     552                         ,'34inch' 
     553                         ,'36inch' 
     554                         ,'38inch' 
    555555                    ); 
    556556 
    557557    /** 規格2 */ 
    558     var $arrColor = array("white" 
    559                          ,"whitesmoke" 
    560                          ,"snow" 
    561                          ,"ghostwhite" 
    562                          ,"mintcream" 
    563                          ,"azure" 
    564                          ,"ivory" 
    565                          ,"floralwhite" 
    566                          ,"aliceblue" 
    567                          ,"lavenderblush" 
    568                          ,"seashell" 
    569                          ,"honeydew" 
    570                          ,"lightyellow" 
    571                          ,"oldlace" 
    572                          ,"cornsilk" 
    573                          ,"linen" 
    574                          ,"lemonchiffon" 
    575                          ,"lavender" 
    576                          ,"beige" 
    577                          ,"lightgoldenrodyellow" 
    578                          ,"mistyrose" 
    579                          ,"papayawhip" 
    580                          ,"antiquewhite" 
    581                          ,"lightcyan" 
    582                          ,"cyan" 
    583                          ,"aqua" 
    584                          ,"darkcyan" 
    585                          ,"teal" 
    586                          ,"darkslategray" 
    587                          ,"turquoise" 
    588                          ,"paleturquoise" 
    589                          ,"mediumturquoise" 
    590                          ,"aquamarine" 
    591                          ,"gainsboro" 
    592                          ,"lightgray" 
    593                          ,"silver" 
    594                          ,"darkgray" 
    595                          ,"gray" 
    596                          ,"dimgray" 
    597                          ,"black" 
    598                          ,"powderblue" 
    599                          ,"lightblue" 
    600                          ,"lightskyblue" 
    601                          ,"skyblue" 
    602                          ,"darkturquoise" 
    603                          ,"deepskyblue" 
    604                          ,"dodgerblue" 
    605                          ,"royalblue" 
    606                          ,"cornflowerblue" 
    607                          ,"cadetblue" 
    608                          ,"lightsteelblue" 
    609                          ,"steelblue" 
    610                          ,"lightslategray" 
    611                          ,"slategray" 
    612                          ,"blue" 
    613                          ,"mediumblue" 
    614                          ,"darkblue" 
    615                          ,"navy" 
    616                          ,"midnightblue" 
    617                          ,"lightsalmon" 
    618                          ,"darksalmon" 
    619                          ,"salmon" 
    620                          ,"tomato" 
    621                          ,"lightcoral" 
    622                          ,"coral" 
    623                          ,"crimson" 
    624                          ,"red" 
    625                          ,"mediumorchid" 
    626                          ,"mediumpurple" 
    627                          ,"mediumslateblue" 
    628                          ,"slateblue" 
    629                          ,"blueviolet" 
    630                          ,"darkviolet" 
    631                          ,"darkorchid" 
    632                          ,"darkslateblue" 
    633                          ,"darkorchid" 
    634                          ,"thistle" 
    635                          ,"plum" 
    636                          ,"violet" 
    637                          ,"magenta" 
    638                          ,"fuchsia" 
    639                          ,"darkmagenta" 
    640                          ,"purple" 
    641                          ,"palegreen" 
    642                          ,"lightgreen" 
    643                          ,"lime" 
    644                          ,"limegreen" 
    645                          ,"forestgreen" 
    646                          ,"green" 
    647                          ,"darkgreen" 
    648                          ,"greenyellow" 
    649                          ,"chartreuse" 
    650                          ,"lawngreen" 
    651                          ,"yellowgreen" 
    652                          ,"olivedrab" 
    653                          ,"darkolivegreen" 
    654                          ,"mediumaquamarine" 
    655                          ,"mediumspringgreen" 
    656                          ,"springgreen" 
    657                          ,"darkseagreen" 
     558    var $arrColor = array('white' 
     559                         ,'whitesmoke' 
     560                         ,'snow' 
     561                         ,'ghostwhite' 
     562                         ,'mintcream' 
     563                         ,'azure' 
     564                         ,'ivory' 
     565                         ,'floralwhite' 
     566                         ,'aliceblue' 
     567                         ,'lavenderblush' 
     568                         ,'seashell' 
     569                         ,'honeydew' 
     570                         ,'lightyellow' 
     571                         ,'oldlace' 
     572                         ,'cornsilk' 
     573                         ,'linen' 
     574                         ,'lemonchiffon' 
     575                         ,'lavender' 
     576                         ,'beige' 
     577                         ,'lightgoldenrodyellow' 
     578                         ,'mistyrose' 
     579                         ,'papayawhip' 
     580                         ,'antiquewhite' 
     581                         ,'lightcyan' 
     582                         ,'cyan' 
     583                         ,'aqua' 
     584                         ,'darkcyan' 
     585                         ,'teal' 
     586                         ,'darkslategray' 
     587                         ,'turquoise' 
     588                         ,'paleturquoise' 
     589                         ,'mediumturquoise' 
     590                         ,'aquamarine' 
     591                         ,'gainsboro' 
     592                         ,'lightgray' 
     593                         ,'silver' 
     594                         ,'darkgray' 
     595                         ,'gray' 
     596                         ,'dimgray' 
     597                         ,'black' 
     598                         ,'powderblue' 
     599                         ,'lightblue' 
     600                         ,'lightskyblue' 
     601                         ,'skyblue' 
     602                         ,'darkturquoise' 
     603                         ,'deepskyblue' 
     604                         ,'dodgerblue' 
     605                         ,'royalblue' 
     606                         ,'cornflowerblue' 
     607                         ,'cadetblue' 
     608                         ,'lightsteelblue' 
     609                         ,'steelblue' 
     610                         ,'lightslategray' 
     611                         ,'slategray' 
     612                         ,'blue' 
     613                         ,'mediumblue' 
     614                         ,'darkblue' 
     615                         ,'navy' 
     616                         ,'midnightblue' 
     617                         ,'lightsalmon' 
     618                         ,'darksalmon' 
     619                         ,'salmon' 
     620                         ,'tomato' 
     621                         ,'lightcoral' 
     622                         ,'coral' 
     623                         ,'crimson' 
     624                         ,'red' 
     625                         ,'mediumorchid' 
     626                         ,'mediumpurple' 
     627                         ,'mediumslateblue' 
     628                         ,'slateblue' 
     629                         ,'blueviolet' 
     630                         ,'darkviolet' 
     631                         ,'darkorchid' 
     632                         ,'darkslateblue' 
     633                         ,'darkorchid' 
     634                         ,'thistle' 
     635                         ,'plum' 
     636                         ,'violet' 
     637                         ,'magenta' 
     638                         ,'fuchsia' 
     639                         ,'darkmagenta' 
     640                         ,'purple' 
     641                         ,'palegreen' 
     642                         ,'lightgreen' 
     643                         ,'lime' 
     644                         ,'limegreen' 
     645                         ,'forestgreen' 
     646                         ,'green' 
     647                         ,'darkgreen' 
     648                         ,'greenyellow' 
     649                         ,'chartreuse' 
     650                         ,'lawngreen' 
     651                         ,'yellowgreen' 
     652                         ,'olivedrab' 
     653                         ,'darkolivegreen' 
     654                         ,'mediumaquamarine' 
     655                         ,'mediumspringgreen' 
     656                         ,'springgreen' 
     657                         ,'darkseagreen' 
    658658                     ); 
    659659 
Note: See TracChangeset for help on using the changeset viewer.