Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change PHP keywords to comply with PSR2 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/MY_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand All @@ -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;
}
}
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
Expand All @@ -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)
{
Expand Down Expand Up @@ -301,10 +301,10 @@ function _required($required, $data)
{
if ( ! isset($data[$field]))
{
return FALSE;
return false;
}
}
return TRUE;
return true;
}

/**
Expand Down