diff --git a/application/controllers/Config.php b/application/controllers/Config.php index d8fa36fea..339b4fdc2 100644 --- a/application/controllers/Config.php +++ b/application/controllers/Config.php @@ -81,7 +81,7 @@ class Config extends Secure_Controller $license[$i]['text'] = ''; $file = file_get_contents('license/composer.LICENSES'); - $array = json_decode($file, true); + $array = json_decode($file, TRUE); foreach($array as $key => $val) { @@ -133,7 +133,7 @@ class Config extends Secure_Controller $license[$i]['text'] = ''; $file = file_get_contents('license/bower.LICENSES'); - $array = json_decode($file, true); + $array = json_decode($file, TRUE); foreach($array as $key => $val) { @@ -284,7 +284,7 @@ class Config extends Secure_Controller $number_locale = $this->input->post('number_locale'); $fmt = new \NumberFormatter($number_locale, \NumberFormatter::CURRENCY); $currency_symbol = empty($this->input->post('currency_symbol')) ? $fmt->getSymbol(\NumberFormatter::CURRENCY_SYMBOL) : $this->input->post('currency_symbol'); - if ($this->input->post('thousands_separator') == "false") + if ($this->input->post('thousands_separator') == 'false') { $fmt->setAttribute(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL, ''); } diff --git a/application/controllers/Items.php b/application/controllers/Items.php index f6098a723..1db0ee37f 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -503,7 +503,7 @@ class Items extends Secure_Controller } else { - $exists = false; + $exists = FALSE; } echo !$exists ? 'true' : 'false'; } diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 0f45ed275..620e31aaf 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -489,7 +489,7 @@ class Sales extends Secure_Controller } $data['amount_change'] = $data['amount_due'] * -1; - if($this->sale_lib->is_invoice_mode() || $data['invoice_number_enabled'] == true) + if($this->sale_lib->is_invoice_mode() || $data['invoice_number_enabled'] == TRUE) { // generate final invoice number (if using the invoice in sales by receipt mode then the invoice number can be manually entered or altered in some way if($this->sale_lib->is_sale_by_receipt_mode()) diff --git a/application/core/MY_Lang.php b/application/core/MY_Lang.php index 26e8c0907..3b98384eb 100644 --- a/application/core/MY_Lang.php +++ b/application/core/MY_Lang.php @@ -2,18 +2,17 @@ class MY_Lang extends CI_Lang { - - function __construct() + public function __construct() { parent::__construct(); } - function switch_to( $idiom ) + public function switch_to($idiom) { $CI =& get_instance(); - if( is_string( $idiom ) ) + if(is_string($idiom)) { - $CI->config->set_item( 'language', $idiom ); + $CI->config->set_item('language', $idiom); $loaded = $this->is_loaded; $this->is_loaded = array(); @@ -32,7 +31,7 @@ class MY_Lang extends CI_Lang * @access public * @return mixed false if not found or the language string */ - function line($line = '', $log_errors = true) + public function line($line = '', $log_errors = TRUE) { //get the arguments passed to the function $args = func_get_args(); @@ -41,28 +40,28 @@ class MY_Lang extends CI_Lang $c = count($args); //if one or more arguments, perform the necessary processing - if ($c) + if($c) { //first argument should be the actual language line key //so remove it from the array (pop from front) $line = array_shift($args); //check to make sure the key is valid and load the line - if ($line == '') + if($line == '') { $line = FALSE; } else { - if (isset($this->language[$line])) + if(isset($this->language[$line])) { $line = $this->language[$line]; //if the line exists and more function arguments remain //perform wildcard replacements - if ($args) + if($args) { $i = 1; - foreach ($args as $arg) + foreach($args as $arg) { $line = preg_replace('/\%'.$i.'/', $arg, $line); ++$i; @@ -80,17 +79,16 @@ class MY_Lang extends CI_Lang else { //if no arguments given, no language line available - $line = false; + $line = FALSE; } return $line; } - function line_tbd($line='') + public function line_tbd($line = '') { return $line . ' (TBD)'; } - } ?> diff --git a/application/libraries/Barcode_lib.php b/application/libraries/Barcode_lib.php index 14cec5473..153c61d8e 100644 --- a/application/libraries/Barcode_lib.php +++ b/application/libraries/Barcode_lib.php @@ -206,9 +206,9 @@ class Barcode_lib { $array = array(); - if (($handle = opendir($folder)) !== false) + if (($handle = opendir($folder)) !== FALSE) { - while (($file = readdir($handle)) !== false) + while (($file = readdir($handle)) !== FALSE) { if(substr($file, -4, 4) === '.ttf') { @@ -230,4 +230,4 @@ class Barcode_lib } } -?> \ No newline at end of file +?> diff --git a/application/libraries/Sale_lib.php b/application/libraries/Sale_lib.php index c1efa398a..6cca4573b 100644 --- a/application/libraries/Sale_lib.php +++ b/application/libraries/Sale_lib.php @@ -334,11 +334,11 @@ class Sale_lib $tax_exclusive_subtotal = 0; foreach($this->get_cart() as $item) { - $subtotal = bcadd($subtotal, $this->get_item_total($item['quantity'], $item['price'], $item['discount'], false)); - $discounted_subtotal = bcadd($discounted_subtotal, $this->get_item_total($item['quantity'], $item['price'], $item['discount'], true)); + $subtotal = bcadd($subtotal, $this->get_item_total($item['quantity'], $item['price'], $item['discount'], FALSE)); + $discounted_subtotal = bcadd($discounted_subtotal, $this->get_item_total($item['quantity'], $item['price'], $item['discount'], TRUE)); if($this->CI->config->config['tax_included']) { - $tax_exclusive_subtotal = bcadd($tax_exclusive_subtotal, $this->get_item_total_tax_exclusive($item['item_id'], $item['quantity'], $item['price'], $item['discount'], true)); + $tax_exclusive_subtotal = bcadd($tax_exclusive_subtotal, $this->get_item_total_tax_exclusive($item['item_id'], $item['quantity'], $item['price'], $item['discount'], TRUE)); } } diff --git a/application/libraries/Token_lib.php b/application/libraries/Token_lib.php index b2c0ea6f7..ef423e5d0 100644 --- a/application/libraries/Token_lib.php +++ b/application/libraries/Token_lib.php @@ -18,7 +18,7 @@ class Token_lib { // Transform legacy "$" tokens to their brace token equivalent - if(strpos($tokened_text, '$') !== false) + if(strpos($tokened_text, '$') !== FALSE) { $tokened_text = str_replace('$YCO', '{YCO}', $tokened_text); $tokened_text = str_replace('$CO', '{CO}', $tokened_text); @@ -27,7 +27,7 @@ class Token_lib } // Apply the transformation for the "%" tokens if any are used - if(strpos($tokened_text, '%') !== false) + if(strpos($tokened_text, '%') !== FALSE) { $tokened_text = strftime($tokened_text); } @@ -37,7 +37,7 @@ class Token_lib if(empty($token_tree)) { - if(strpos($tokened_text, '%') !== false) + if(strpos($tokened_text, '%') !== FALSE) { return strftime($tokened_text); } @@ -105,4 +105,4 @@ class Token_lib } } -?> \ No newline at end of file +?> diff --git a/application/models/Customer_rewards.php b/application/models/Customer_rewards.php index df2da2d04..35fbd2906 100644 --- a/application/models/Customer_rewards.php +++ b/application/models/Customer_rewards.php @@ -9,7 +9,6 @@ class Customer_rewards extends CI_Model return ($this->db->get()->num_rows() >= 1); } - public function save(&$table_data, $package_id) { $name = $$table_data['package_name']; @@ -67,7 +66,7 @@ class Customer_rewards extends CI_Model } /* - Deletes one table + Deletes one reward */ public function delete($package_id) { @@ -81,4 +80,4 @@ class Customer_rewards extends CI_Model return $this->db->trans_status(); } } -?> \ No newline at end of file +?> diff --git a/application/models/Dinner_table.php b/application/models/Dinner_table.php index 55538366c..27d224c20 100644 --- a/application/models/Dinner_table.php +++ b/application/models/Dinner_table.php @@ -9,7 +9,6 @@ class Dinner_table extends CI_Model return ($this->db->get()->num_rows() >= 1); } - public function save(&$table_data, $dinner_table_id) { $name = $$table_data['name']; diff --git a/application/models/Giftcard.php b/application/models/Giftcard.php index 5b3b101ec..8ff5d3d3a 100644 --- a/application/models/Giftcard.php +++ b/application/models/Giftcard.php @@ -2,7 +2,7 @@ class Giftcard extends CI_Model { /* - Determines if a given giftcard_id is an giftcard + Determines if a given giftcard_id is a giftcard */ public function exists($giftcard_id) { diff --git a/application/models/Rewards.php b/application/models/Rewards.php index 6574fe98b..82c7607db 100644 --- a/application/models/Rewards.php +++ b/application/models/Rewards.php @@ -22,6 +22,5 @@ class Rewards extends CI_Model return $this->db->update('sales_reward_points', $rewards_data); } - } ?> diff --git a/application/views/partial/header.php b/application/views/partial/header.php index 3269f61bb..87b676322 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -7,7 +7,7 @@ - input->cookie('debug') == "true" || $this->input->get("debug") == "true") : ?> + input->cookie('debug') == 'true' || $this->input->get('debug') == 'true') : ?> @@ -97,8 +97,8 @@