Skip to content

Commit 782a8c2

Browse files
committed
Updated to 1.1.6 version
1 parent 0718d9c commit 782a8c2

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

CHANGELOG.md

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

3+
## 1.1.6 - 2017-11-12
4+
5+
* Set the correct `phpcbf` fix command in `composer.json`.
6+
7+
* Logical condition was unified.
8+
9+
* Set static methods should in tests class. Use `::` instead of `->`.
10+
11+
* Added `Josantonius\Session\Session::getPrefix()` method.
12+
13+
* Added `Josantonius\Session\Tests\SessionTest::testSetPrefix()` method.
14+
315
## 1.1.5 - 2017-11-09
416

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

README-ES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ Session::setPrefix($prefix);
6464

6565
**# Return** (boolean)
6666

67+
### - Obtener prefijo de las sesiones:
68+
69+
```php
70+
Session::getPrefix();
71+
```
72+
73+
**# Return** (string) → prefijo de las sesiones
74+
6775
### - Iniciar sesión si la sesión no se ha iniciado:
6876

6977
```php
@@ -167,6 +175,12 @@ Ejemplo de uso para esta biblioteca:
167175
Session::set('name', 'Joseph');
168176
```
169177

178+
### - Obtener prefijo de las sesiones:
179+
180+
```php
181+
Session::getPrefix();
182+
```
183+
170184
### - Iniciar sesión:
171185

172186
```php

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ Session::setPrefix($prefix);
6464

6565
**# Return** (boolean)
6666

67+
### - Get sessions prefix:
68+
69+
```php
70+
Session::getPrefix();
71+
```
72+
73+
**# Return** (string) → sessions prefix
74+
6775
### - Start session if session has not started:
6876

6977
```php
@@ -167,6 +175,12 @@ Example of use for this library:
167175
Session::set('name', 'Joseph');
168176
```
169177

178+
### - Get sessions prefix:
179+
180+
```php
181+
Session::getPrefix();
182+
```
183+
170184
### - Start session:
171185

172186
```php

src/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function setPrefix($prefix)
5353
/**
5454
* Get prefix for sessions.
5555
*
56-
* @since 1.0.0
56+
* @since 1.1.6
5757
*
5858
* @return string
5959
*/
@@ -141,7 +141,7 @@ public static function get($key = '', $secondkey = false)
141141

142142
if (empty($key)) {
143143
return isset($_SESSION) ? $_SESSION : null;
144-
} elseif ($secondkey) {
144+
} elseif ($secondkey == true) {
145145
if (isset($_SESSION[$name][$secondkey])) {
146146
return $_SESSION[$name][$secondkey];
147147
}

tests/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testSetPrefix()
6767
/**
6868
* Get prefix for sessions.
6969
*
70-
* @since 1.1.3
70+
* @since 1.1.6
7171
*/
7272
public function testGetPrefix()
7373
{

0 commit comments

Comments
 (0)