Skip to content

Commit 4ee897e

Browse files
committed
Updated to 1.1.2 version
1 parent bcfcb67 commit 4ee897e

File tree

7 files changed

+35
-61
lines changed

7 files changed

+35
-61
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/tests export-ignore
2-
/src/Exception export-ignore
32
.gitattributes export-ignore
43
.gitignore export-ignore
54
CHANGELOG.md export-ignore

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## 1.1.2 - 2017-07-16
4+
* Deleted `Josantonius\Cookie\Exception\CookieException` class.
5+
* Deleted `Josantonius\Cookie\Exception\Exceptions` abstract class.
6+
* Deleted `Josantonius\Cookie\Exception\CookieException->__construct()` method.
7+
38
## 1.1.1 - 2017-03-18
49
* Some files were excluded from download and comments and readme files were updated.
510

README-ES.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ Librería PHP para el manejo de cookies.
1414
- [Métodos disponibles](#métodos-disponibles)
1515
- [Uso](#uso)
1616
- [Tests](#tests)
17-
- [Manejador de excepciones](#manejador-de-excepciones)
1817
- [Contribuir](#contribuir)
1918
- [Repositorio](#repositorio)
2019
- [Licencia](#licencia)
2120
- [Copyright](#copyright)
2221

2322
---
2423

24+
<p align="center"><strong>Echa un vistazo al código</strong></p>
25+
26+
<p align="center">
27+
<a href="" title="Echa un vistazo al código">
28+
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
29+
</a>
30+
</p>
31+
32+
---
33+
2534
### Instalación
2635

2736
La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
@@ -40,7 +49,7 @@ También puedes clonar el repositorio completo con Git:
4049

4150
### Requisitos
4251

43-
Esta ĺibrería es soportada por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
52+
Esta biblioteca es soportada por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
4453

4554
### Cómo empezar y ejemplos
4655

@@ -108,9 +117,6 @@ CookieTest::testDestroyOneCookie();
108117
CookieTest::testDestroyAllCookies();
109118
```
110119

111-
### Manejador de excepciones
112-
113-
Esta librería utiliza [control de excepciones](src/Exception) que puedes personalizar a tu gusto.
114120
### Contribuir
115121
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
116122
1. Bifurca la rama del repositorio en GitHub para iniciar la operación de ajuste.

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ PHP library for handling cookies.
1414
- [Available Methods](#available-methods)
1515
- [Usage](#usage)
1616
- [Tests](#tests)
17-
- [Exception Handler](#exception-handler)
1817
- [Contribute](#contribute)
1918
- [Repository](#repository)
20-
- [Licensing](#licensing)
19+
- [License](#license)
2120
- [Copyright](#copyright)
2221

2322
---
2423

24+
<p align="center"><strong>Take a look at the code</strong></p>
25+
26+
<p align="center">
27+
<a href="" title="Take a look at the code">
28+
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
29+
</a>
30+
</p>
31+
32+
---
33+
2534
### Installation
2635

2736
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
@@ -109,9 +118,6 @@ CookieTest::testDestroyOneCookie();
109118
CookieTest::testDestroyAllCookies();
110119
```
111120

112-
### Exception Handler
113-
114-
This library uses [exception handler](src/Exception) that you can customize.
115121
### Contribute
116122
1. Check for open issues or open a new issue to start a discussion around a bug or feature.
117123
1. Fork the repository on GitHub to start making your changes.
@@ -125,7 +131,7 @@ This is intended for large and long-lived objects.
125131

126132
All files in this repository were created and uploaded automatically with [Reposgit Creator](https://github.com/Josantonius/BASH-Reposgit).
127133

128-
### Licensing
134+
### License
129135

130136
This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file for more info.
131137

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/cookie",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"type": "library",
55
"description": "PHP library for handling cookies.",
66
"keywords": [

src/Cookie.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
* PHP library for handling cookies.
44
*
55
* @author Josantonius - hello@josantonius.com
6-
* @copyright Copyright (c) 2016 JST PHP Framework
6+
* @copyright Copyright (c) 2016 - 2017
77
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
88
* @link https://github.com/Josantonius/PHP-Cookie
99
* @since 1.0.0
1010
*/
1111

1212
namespace Josantonius\Cookie;
1313

14-
# use Josantonius\Cookie\Exception\CookieException;
15-
1614
/**
1715
* Cookie handler.
1816
*
@@ -40,7 +38,7 @@ class Cookie {
4038
*/
4139
public static function set($key, $value, $time = 365) {
4240

43-
setcookie(self::$_prefix.$key, $value, time() + (86400 * $time), "/");
41+
setcookie(self::$_prefix.$key, $value, time() + (86400 * $time), '/');
4442
}
4543

4644
/**
@@ -56,7 +54,7 @@ public static function pull($key) {
5654

5755
if (isset($_COOKIE[self::$_prefix . $key])) {
5856

59-
setcookie(self::$_prefix.$key, "", time() - 3600, "/");
57+
setcookie(self::$_prefix.$key, '', time() - 3600, '/');
6058

6159
return $_COOKIE[self::$_prefix . $key];
6260
}
@@ -89,7 +87,7 @@ public static function get($key) {
8987
*/
9088
public static function display() {
9189

92-
return $_COOKIE ?? null;
90+
return isset($_COOKIE) ? $_COOKIE : null;
9391

9492
}
9593

@@ -104,7 +102,7 @@ public static function destroy(string $key = '') {
104102

105103
if (isset($_COOKIE[self::$_prefix . $key])) {
106104

107-
setcookie(self::$_prefix . $key, "", time() - 3600, "/");
105+
setcookie(self::$_prefix . $key, '', time() - 3600, '/');
108106

109107
return;
110108
}
@@ -113,7 +111,7 @@ public static function destroy(string $key = '') {
113111

114112
foreach ($_COOKIE as $key => $value) {
115113

116-
setcookie($key, "", time() - 3600, "/");
114+
setcookie($key, '', time() - 3600, '/');
117115
}
118116
}
119117
}

src/Exception/CookieException.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)