amadeus4dev/amadeus-node

View on GitHub

Showing 48 of 52 total issues

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class OnTime {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/airport/predictions/on_time.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class ItineraryPriceMetrics {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class Airports {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class Hotel {
  constructor(client) {
    this.client = client;
  }
  /**
Severity: Major
Found in src/amadeus/namespaces/reference_data/locations/hotel.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Predictions {
  constructor(client) {
    this.client = client;
    this.tripPurpose = new TripPurpose(client);
    this.flightDelay = new FlightDelay(client);
Severity: Major
Found in src/amadeus/namespaces/travel/predictions.js and 1 other location - About 1 hr to fix
src/amadeus/namespaces/airport.js on lines 18..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Airport {
  constructor(client) {
    this.client             = client;
    this.directDestinations = new DirectDestinations(client);
    this.predictions = new Predictions(client);
Severity: Major
Found in src/amadeus/namespaces/airport.js and 1 other location - About 1 hr to fix
src/amadeus/namespaces/travel/predictions.js on lines 19..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Transfers {
  constructor(client, orderId) {
    this.client = client;
    this.orderId = orderId;
    this.cancellation = new Cancellation(client, orderId);
src/amadeus/namespaces/ordering/transfer_order.js on lines 17..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class TransferOrder {
  constructor(client, orderId) {
    this.client = client;
    this.orderId = orderId;
    this.transfers = new Transfers(client, orderId);
Severity: Major
Found in src/amadeus/namespaces/ordering/transfer_order.js and 1 other location - About 1 hr to fix
src/amadeus/namespaces/ordering/transfer_orders/transfers.js on lines 16..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language