Skip to content

Commit

Permalink
fixes and updates dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gutocf committed Mar 8, 2024
1 parent 6040162 commit 6adf993
Show file tree
Hide file tree
Showing 20 changed files with 271 additions and 239 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"php": "^8.0",
"guzzlehttp/guzzle": "^7.4",
"myclabs/php-enum": "^1.8",
"spatie/data-transfer-object": "3.9"
"spatie/data-transfer-object": "^3.9"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand Down
468 changes: 250 additions & 218 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/Entity/ApiErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public function testProperties(): void
$this->assertEquals($apiError->message, $data['message']);
$this->assertEquals($apiError->name, $data['name']);
$this->assertEquals($apiError->type, $data['type']);
$this->assertObjectNotHasAttribute('invalid', $apiError);
$this->assertObjectNotHasProperty('invalid', $apiError);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/BankTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public function testProperties(): void
$this->assertEquals($bank->name, $data['name']);
$this->assertEquals($bank->code, $data['code']);
$this->assertEquals($bank->fullName, $data['fullName']);
$this->assertObjectNotHasAttribute('invalid', $bank);
$this->assertObjectNotHasProperty('invalid', $bank);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/CepTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public function testProperties(): void
$this->assertEquals($cep->neighborhood, $data['neighborhood']);
$this->assertEquals($cep->street, $data['street']);
$this->assertEquals($cep->service, $data['service']);
$this->assertObjectNotHasAttribute('invalid', $cep);
$this->assertObjectNotHasProperty('invalid', $cep);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Cnpj/CnaeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function testProperties(): void
$cnae = new Cnae($data);
$this->assertEquals($cnae->codigo, $data['codigo']);
$this->assertEquals($cnae->descricao, $data['descricao']);
$this->assertObjectNotHasAttribute('invalid', $cnae);
$this->assertObjectNotHasProperty('invalid', $cnae);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Cnpj/QsaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public function testProperties(): void
$this->assertEquals($qsa->qualificacao_representante_legal, $data['qualificacao_representante_legal']);
//phpcs:ignore Generic.Files.LineLength
$this->assertEquals($qsa->codigo_qualificacao_representante_legal, $data['codigo_qualificacao_representante_legal']);
$this->assertObjectNotHasAttribute('invalid', $qsa);
$this->assertObjectNotHasProperty('invalid', $qsa);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/CnpjTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public function testProperties(): void
$this->assertNull($cnpj->data_exclusao_do_mei);
$this->assertNull($cnpj->data_exclusao_do_simples);
$this->assertNull($cnpj->data_situacao_especial);
$this->assertObjectNotHasAttribute('invalid', $cnpj);
$this->assertObjectNotHasProperty('invalid', $cnpj);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/DddTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function testProperties(): void
$ddd = new Ddd($data);
$this->assertEquals($ddd->state, $data['state']);
$this->assertIsArray($ddd->cities);
$this->assertObjectNotHasAttribute('invalid', $ddd);
$this->assertObjectNotHasProperty('invalid', $ddd);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Fipe/BrandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public function testProperties(): void
$brand = new Brand($data);
$this->assertEquals($brand->name, $data['nome']);
$this->assertEquals($brand->value, $data['valor']);
$this->assertObjectNotHasAttribute('invalid', $brand);
$this->assertObjectNotHasProperty('invalid', $brand);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Fipe/ReferenceTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public function testProperties(): void
$referenceTable = new ReferenceTable($data);
$this->assertEquals($referenceTable->codigo, $data['codigo']);
$this->assertEquals($referenceTable->mes, $data['mes']);
$this->assertObjectNotHasAttribute('invalid', $referenceTable);
$this->assertObjectNotHasProperty('invalid', $referenceTable);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Fipe/VehicleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public function testProperties(): void
$this->assertEquals($vehicle->tipoVeiculo, $data['tipoVeiculo']);
$this->assertEquals($vehicle->siglaCombustivel, $data['siglaCombustivel']);
$this->assertEquals($vehicle->dataConsulta, $data['dataConsulta']);
$this->assertObjectNotHasAttribute('invalid', $vehicle);
$this->assertObjectNotHasProperty('invalid', $vehicle);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/HolidayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public function testProperties(): void
$this->assertInstanceOf(DateTime::class, $holiday->date);
$this->assertEquals($holiday->name, $data['name']);
$this->assertEquals($holiday->type, $data['type']);
$this->assertObjectNotHasAttribute('invalid', $holiday);
$this->assertObjectNotHasProperty('invalid', $holiday);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Ibge/CityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function testProperties(): void
$city = new City($data);
$this->assertEquals($city->nome, $data['nome']);
$this->assertEquals($city->codigo_ibge, $data['codigo_ibge']);
$this->assertObjectNotHasAttribute('invalid', $city);
$this->assertObjectNotHasProperty('invalid', $city);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Ibge/RegionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public function testProperties(): void
$this->assertEquals($region->id, $data['id']);
$this->assertEquals($region->sigla, $data['sigla']);
$this->assertEquals($region->nome, $data['nome']);
$this->assertObjectNotHasAttribute('invalid', $region);
$this->assertObjectNotHasProperty('invalid', $region);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V1/Ibge/StateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function testProperties(): void
$this->assertEquals($state->sigla, $data['sigla']);
$this->assertEquals($state->nome, $data['nome']);
$this->assertInstanceOf(Region::class, $state->regiao);
$this->assertObjectNotHasAttribute('invalid', $state);
$this->assertObjectNotHasProperty('invalid', $state);
}
}
4 changes: 2 additions & 2 deletions tests/Entity/V2/Cep/CoordinatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function testProperties(): void
$coordinates = new Coordinates($data);
$this->assertEquals($coordinates->latitude, floatval($data['latitude']));
$this->assertEquals($coordinates->longitude, floatval($data['longitude']));
$this->assertObjectNotHasAttribute('invalid', $coordinates);
$this->assertObjectNotHasProperty('invalid', $coordinates);
}

