| @@ -11,7 +11,7 @@ | ||
| 11 | 11 |  class LengthValidator { | 
| 12 | 12 | |
| 13 | 13 |      public static function equals($value, int $length): bool { | 
| 14 | -        if (mb_strlen(str_replace(" ", "",($value))) == $length) { | |
| 14 | +        if (mb_strlen(str_replace(" ", "", ($value))) == $length) { | |
| 15 | 15 | return true; | 
| 16 | 16 | } | 
| 17 | 17 | |
| @@ -20,8 +20,8 @@ | ||
| 20 | 20 | |
| 21 | 21 |      public function valueProvider() { | 
| 22 | 22 | return [ | 
| 23 | - "shouldBeValidWhenValueIsNotEmpty" => ['value' => 'foo', "expectedResult" => true], | |
| 24 | - "shouldNotBeValidWhenValueIsEmpty" => ['value' => '', "expectedResult" => false] | |
| 23 | + "shouldBeValidWhenValueIsNotEmpty" => [ 'value' => 'foo', "expectedResult" => true ], | |
| 24 | + "shouldNotBeValidWhenValueIsEmpty" => [ 'value' => '', "expectedResult" => false ] | |
| 25 | 25 | ]; | 
| 26 | 26 | } | 
| 27 | 27 | |
| @@ -29,16 +29,16 @@ | ||
| 29 | 29 | |
| 30 | 30 |      public function equalsValueProvider() { | 
| 31 | 31 | return [ | 
| 32 | - "shouldBeValidWhenValueIsEqualsToLength" => ['value' => 'foo', 'length' => 3, "expectedResult" => true], | |
| 33 | - "shouldNotBeValidWhenValueIsNotEqualsToLength" => ['value' => 'fo', 'length' => 3, "expectedResult" => false] | |
| 32 | + "shouldBeValidWhenValueIsEqualsToLength" => [ 'value' => 'foo', 'length' => 3, "expectedResult" => true ], | |
| 33 | + "shouldNotBeValidWhenValueIsNotEqualsToLength" => [ 'value' => 'fo', 'length' => 3, "expectedResult" => false ] | |
| 34 | 34 | ]; | 
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | 37 |      public function aboveOrEqualsValueProvider() { | 
| 38 | 38 | return [ | 
| 39 | - "shouldBeValidWhenValueIsEqualsToMinimum" => ['value' => 'foo', 'length' => 3, "expectedResult" => true], | |
| 40 | - "shouldBeValidWhenValueIsAboveMinimum" => ['value' => 'foo', 'length' => 2, "expectedResult" => true], | |
| 41 | - "shouldNoBeValidWhenValueIsBelowMinimum" => ['value' => 'f', 'length' => 3, "expectedResult" => false] | |
| 39 | + "shouldBeValidWhenValueIsEqualsToMinimum" => [ 'value' => 'foo', 'length' => 3, "expectedResult" => true ], | |
| 40 | + "shouldBeValidWhenValueIsAboveMinimum" => [ 'value' => 'foo', 'length' => 2, "expectedResult" => true ], | |
| 41 | + "shouldNoBeValidWhenValueIsBelowMinimum" => [ 'value' => 'f', 'length' => 3, "expectedResult" => false ] | |
| 42 | 42 | ]; | 
| 43 | 43 | } | 
| 44 | 44 | |
| @@ -10,6 +10,6 @@ | ||
| 10 | 10 | * @author André de Brito <https://github.com/andredebrito> | 
| 11 | 11 | * @package AndredeBrito\PHPViaCep\Exceptions | 
| 12 | 12 | */ | 
| 13 | -class InvalidCityException extends RuntimeException{ | |
| 13 | +class InvalidCityException extends RuntimeException { | |
| 14 | 14 | |
| 15 | 15 | } | 
| @@ -124,12 +124,12 @@ | ||
| 124 | 124 | * @return \AndreDeBrito\PHPViaCep\ViaCepApi|null | 
| 125 | 125 | */ | 
| 126 | 126 |      public function jsonToObject(): ?ViaCepApi { | 
| 127 | -      if ($this->responseType == "json" && $this->response != "[]") { | |
| 127 | +        if ($this->responseType == "json" && $this->response != "[]") { | |
| 128 | 128 | $this->responseType = "object"; | 
| 129 | 129 | $this->response = (object) json_decode($this->response); | 
| 130 | 130 | } | 
| 131 | 131 | |
| 132 | - return $this; | |
| 132 | + return $this; | |
| 133 | 133 | } | 
| 134 | 134 | |
| 135 | 135 | /** | 
| @@ -190,7 +190,7 @@ | ||
| 190 | 190 |                  return ($this->response && in_array("erro", json_decode($this->response)) || ($this->response == "[]") ? null : $this->response); | 
| 191 | 191 | |
| 192 | 192 | case "xml": | 
| 193 | - return (!empty(simplexml_load_string($this->response)->erro) || (isset(simplexml_load_string($this->response)->enderecos) && (string)simplexml_load_string($this->response)->enderecos == "") ? null : $this->response); | |
| 193 | + return (!empty(simplexml_load_string($this->response)->erro) || (isset(simplexml_load_string($this->response)->enderecos) && (string) simplexml_load_string($this->response)->enderecos == "") ? null : $this->response); | |
| 194 | 194 | |
| 195 | 195 | case "pided": | 
| 196 | 196 | return ($this->response == "erro:true" ? null : $this->response); | 
| @@ -10,6 +10,6 @@ | ||
| 10 | 10 | * @author André de Brito <https://github.com/andredebrito> | 
| 11 | 11 | * @package AndredeBrito\PHPViaCep\Exceptions | 
| 12 | 12 | */ | 
| 13 | -class InvalidEstateException extends RuntimeException{ | |
| 13 | +class InvalidEstateException extends RuntimeException { | |
| 14 | 14 | |
| 15 | 15 | } |