From 387d8e4735699919c933a8326309e7d6d4140626 Mon Sep 17 00:00:00 2001 From: CodeLingoBot Date: Fri, 5 Apr 2019 20:23:14 +1300 Subject: [PATCH] Change PHP keywords to comply with PSR2 Signed-off-by: CodeLingoBot --- lib/MY_Model.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/MY_Model.php b/lib/MY_Model.php index 9f16742..aa97c91 100644 --- a/lib/MY_Model.php +++ b/lib/MY_Model.php @@ -42,14 +42,14 @@ class MY_Model extends CI_Model { * * @var bool */ - protected $validate_field_existence = FALSE; + protected $validate_field_existence = false; /** * Used if there is no primary key for the table * * @var bool */ - protected $no_primary_key = FALSE; + protected $no_primary_key = false; function __construct() { @@ -76,7 +76,7 @@ function add($options = array()) { if ( ! $this->_required($this->required_fields, $options)) { - return FALSE; + return false; } $this->_set_editable_fields($this->primary_table); @@ -102,13 +102,13 @@ function add($options = array()) if ($query) { - if ($this->no_primary_key == FALSE) + if ($this->no_primary_key == false) { return $this->db->insert_id(); } else { - return TRUE; + return true; } } } @@ -198,7 +198,7 @@ function update($options = array()) $required = array($this->primary_key); if ( ! $this->_required($required, $options)) { - return FALSE; + return false; } $this->_set_editable_fields($this->primary_table); @@ -240,7 +240,7 @@ function delete($options = array()) $required = array($this->primary_key); if ( ! $this->_required($required, $options)) { - return FALSE; + return false; } $this->db->where($this->primary_key, $options[$this->primary_key]); @@ -257,7 +257,7 @@ function delete($options = array()) */ function _validate_options_exist($options) { - if ($this->validate_field_existence == TRUE) + if ($this->validate_field_existence == true) { foreach ($options as $key => $value) { @@ -301,10 +301,10 @@ function _required($required, $data) { if ( ! isset($data[$field])) { - return FALSE; + return false; } } - return TRUE; + return true; } /**