Skip to content

Commit 169269d

Browse files
committed
Updated to 1.1.2 version
1 parent 11b67f7 commit 169269d

File tree

7 files changed

+33
-59
lines changed

7 files changed

+33
-59
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\LanguageCode\Exception\LanguageCodeException` class.
5+
* Deleted `Josantonius\LanguageCode\Exception\Exceptions` abstract class.
6+
* Deleted `Josantonius\LanguageCode\Exception\LanguageCodeException->__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: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ Lista de 217 códigos de idioma: ISO 639-1.
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/).
@@ -126,9 +135,6 @@ LanguageCodeTest::testGetCodeFromLanguageUndefined();
126135
LanguageCodeTest::testGetAll();
127136
```
128137

129-
### Manejador de excepciones
130-
131-
Esta librería utiliza [control de excepciones](src/Exception) que puedes personalizar a tu gusto.
132138
### Contribuir
133139
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
134140
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 @@ List of 217 language codes: ISO 639-1.
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/).
@@ -127,9 +136,6 @@ LanguageCodeTest::testGetCodeFromLanguageUndefined();
127136
LanguageCodeTest::testGetAll();
128137
```
129138

130-
### Exception Handler
131-
132-
This library uses [exception handler](src/Exception) that you can customize.
133139
### Contribute
134140
1. Check for open issues or open a new issue to start a discussion around a bug or feature.
135141
1. Fork the repository on GitHub to start making your changes.
@@ -143,7 +149,7 @@ This is intended for large and long-lived objects.
143149

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

146-
### Licensing
152+
### License
147153

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/languagecode",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"type": "library",
55
"description": "List of 217 language codes: ISO 639-1.",
66
"keywords": [

src/Exception/LanguageCodeException.php

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

src/LanguageCode.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Josantonius\LanguageCode;
1313

14-
# use Josantonius\LanguageCode\Exception\LanguageCodeException;
15-
1614
/**
1715
* Language code handler.
1816
*
@@ -40,7 +38,7 @@ protected static function load() {
4038

4139
if (is_null(static::$lamguageCodes)) {
4240

43-
$filepath = __DIR__ . "/resources/languageCodes.jsond";
41+
$filepath = __DIR__ . '/resources/languageCodes.jsond';
4442

4543
$jsonFile = file_get_contents($filepath);
4644

@@ -59,7 +57,7 @@ protected static function load() {
5957
*
6058
* @since 1.0.0
6159
*
62-
* @param string $languageCode → language code, e.g. "es"
60+
* @param string $languageCode → language code, e.g. 'es'
6361
*
6462
* @return string → country name
6563
*/
@@ -69,7 +67,7 @@ public static function getLanguageFromCode($languageCode) {
6967

7068
if (!isset(static::$lamguageCodes[$languageCode])) {
7169

72-
static::$lamguageCodes[$languageCode] = "undefined";
70+
static::$lamguageCodes[$languageCode] = 'undefined';
7371
}
7472

7573
return static::$lamguageCodes[$languageCode];
@@ -80,7 +78,7 @@ public static function getLanguageFromCode($languageCode) {
8078
*
8179
* @since 1.0.0
8280
*
83-
* @param string $language → language name, e.g. "Spanish"
81+
* @param string $language → language name, e.g. 'Spanish'
8482
*
8583
* @return string → language code
8684
*/
@@ -93,7 +91,7 @@ public static function getCodeFromLanguage($language) {
9391
return $index;
9492
}
9593

96-
return "undefined";
94+
return 'undefined';
9795
}
9896

9997
/**

0 commit comments

Comments
 (0)