summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Image_lib.php4
-rw-r--r--system/libraries/Javascript.php4
-rw-r--r--system/libraries/Unit_test.php28
3 files changed, 16 insertions, 20 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 86b77bf07..1ab8b23e0 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -251,7 +251,7 @@ class CI_Image_lib {
}
else
{
- if (strpos($this->new_image, '/') === FALSE AND strpos($this->new_image, '\\') === FALSE)
+ if (strpos($this->new_image, '/') === FALSE && strpos($this->new_image, '\\') === FALSE)
{
$full_dest_path = str_replace('\\', '/', realpath($this->new_image));
}
@@ -1462,4 +1462,4 @@ class CI_Image_lib {
}
/* End of file Image_lib.php */
-/* Location: ./system/libraries/Image_lib.php */
+/* Location: ./system/libraries/Image_lib.php */ \ No newline at end of file
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index baa044117..629a3adfe 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -105,7 +105,7 @@ class CI_Javascript {
*
* @param string The element to attach the event to
* @param string The code to execute
- * @param boolean whether or not to return false
+ * @param bool whether or not to return false
* @return string
*/
public function click($element = 'this', $js = '', $ret_false = TRUE)
@@ -644,7 +644,7 @@ class CI_Javascript {
* Outputs a <script> tag
*
* @param string The element to attach the event to
- * @param boolean If a CDATA section should be added
+ * @param bool If a CDATA section should be added
* @return string
*/
public function inline($script, $cdata = TRUE)
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index 2eb8df356..0f6e2dfdd 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* Unit Testing Class
*
@@ -60,7 +58,7 @@ class CI_Unit_test {
'notes'
);
- log_message('debug', "Unit Testing Class Initialized");
+ log_message('debug', 'Unit Testing Class Initialized');
}
// --------------------------------------------------------------------
@@ -75,7 +73,7 @@ class CI_Unit_test {
*/
public function set_test_items($items = array())
{
- if ( ! empty($items) AND is_array($items))
+ if ( ! empty($items) && is_array($items))
{
$this->_test_items_visible = $items;
}
@@ -102,8 +100,8 @@ class CI_Unit_test {
if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null'), TRUE))
{
- $expected = str_replace('is_float', 'is_double', $expected);
- $result = ($expected($test)) ? TRUE : FALSE;
+ $expected = str_replace('is_double', 'is_float', $expected);
+ $result = $expected($test);
$extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected));
}
else
@@ -186,7 +184,7 @@ class CI_Unit_test {
* Causes the evaluation to use === rather than ==
*
* @param bool
- * @return null
+ * @return void
*/
public function use_strict($state = TRUE)
{
@@ -201,7 +199,7 @@ class CI_Unit_test {
* Enables/disables unit testing
*
* @param bool
- * @return null
+ * @return void
*/
public function active($state = TRUE)
{
@@ -311,10 +309,10 @@ class CI_Unit_test {
*/
protected function _default_template()
{
- $this->_template = "\n".'<table style="width:100%; font-size:small; margin:10px 0; border-collapse:collapse; border:1px solid #CCC;">{rows}'."\n".'</table>';
+ $this->_template = "\n".'<table style="width:100%; font-size:small; margin:10px 0; border-collapse:collapse; border:1px solid #CCC;">{rows}'."\n</table>";
$this->_template_rows = "\n\t<tr>\n\t\t".'<th style="text-align: left; border-bottom:1px solid #CCC;">{item}</th>'
- . "\n\t\t".'<td style="border-bottom:1px solid #CCC;">{result}</td>'."\n\t</tr>";
+ ."\n\t\t".'<td style="border-bottom:1px solid #CCC;">{result}</td>'."\n\t</tr>";
}
// --------------------------------------------------------------------
@@ -333,7 +331,7 @@ class CI_Unit_test {
return;
}
- if (is_null($this->_template) OR ! preg_match("/\{rows\}(.*?)\{\/rows\}/si", $this->_template, $match))
+ if (is_null($this->_template) OR ! preg_match('/\{rows\}(.*?)\{\/rows\}/si', $this->_template, $match))
{
$this->_default_template();
return;
@@ -344,7 +342,6 @@ class CI_Unit_test {
}
}
-// END Unit_test Class
/**
* Helper functions to test boolean true/false
@@ -353,13 +350,12 @@ class CI_Unit_test {
*/
function is_true($test)
{
- return (is_bool($test) AND $test === TRUE) ? TRUE : FALSE;
+ return (is_bool($test) && $test === TRUE);
}
function is_false($test)
{
- return (is_bool($test) AND $test === FALSE) ? TRUE : FALSE;
+ return (is_bool($test) && $test === FALSE);
}
-
/* End of file Unit_test.php */
-/* Location: ./system/libraries/Unit_test.php */
+/* Location: ./system/libraries/Unit_test.php */ \ No newline at end of file