Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 2dc4d09

Browse files
committed
Updated to 1.1.7 version
1 parent 0ae650f commit 2dc4d09

File tree

7 files changed

+45
-32
lines changed

7 files changed

+45
-32
lines changed

.gitattributes

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ phpmd.xml export-ignore
88
.travis.yml export-ignore
99
.editorconfig export-ignore
1010
.gitattributes export-ignore
11-
.gitignore export-ignore
11+
.gitignore export-ignore
12+
.php_cs.dist export-ignore
13+
CONDUCT.md export-ignore

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 1.1.7 - 2018-01-06
4+
5+
* The tests were fixed.
6+
7+
* Changes in documentation.
8+
39
## 1.1.6 - 2017-11-08
410

511
* Implemented `PHP Mess Detector` to detect inconsistencies in code styles.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22
=====================
33

4-
Copyright (c) `2017` `Josantonius, https://josantonius.com <[email protected]>`
4+
Copyright (c) `2017 - 2018` `Josantonius, https://josantonius.com <[email protected]>`
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of
77
this software and associated documentation files (the "Software"), to deal in

README-ES.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ Ejecutar todas las pruebas anteriores:
136136

137137
## ☑ Tareas pendientes
138138

139-
- [ ] Añadir nueva funcionalidad
140-
- [ ] Mejorar pruebas
141-
- [ ] Mejorar documentación
142-
- [ ] Refactorizar código
139+
- [ ] Añadir nueva funcionalidad.
140+
- [ ] Mejorar pruebas.
141+
- [ ] Mejorar documentación.
142+
- [ ] Refactorizar código para las reglas de estilo de código deshabilitadas. Ver [phpmd.xml](phpmd.xml) y [.php_cs.dist](.php_cs.dist).
143143

144144
## Contribuir
145145

