diff --git a/application/controllers/Customers.php b/application/controllers/Customers.php index 6e4f4b05b..13686d24d 100644 --- a/application/controllers/Customers.php +++ b/application/controllers/Customers.php @@ -229,7 +229,7 @@ class Customers extends Persons $failCodes[] = $i; } - $i++; + ++$i; } if(count($failCodes) > 0) diff --git a/application/controllers/Items.php b/application/controllers/Items.php index d489e2560..9e8037980 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -367,7 +367,7 @@ class Items extends Secure_Controller $items_taxes_data = array(); $tax_names = $this->input->post('tax_names'); $tax_percents = $this->input->post('tax_percents'); - for($k = 0; $k < count($tax_percents); $k++) + for($k = 0; $k < count($tax_percents); ++$k) { if(is_numeric($tax_percents[$k])) { @@ -521,7 +521,7 @@ class Items extends Secure_Controller $tax_percents = $this->input->post('tax_percents'); $tax_updated = FALSE; - for($k = 0; $k < count($tax_percents); $k++) + for($k = 0; $k < count($tax_percents); ++$k) { if(!empty($tax_names[$k]) && is_numeric($tax_percents[$k])) { @@ -713,7 +713,7 @@ class Items extends Secure_Controller $failCodes[] = $i; } - $i++; + ++$i; } if(count($failCodes) > 0) diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index bfad3240c..6a613b673 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -752,7 +752,7 @@ class Sales extends Secure_Controller // go through all the payment type input from the form, make sure the form matches the name and iterator number $payments = array(); - for($i = 0; $i < $this->input->post('number_of_payments'); $i++) + for($i = 0; $i < $this->input->post('number_of_payments'); ++$i) { $payment_amount = $this->input->post('payment_amount_' . $i); $payment_type = $this->input->post('payment_type_' . $i); diff --git a/application/core/MY_Lang.php b/application/core/MY_Lang.php index 0a44797f7..70fe82fd6 100644 --- a/application/core/MY_Lang.php +++ b/application/core/MY_Lang.php @@ -65,7 +65,7 @@ class MY_Lang extends CI_Lang foreach ($args as $arg) { $line = preg_replace('/\%'.$i.'/', $arg, $line); - $i++; + ++$i; } } } diff --git a/application/views/barcodes/Ean13.php b/application/views/barcodes/Ean13.php index e2e52d5cb..8d20e802b 100644 --- a/application/views/barcodes/Ean13.php +++ b/application/views/barcodes/Ean13.php @@ -143,7 +143,7 @@ class Ean13 extends BarcodeBase // Weight for a digit in the checksum is 3, 1, 3.. starting from the last digit. // loop backwards to make the loop length-agnostic. The same basic functionality // will work for codes of different lengths. - for ($i = strlen($number) - 1; $i >= 0; $i--) + for ($i = strlen($number) - 1; $i >= 0; --$i) { $sum += (int)$number[$i] * ($weightflag?3:1); $weightflag = !$weightflag; @@ -261,7 +261,7 @@ class Ean13 extends BarcodeBase // Draw left $this->data contents $set_array = $this->_codingmapleft[$key]; - for ($idx = 1; $idx < 7; $idx ++) + for ($idx = 1; $idx < 7; ++$idx) { $value = substr($this->data, $idx, 1); @@ -318,7 +318,7 @@ class Ean13 extends BarcodeBase $xpos += $pxPerBar; // Draw right $this->data contents - for ($idx = 7; $idx < 13; $idx ++) + for ($idx = 7; $idx < 13; ++$idx) { $value = substr($this->data, $idx, 1); diff --git a/application/views/barcodes/Ean8.php b/application/views/barcodes/Ean8.php index 2f129d567..18d469f21 100644 --- a/application/views/barcodes/Ean8.php +++ b/application/views/barcodes/Ean8.php @@ -173,7 +173,7 @@ class Ean8 extends BarcodeBase foreach($weights as $num) { $sum += $num * $ean{$i}; - $i++; + ++$i; } if( (($sum + $chk) % 10) == 0 ) @@ -260,7 +260,7 @@ class Ean8 extends BarcodeBase $xpos += $pxPerBar; - for ($idx = 0; $idx < 4; $idx ++) + for ($idx = 0; $idx < 4; ++$idx) { $value = substr($this->data, $idx, 1); @@ -317,7 +317,7 @@ class Ean8 extends BarcodeBase $xpos += $pxPerBar; // Draw right $this->data contents - for ($idx = 4; $idx < 8; $idx ++) + for ($idx = 4; $idx < 8; ++$idx) { $value = substr($this->data, $idx, 1); diff --git a/application/views/barcodes/barcode_sheet.php b/application/views/barcodes/barcode_sheet.php index a3c349c93..399162570 100644 --- a/application/views/barcodes/barcode_sheet.php +++ b/application/views/barcodes/barcode_sheet.php @@ -21,7 +21,7 @@ echo '