Skip to content

Commit fe38afb

Browse files
committed
Fixed bug in method and comments were modified
Signed-off-by: Josantonius <info@josantonius.com>
1 parent 7654a31 commit fe38afb

File tree

5 files changed

+6
-18
lines changed

5 files changed

+6
-18
lines changed

README-ES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $array = [
7070

7171
$pathfile = __DIR__ . '/filename.json';
7272

73-
var_dump(Json::arrayToFile($pathfile, $array)); //bool(true)
73+
var_dump(Json::arrayToFile($array, $pathfile)); //bool(true)
7474

7575
/* Esto creará el archivo "filename.json" en el directorio "tests". */
7676
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $array = [
7070

7171
$pathfile = __DIR__ . '/filename.json';
7272

73-
var_dump(Json::arrayToFile($pathfile, $array)); //bool(true)
73+
var_dump(Json::arrayToFile($array, $pathfile)); //bool(true)
7474

7575
/* This will create "filename.json" in the "tests" folder. */
7676
```

src/Exception/JsonException.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
/**
33
* PHP simple library for managing Json files.
44
*
5-
* @category JST
6-
* @package Json
7-
* @subpackage JsonException
85
* @author Josantonius - info@josantonius.com
96
* @copyright Copyright (c) 2016 JST PHP Framework
107
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11-
* @version 1.0.0
128
* @link https://github.com/Josantonius/PHP-Json
13-
* @since File available since 1.0.0 - Update: 2016-12-14
9+
* @since File available since 1.0.0 - Update: 2017-02-14
1410
*/
1511

1612
namespace Josantonius\Json\Exception;

src/Json.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
/**
33
* PHP simple library for managing Json files.
44
*
5-
* @category JST
6-
* @package Json
7-
* @subpackage Json
85
* @author Josantonius - info@josantonius.com
96
* @copyright Copyright (c) 2016 JST PHP Framework
107
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11-
* @version 1.1.0
128
* @link https://github.com/Josantonius/PHP-Json
13-
* @since File available since 1.0.0 - Update: 2017-01-30
9+
* @since File available since 1.0.0 - Update: 2017-02-14
1410
*/
1511

1612
namespace Josantonius\Json;
@@ -74,7 +70,7 @@ public static function fileToArray($pathfile) {
7470

7571
$jsonString = file_get_contents($pathfile);
7672

77-
$jsonArray = json_decode("", true);
73+
$jsonArray = json_decode($jsonString, true);
7874

7975
self::jsonLastError();
8076

tests/JsonTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
/**
33
* PHP simple library for managing Json files.
44
*
5-
* @category JST
6-
* @package Json
7-
* @subpackage JsonTest
85
* @author Josantonius - info@josantonius.com
96
* @copyright Copyright (c) 2016 JST PHP Framework
107
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11-
* @version 1.1.0
128
* @link https://github.com/Josantonius/PHP-Json
13-
* @since File available since 1.0.0 - Update: 2017-01-30
9+
* @since File available since 1.0.0 - Update: 2017-02-14
1410
*/
1511

1612
namespace Josantonius\Json\Tests;

0 commit comments

Comments
 (0)