Skip to content

Commit 6afb994

Browse files
committed
docs: Improved documentation
1 parent c845853 commit 6afb994

File tree

2 files changed

+51
-67
lines changed

2 files changed

+51
-67
lines changed

.github/lang/es-ES/README.md

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Biblioteca PHP para la gestión de archivos JSON.
2121
- [Cómo empezar](#cómo-empezar)
2222
- [Uso](#uso)
2323
- [Tests](#tests)
24-
- [Tareas pendientes](#☑-tareas-pendientes)
24+
- [Tareas pendientes](#tareas-pendientes)
2525
- [Registro de cambios](#registro-de-cambios)
2626
- [Contribuir](#contribuir)
2727
- [Patrocinar](#patrocinar)
@@ -63,62 +63,54 @@ Métodos disponibles en esta biblioteca:
6363
### Obtener el contenido del archivo JSON
6464

6565
```php
66-
$json->get();
66+
$json->get(): array
6767
```
6868

69-
**@throws** `CreateDirectoryException` Si no se puede crear el directorio
70-
71-
**@throws** `CreateFileException` Si no se puede crear el archivo
69+
**@throws** `CreateDirectoryException` si no se puede crear el directorio.
7270

73-
**@throws** `JsonErrorException` Si hay un error al analizar un archivo JSON
71+
**@throws** `CreateFileException` si no se puede crear el archivo.
7472

75-
**@Return** `array` Contenido del archivo
73+
**@throws** `JsonErrorException` si hay un error al analizar un archivo JSON.
7674

7775
### Establecer el contenido del archivo JSON
7876

7977
```php
80-
$json->set(array|object $content);
78+
$json->set(array|object $content): void
8179
```
8280

83-
**@throws** `CreateFileException` Si no se puede crear el archivo
84-
85-
**@throws** `JsonErrorException` Si hay un error al analizar un archivo JSON
81+
**@throws** `CreateFileException` si no se puede crear el archivo.
8682

87-
**@throws** `UnavailableMethodException` Si el método no está disponible
83+
**@throws** `JsonErrorException` si hay un error al analizar un archivo JSON.
8884

89-
**@Return** `void`
85+
**@throws** `UnavailableMethodException` si el método no está disponible.
9086

9187
### Fusionar en el archivo JSON
9288

9389
```php
94-
$json->merge(array|object $content);
90+
$json->merge(array|object $content): array
9591
```
9692

97-
**@throws** `CreateFileException` Si no se puede crear el archivo
93+
**@throws** `CreateFileException` si no se puede crear el archivo.
9894

99-
**@throws** `GetFileException` Si no se puede obtener el archivo
95+
**@throws** `GetFileException` si no se puede obtener el archivo.
10096

101-
**@throws** `JsonErrorException` Si hay un error al analizar un archivo JSON
97+
**@throws** `JsonErrorException` si hay un error al analizar un archivo JSON.
10298

103-
**@throws** `UnavailableMethodException` Si el método no está disponible
104-
105-
**@Return** `array` Array resultante
99+
**@throws** `UnavailableMethodException` si el método no está disponible.
106100

107101
### Incluir en el archivo JSON
108102

109103
```php
110-
$json->push(array|object $content);
104+
$json->push(array|object $content): array
111105
```
112106

113-
**@throws** `CreateFileException` Si no se puede crear el archivo
114-
115-
**@throws** `GetFileException` Si no se puede obtener el archivo
107+
**@throws** `CreateFileException` si no se puede crear el archivo.
116108

117-
**@throws** `JsonErrorException` Si hay un error al analizar un archivo JSON
109+
**@throws** `GetFileException` si no se puede obtener el archivo.
118110

119-
**@throws** `UnavailableMethodException` Si el método no está disponible
111+
**@throws** `JsonErrorException` si hay un error al analizar un archivo JSON.
120112

121-
**@Return** `array` Array resultante
113+
**@throws** `UnavailableMethodException` si el método no está disponible.
122114

123115
## Cómo empezar
124116

@@ -262,14 +254,14 @@ Ejecutar todas las pruebas anteriores:
262254
composer tests
263255
```
264256

265-
## Tareas pendientes
257+
## Tareas pendientes
266258

267-
- [ ] Añadir nueva funcionalidad.
268-
- [ ] Mejorar pruebas.
269-
- [ ] Mejorar documentación.
270-
- [ ] Mejorar la traducción al inglés en el archivo README.
271-
- [ ] Refactorizar código para las reglas de estilo de código deshabilitadas.
272-
Ver [phpmd.xml](phpmd.xml) y [phpcs.xml](phpcs.xml).
259+
- [ ] Añadir nueva funcionalidad
260+
- [ ] Mejorar pruebas
261+
- [ ] Mejorar documentación
262+
- [ ] Mejorar la traducción al inglés en el archivo README
263+
- [ ] Refactorizar código para las reglas de estilo de código deshabilitadas
264+
(ver [phpmd.xml](phpmd.xml) y [phpcs.xml](phpcs.xml))
273265

274266
## Registro de cambios
275267

README.md

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PHP simple library for managing JSON files.
2121
- [Quick Start](#quick-start)
2222
- [Usage](#usage)
2323
- [Tests](#tests)
24-
- [TODO](#-todo)
24+
- [TODO](#todo)
2525
- [Changelog](#changelog)
2626
- [Contribution](#contribution)
2727
- [Sponsor](#Sponsor)
@@ -63,62 +63,54 @@ Available methods in this library:
6363
### Get JSON file contents
6464

6565
```php
66-
$json->get();
66+
$json->get(): array
6767
```
6868

69-
**@throws** `CreateDirectoryException` If there is an error when creating a directory
70-
71-
**@throws** `CreateFileException` If there is an error when creating a file
69+
**@throws** `CreateDirectoryException` if there is an error when creating a directory.
7270

73-
**@throws** `JsonErrorException` If there is an error when parsing a JSON file
71+
**@throws** `CreateFileException` if there is an error when creating a file.
7472

75-
**@Return** `array` File contents
73+
**@throws** `JsonErrorException` if there is an error when parsing a JSON file.
7674

7775
### Set the content of the JSON file
7876

7977
```php
80-
$json->set(array|object $content);
78+
$json->set(array|object $content): void
8179
```
8280

83-
**@throws** `CreateFileException` If there is an error when creating a file
84-
85-
**@throws** `JsonErrorException` If there is an error when parsing a JSON file
81+
**@throws** `CreateFileException` if there is an error when creating a file.
8682

87-
**@throws** `UnavailableMethodException` If the method is not available
83+
**@throws** `JsonErrorException` if there is an error when parsing a JSON file.
8884

89-
**@Return** `void`
85+
**@throws** `UnavailableMethodException` if the method is not available.
9086

9187
### Merge into JSON file
9288

9389
```php
94-
$json->merge(array|object $content);
90+
$json->merge(array|object $content): array
9591
```
9692

97-
**@throws** `CreateFileException` If there is an error when creating a file
93+
**@throws** `CreateFileException` if there is an error when creating a file.
9894

99-
**@throws** `GetFileException` If there is an error when getting a file
95+
**@throws** `GetFileException` if there is an error when getting a file.
10096

101-
**@throws** `JsonErrorException` If there is an error when parsing a JSON file
97+
**@throws** `JsonErrorException` if there is an error when parsing a JSON file.
10298

103-
**@throws** `UnavailableMethodException` If the method is not available
104-
105-
**@Return** `array` Resulting array
99+
**@throws** `UnavailableMethodException` if the method is not available.
106100

107101
### Push on the JSON file
108102

109103
```php
110-
$json->push(array|object $content);
104+
$json->push(array|object $content): array
111105
```
112106

113-
**@throws** `CreateFileException` If there is an error when creating a file
114-
115-
**@throws** `GetFileException` If there is an error when getting a file
107+
**@throws** `CreateFileException` if there is an error when creating a file.
116108

117-
**@throws** `JsonErrorException` If there is an error when parsing a JSON file
109+
**@throws** `GetFileException` if there is an error when getting a file.
118110

119-
**@throws** `UnavailableMethodException` If the method is not available
111+
**@throws** `JsonErrorException` if there is an error when parsing a JSON file.
120112

121-
**@Return** `array` Resulting array
113+
**@throws** `UnavailableMethodException` if the method is not available.
122114

123115
## Quick Start
124116

@@ -261,13 +253,13 @@ Run all previous tests:
261253
composer tests
262254
```
263255

264-
## TODO
256+
## TODO
265257

266-
- [ ] Add new feature.
267-
- [ ] Improve tests.
268-
- [ ] Improve documentation.
269-
- [ ] Improve English translation in the README file.
270-
- [ ] Refactor code for disabled code style rules. See [phpmd.xml](phpmd.xml) and [phpcs.xml](phpcs.xml).
258+
- [ ] Add new feature
259+
- [ ] Improve tests
260+
- [ ] Improve documentation
261+
- [ ] Improve English translation in the README file
262+
- [ ] Refactor code for disabled code style rules (see phpmd.xml and phpcs.xml)
271263

272264
## Changelog
273265

0 commit comments

Comments
 (0)