Closed xianqiliu closed 2 years ago
1. /tests/client/
/tests/client/
HTTPClientTest.php RequestTest.php ResponseTest.php
HTTPClientTest.php
RequestTest.php
ResponseTest.php
[x] String literals should not be duplicated e.g. Define a constant instead of duplicating this literal "foo: bar" 3 times. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L61-L62 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L342 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L347
[x] Local variables should not have the same name as class fields e.g. Rename "$params" which has the same name as the field declared at line 40. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L40 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L174
[x] Track uses of "TODO" tags
2. /tests/exceptions/
/tests/exceptions/
ExceptionsTest.php
3. /tests/.../ (Endpoints)
/tests/.../
HotelBookingsTest.php
Covid19AreaReportTest.php
HotelOfferTest.php
FlightAvailabilitiesTest.php
[x] String literals should not be duplicated
[x] Source files should not have any duplicated blocks
[x] Functions should not have too many lines of code e.g. This function "test_given_client_when_call_hotel_offer_then_ok" has 227 lines, which is greater than the 150 lines authorized. Split it into smaller functions. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/shopping/HotelOfferTest.php#L87-L371
1.
/tests/client/
[x] String literals should not be duplicated e.g. Define a constant instead of duplicating this literal "foo: bar" 3 times. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L61-L62 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L342 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L347
[x] Local variables should not have the same name as class fields e.g. Rename "$params" which has the same name as the field declared at line 40. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L40 https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/client/HTTPClientTest.php#L174
[x] Track uses of "TODO" tags
2.
/tests/exceptions/
3.
/tests/.../
(Endpoints)HotelBookingsTest.php
Covid19AreaReportTest.php
HotelOfferTest.php
FlightAvailabilitiesTest.php
[x] String literals should not be duplicated
[x] Source files should not have any duplicated blocks
[x] Functions should not have too many lines of code e.g. This function "test_given_client_when_call_hotel_offer_then_ok" has 227 lines, which is greater than the 150 lines authorized. Split it into smaller functions. https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/tests/shopping/HotelOfferTest.php#L87-L371