File tree Expand file tree Collapse file tree 5 files changed +6
-18
lines changed
Expand file tree Collapse file tree 5 files changed +6
-18
lines changed Original file line number Diff line number Diff 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```
Original file line number Diff line number Diff 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```
Original file line number Diff line number Diff line change 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
1612namespace Josantonius \Json \Exception ;
Original file line number Diff line number Diff line change 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
1612namespace 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
Original file line number Diff line number Diff line change 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
1612namespace Josantonius \Json \Tests ;
You can’t perform that action at this time.
0 commit comments