public function testPropertiesEmpty(): void
Expand All @@ -24,6 +24,6 @@ public function testPropertiesEmpty(): void
$coordinates = new Coordinates($data);
$this->assertNull($coordinates->latitude);
$this->assertNull($coordinates->longitude);
$this->assertObjectNotHasAttribute('invalid', $coordinates);
$this->assertObjectNotHasProperty('invalid', $coordinates);
}
}
4 changes: 2 additions & 2 deletions tests/Entity/V2/Cep/LocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testProperties(): void
$location = new Location($data);
$this->assertEquals($location->type, $data['type']);
$this->assertInstanceOf(Coordinates::class, $location->coordinates);
$this->assertObjectNotHasAttribute('invalid', $location);
$this->assertObjectNotHasProperty('invalid', $location);
}

public function testPropertiesEmpty(): void
Expand All @@ -25,6 +25,6 @@ public function testPropertiesEmpty(): void
$location = new Location($data);
$this->assertNull($location->type);
$this->assertNull($location->coordinates);
$this->assertObjectNotHasAttribute('invalid', $location);
$this->assertObjectNotHasProperty('invalid', $location);
}
}
2 changes: 1 addition & 1 deletion tests/Entity/V2/CepTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public function testProperties(): void
$this->assertEquals($cep->service, $data['service']);
$this->assertInstanceOf(Location::class, $cep->location);
$this->assertInstanceOf(Coordinates::class, $cep->location->coordinates);
$this->assertObjectNotHasAttribute('invalid', $cep);
$this->assertObjectNotHasProperty('invalid', $cep);
}
}
2 changes: 1 addition & 1 deletion tests/Service/V1/DddServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testGet(): void
$this->assertEquals($ddd->state, $data['state']);
$this->assertIsArray($ddd->cities);
$this->assertEquals($ddd->cities[0], $data['cities'][0]);
$this->assertObjectNotHasAttribute('invalid', $ddd);
$this->assertObjectNotHasProperty('invalid', $ddd);
}

public function testGetNotFound(): void
Expand Down

0 comments on commit 6adf993

Please sign in to comment.