Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy8 committed Apr 9, 2019
1 parent f488b57 commit 0e1ee2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ composer require eddy/ip2region
```

## 使用方法
```
```php
//在本项目的 src/data 目录下已经生成好了一份 ip2region.db 文件,可以复制到你的项目直接使用。当然你也可以自己生成一份最新的文件。
$ip2region_db_file_location = 'ip2region.db';
$client = new eddy\Ip($ip2region_db_file_location);
Expand Down
4 changes: 2 additions & 2 deletions src/Ip.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __call($name, $arguments)
}

$ip = trim($arguments[0]);
if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {
if (filter_var($ip, FILTER_VALIDATE_IP) === false) {
throw new \InvalidArgumentException("{$arguments[0]} 无效IP地址");
}

Expand All @@ -40,4 +40,4 @@ public function __destruct()
{
unset($this->obj);
}
}
}
File renamed without changes.

0 comments on commit 0e1ee2e

Please sign in to comment.