@@ -156,6 +156,12 @@ Si deseas colaborar, puedes echar un vistazo a la lista de
156156
* Crea una nueva rama (**branch**), **commit**, **push** y envíame un
157157
[pull request](https://help.github.com/articles/using-pull-requests).
158158

159+
¡Gracias a quienes ya habéis contribuido a este proyecto!
160+
161+
[<img alt="Josantonius" src="https://avatars1.githubusercontent.com/u/18104336?v=4&s=117 width=117">](https://github.com/Josantonius) |[<img alt="MASNathan" src="https://avatars0.githubusercontent.com/u/2139464?v=4&s=117 width=117">](https://github.com/MASNathan) |
162+
:---:|:---:|
163+
[Josantonius](https://github.com/Josantonius)|[MASNathan](https://github.com/MASNathan)|
164+
159165
## Repositorio
160166

161167
La estructura de archivos de este repositorio se creó con [PHP-Skeleton](https://github.com/Josantonius/PHP-Skeleton).
@@ -166,7 +172,7 @@ Este proyecto está licenciado bajo **licencia MIT**. Consulta el archivo [LICEN
166172

167173
## Copyright
168174

169-
2017 Josantonius, [josantonius.com](https://josantonius.com/)
175+
2017 - 2018 Josantonius, [josantonius.com](https://josantonius.com/)
170176

171177
Si te ha resultado útil, házmelo saber :wink:
172178

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ Run all previous tests:
136136

137137
## ☑ TODO
138138

139-
- [ ] Add new feature
140-
- [ ] Improve tests
141-
- [ ] Improve documentation
142-
- [ ] Refactor code
139+
- [ ] Add new feature.
140+
- [ ] Improve tests.
141+
- [ ] Improve documentation.
142+
- [ ] Refactor code for disabled code style rules. See [phpmd.xml](phpmd.xml) and [.php_cs.dist](.php_cs.dist).
143143

144144
## Contribute
145145

@@ -156,6 +156,12 @@ If you would like to help, please take a look at the list of
156156
* Create a **branch**, **commit**, **push** and send me a
157157
[pull request](https://help.github.com/articles/using-pull-requests).
158158

159+
Thank you to all the people who already contributed to this project!
160+
161+
[<img alt="Josantonius" src="https://avatars1.githubusercontent.com/u/18104336?v=4&s=117 width=117">](https://github.com/Josantonius) |[<img alt="MASNathan" src="https://avatars0.githubusercontent.com/u/2139464?v=4&s=117 width=117">](https://github.com/MASNathan) |
162+
:---:|:---:|
163+
[Josantonius](https://github.com/Josantonius)|[MASNathan](https://github.com/MASNathan)|
164+
159165
## Repository
160166

161167
The file structure from this repository was created with [PHP-Skeleton](https://github.com/Josantonius/PHP-Skeleton).
@@ -166,7 +172,7 @@ This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file
166172

167173
## Copyright
168174

169-
2017 Josantonius, [josantonius.com](https://josantonius.com/)
175+
2017 - 2018 Josantonius, [josantonius.com](https://josantonius.com/)
170176

171177
If you find it useful, let me know :wink:
172178

src/Ip.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/**
33
* PHP class to get user IP.
44
*
5-
* @author MASNathan - https://github.com/MASNathan
5+
* @author MASNathan - <https://github.com/MASNathan>
66
* @author Josantonius - <[email protected]>
7-
* @copyright 2017 (c) Josantonius - PHP-Ip
7+
* @copyright 2017 - 2018 (c) Josantonius - PHP-Ip
88
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
99
* @link https://github.com/Josantonius/PHP-Ip
1010
* @since 1.0.0
@@ -13,16 +13,12 @@
1313

1414
/**
1515
* IP handler.
16-
*
17-
* @since 1.0.0
1816
*/
1917
class Ip
2018
{
2119
/**
2220
* Get user's IP.
2321
*
24-
* @since 1.0.0
25-
*
2622
* @return string|false → user IP
2723
*/
2824
public static function get()

tests/IpTest.php

+11-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* PHP class to get user IP.
44
*
55
* @author Josantonius - <[email protected]>
6-
* @copyright 2017 (c) Josantonius - PHP-Ip
6+
* @copyright 2017 - 2018 (c) Josantonius - PHP-Ip
77
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
88
* @link https://github.com/Josantonius/PHP-Ip
99
* @since 1.1.3
@@ -14,8 +14,6 @@
1414

1515
/**
1616
* Tests class for Ip library.
17-
*
18-
* @since 1.1.3
1917
*/
2018
final class IpTest extends TestCase
2119
{
@@ -47,44 +45,43 @@ public function setUp()
4745
*/
4846
public function testIsInstanceOfIp()
4947
{
50-
$actual = $this->Ip;
51-
$this->assertInstanceOf('Josantonius\Ip\Ip', $actual);
48+
$this->assertInstanceOf('Josantonius\Ip\Ip', $this->Ip);
5249
}
5350

5451
/**
5552
* Validate IP.
56-
*
57-
* @since 1.1.3
5853
*/
5954
public function testValidateIp()
6055
{
56+
$ip = $this->Ip;
57+
6158
$this->assertTrue(
62-
$this->Ip->validate('8.11.0.8')
59+
$ip::validate('8.11.0.8')
6360
);
6461
}
6562

6663
/**
6764
* Validate wrong IP.
68-
*
69-
* @since 1.1.3
7065
*/
7166
public function testValidateWrongIp()
7267
{
68+
$ip = $this->Ip;
69+
7370
$this->assertFalse(
74-
$this->Ip->validate('08.11.0.8')
71+
$ip::validate('08.11.0.8')
7572
);
7673
}
7774

7875
/**
7976
* Get user IP.
80-
*
81-
* @since 1.1.3
8277
*/
8378
public function testGetIp()
8479
{
80+
$ip = $this->Ip;
81+
8582
$this->assertContains(
8683
'8.11.0.8',
87-
$this->Ip->get()
84+
$ip::get()
8885
);
8986
}
9087
}

0 commit comments

Comments
 (0)