Index: branches/version-2_12-dev/data/class/SC_Date.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Date.php	(revision 21867)
+++ branches/version-2_12-dev/data/class/SC_Date.php	(revision 21925)
@@ -146,5 +146,5 @@
     function getHour() {
 
-        $day_array = array();
+        $hour_array = array();
         for ($i=0; $i<=23; $i++) {
             $hour_array[$i] = $i;
Index: branches/version-2_12-dev/data/class/SC_FormParam.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_FormParam.php	(revision 21921)
+++ branches/version-2_12-dev/data/class/SC_FormParam.php	(revision 21925)
@@ -336,5 +336,5 @@
     function getHashArray($arrKey = array()) {
         $arrRet = array();
-        foreach ($this->keyname as $index => $keyname) {
+        foreach ($this->keyname as $keyname) {
             if (empty($arrKey) || in_array($keyname, $arrKey)) {
                 $arrRet[$keyname] = $this->getValue($keyname);
@@ -346,10 +346,11 @@
     // DB格納用配列の作成
     function getDbArray() {
+        $dbArray = array();
         foreach ($this->keyname as $index => $key) {
             if ($this->input_db[$index]) {
-                $arrRet[$key] = $this->getValue($key);
-            }
-        }
-        return $arrRet;
+                $dbArray[$key] = $this->getValue($key);
+            }
+        }
+        return $dbArray;
     }
 
@@ -378,15 +379,16 @@
     // フォームに渡す用のパラメーターを返す
     function getFormParamList() {
+        $formParamList = array();
         foreach ($this->keyname as $index => $key) {
             // キー名
-            $arrRet[$key]['keyname'] = $key;
+            $formParamList[$key]['keyname'] = $key;
             // 表示名
-            $arrRet[$key]['disp_name'] = $this->disp_name[$index];
+            $formParamList[$key]['disp_name'] = $this->disp_name[$index];
             // 文字数制限
-            $arrRet[$key]['length'] = $this->length[$index];
+            $formParamList[$key]['length'] = $this->length[$index];
             // 入力値
-            $arrRet[$key]['value'] = $this->getValue($key);
-        }
-        return $arrRet;
+            $formParamList[$key]['value'] = $this->getValue($key);
+        }
+        return $formParamList;
     }
 
@@ -403,5 +405,5 @@
     function getValue($keyname, $default = '') {
         $ret = null;
-        foreach ($this->keyname as $index => $key) {
+        foreach ($this->keyname as $key) {
             if ($key == $keyname) {
                 $ret = isset($this->arrValue[$key]) ? $this->arrValue[$key] : $this->arrDefault[$key];
@@ -482,5 +484,5 @@
     function getSearchArray($prefix = 'search_') {
         $arrResults = array();
-        foreach ($this->keyname as $index => $key) {
+        foreach ($this->keyname as $key) {
             if (preg_match('/^' . $prefix . '/', $key)) {
                 $arrResults[$key] = $this->getValue($key);
@@ -497,15 +499,16 @@
      */
     function getFormDispArray() {
+        $formDispArray = array();
         foreach ($this->keyname as $index => $key) {
             // キー名
-            $arrRet[$index]['keyname'] = $key;
+            $formDispArray[$index]['keyname'] = $key;
             // 表示名
-            $arrRet[$index]['disp_name']  = $this->disp_name[$index];
+            $formDispArray[$index]['disp_name']  = $this->disp_name[$index];
             // 文字数制限
-            $arrRet[$index]['length'] = $this->length[$index];
+            $formDispArray[$index]['length'] = $this->length[$index];
             // 入力値
-            $arrRet[$index]['value'] = $this->getValue($key);
-        }
-        return $arrRet;
+            $formDispArray[$index]['value'] = $this->getValue($key);
+        }
+        return $formDispArray;
     }
 
@@ -521,5 +524,5 @@
             // $this->paramに歯抜けが存在する場合は、NULLで埋めておく。
             // 最後に配列を詰める際に、全ての項目が埋まっている必要がある。
-            foreach ($this->keyname as $key => $val) {
+            foreach (array_keys($this->keyname) as $key) {
                 if (!isset($this->param[$key])) {
                     $this->param[$key] = NULL;
Index: branches/version-2_12-dev/data/class/SC_CustomerList.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_CustomerList.php	(revision 21867)
+++ branches/version-2_12-dev/data/class/SC_CustomerList.php	(revision 21925)
@@ -31,6 +31,4 @@
     function __construct($array, $mode = '') {
         parent::__construct($array);
-
-        $masterData = new SC_DB_MasterData_Ex();
 
         $objDb = new SC_Helper_DB_Ex();
Index: branches/version-2_12-dev/data/class/SC_Display.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Display.php	(revision 21867)
+++ branches/version-2_12-dev/data/class/SC_Display.php	(revision 21925)
@@ -142,5 +142,4 @@
         $nu = new Net_UserAgent_Mobile();
         $su = new SC_SmartphoneUserAgent_Ex();
-        $retDevice = 0;
         if ($nu->isMobile()) {
             return DEVICE_TYPE_MOBILE;
Index: branches/version-2_12-dev/data/class/SC_CheckError.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_CheckError.php	(revision 21920)
+++ branches/version-2_12-dev/data/class/SC_CheckError.php	(revision 21925)
@@ -59,5 +59,5 @@
         $this->createParam($value);
         // HTMLに含まれているタグを抽出する
-        preg_match_all('/<\/?([a-z]+)/i', $this->arrParam[$value[1]], $arrTagIncludedHtml);
+        preg_match_all('/<\/?([a-z]+)/i', $this->arrParam[$value[1]], $arrTagIncludedHtml = array());
 
         $arrDiffTag = array_diff($arrTagIncludedHtml[1], $value[2]);
@@ -630,19 +630,18 @@
         $quoted_string = "\"$qcontent*\"";
         $atext         = '[a-zA-Z0-9!#$%&\'*+\-\/\=?^_`{|}~]';
-        $dot_atom_text = "$atext+(?:[.]$atext+)*";
-        $dot_atom      = $dot_atom_text;
+        $dot_atom      = "$atext+(?:[.]$atext+)*";
         $local_part    = "(?:$dot_atom|$quoted_string)";
         $domain        = $dot_atom;
-        $addr_spec     = "${local_part}[@]$domain";
+        $addr_spec     = "{$local_part}[@]$domain";
 
         $dot_atom_loose   = "$atext+(?:[.]|$atext)*";
         $local_part_loose = "(?:$dot_atom_loose|$quoted_string)";
-        $addr_spec_loose  = "${local_part_loose}[@]$domain";
+        $addr_spec_loose  = "{$local_part_loose}[@]$domain";
 
         if (RFC_COMPLIANT_EMAIL_CHECK) {
-            $regexp = "/\A${addr_spec}\z/";
+            $regexp = "/\A{$addr_spec}\z/";
         } else {
             // 携帯メールアドレス用に、..や.@を許容する。
-            $regexp = "/\A${addr_spec_loose}\z/";
+            $regexp = "/\A{$addr_spec_loose}\z/";
         }
 
@@ -932,5 +931,4 @@
         }
         $this->createParam($value);
-        $error = 0;
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = '※ ' . $value[0] . 'を正しく指定してください。<br />';
@@ -983,5 +981,4 @@
         }
         $this->createParam($value);
-        $error = 0;
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = '※ ' . $value[0] . 'を正しく指定してください。<br />';
@@ -1027,5 +1024,4 @@
         }
         $this->createParam($value);
-        $error = 0;
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0) && ! checkdate($this->arrParam[$value[3]], 1, $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = '※ ' . $value[0] . 'を正しく指定してください。<br />';
@@ -1123,5 +1119,5 @@
 
         $pattern = '/' . join('|', $prohibitedStr) . '/i';
-        if (preg_match_all($pattern, $this->arrParam[$value[1]], $matches)) {
+        if (preg_match_all($pattern, $targetStr, $matches = array())) {
             $this->arrErr[$value[1]] = '※ ' . $value[0] . 'は入力できません。<br />';
         }
Index: branches/version-2_12-dev/data/class/SC_CartSession.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 21920)
+++ branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 21925)
@@ -51,5 +51,5 @@
         }
         // 1世代古いコピー情報は、削除しておく
-        foreach ($_SESSION as $k => $val) {
+        foreach (array_keys($_SESSION) as $k) {
             if ($k != $this->key_tmp && preg_match('/^savecart_/', $k)) {
                 unset($this->cartSession[$productTypeId][$k]);
@@ -87,5 +87,5 @@
             // 一時カートのクリア
             unset($_SESSION[$this->key_tmp]);
-            $this->cartSession[$productTypeId][$key]['cancel_purchase'] = true;
+            $this->cartSession[$productTypeId]['cancel_purchase'] = true;
         } else {
             $this->cartSession[$productTypeId]['cancel_purchase'] = false;
@@ -96,8 +96,9 @@
     // 次に割り当てるカートのIDを取得する
     function getNextCartID($productTypeId) {
-        foreach ($this->cartSession[$productTypeId] as $key => $val) {
-            $arrRet[] = $this->cartSession[$productTypeId][$key]['cart_no'];
-        }
-        return max($arrRet) + 1;
+        $count = array();
+        foreach (array_keys($this->cartSession[$productTypeId]) as $key) {
+            $count[] = $this->cartSession[$productTypeId][$key]['cart_no'];
+        }
+        return max($count) + 1;
     }
 
@@ -143,5 +144,5 @@
         $max = 0;
         if (count($this->cartSession[$productTypeId]) > 0) {
-            foreach ($this->cartSession[$productTypeId] as $key => $val) {
+            foreach (array_keys($this->cartSession[$productTypeId]) as $key) {
                 if (is_numeric($key)) {
                     if ($max < $key) {
@@ -393,10 +394,11 @@
     function getAllProductID($productTypeId) {
         $max = $this->getMax($productTypeId);
+        $productIDs = array();
         for ($i = 0; $i <= $max; $i++) {
             if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') {
-                $arrRet[] = $this->cartSession[$productTypeId][$i]['id'][0];
-            }
-        }
-        return $arrRet;
+                $productIDs[] = $this->cartSession[$productTypeId][$i]['id'][0];
+            }
+        }
+        return $productIDs;
     }
 
@@ -409,10 +411,11 @@
     function getAllProductClassID($productTypeId) {
         $max = $this->getMax($productTypeId);
+        $productClassIDs = array();
         for ($i = 0; $i <= $max; $i++) {
             if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') {
-                $arrRet[] = $this->cartSession[$productTypeId][$i]['id'];
-            }
-        }
-        return $arrRet;
+                $productClassIDs[] = $this->cartSession[$productTypeId][$i]['id'];
+            }
+        }
+        return $productClassIDs;
     }
 
@@ -497,5 +500,5 @@
      */
     function getProductClassId($cart_no, $productTypeId) {
-        for ($i = 0; $i <= $max; $i++) {
+        for ($i = 0; $i < count($this->cartSession[$productTypeId]); $i++) {
             if ($this->cartSession[$productTypeId][$i]['cart_no'] == $cart_no) {
                 return $this->cartSession[$productTypeId][$i]['id'];
@@ -625,4 +628,5 @@
     ) {
 
+        $results = array();
         $total_point = $this->getAllProductsPoint($productTypeId);
         $results['tax'] = $this->getAllProductsTax($productTypeId);
