summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsystem/core/Input.php2
-rw-r--r--tests/codeigniter/core/Input_test.php6
2 files changed, 5 insertions, 3 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 6a5a9d8f0..ac67aaf4f 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -383,7 +383,7 @@ class CI_Input {
*/
public function valid_ip($ip)
{
- if($this->ip_version($ip) === '4')
+ if ($this->ip_version($ip) === '4')
{
return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
}
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php
index 27e152d6a..2aa3a6246 100644
--- a/tests/codeigniter/core/Input_test.php
+++ b/tests/codeigniter/core/Input_test.php
@@ -152,7 +152,8 @@ class Input_test extends CI_TestCase {
$this->assertTrue($this->input->valid_ip($ip_v4));
$ip_v6 = array('2001:0db8:0000:85a3:0000:0000:ac1f:8001', '2001:db8:0:85a3:0:0:ac1f:8001', '2001:db8:0:85a3::ac1f:8001');
- foreach($ip_v6 as $ip) {
+ foreach($ip_v6 as $ip)
+ {
$this->assertTrue($this->input->valid_ip($ip));
}
}
@@ -165,7 +166,8 @@ class Input_test extends CI_TestCase {
$this->assertEquals('4', $this->input->ip_version($ip_v4));
$ip_v6 = array('2001:0db8:0000:85a3:0000:0000:ac1f:8001', '2001:db8:0:85a3:0:0:ac1f:8001', '2001:db8:0:85a3::ac1f:8001');
- foreach($ip_v6 as $ip) {
+ foreach($ip_v6 as $ip)
+ {
$this->assertEquals('6', $this->input->ip_version($ip));
}
}