amadeus4dev/amadeus-node

View on GitHub

Showing 52 of 55 total issues

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

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

Severity: Major
Found in src/amadeus/namespaces/shopping/flight_offers_search.js and 1 other location - About 3 hrs to fix
src/amadeus/namespaces/shopping/seatmaps.js on lines 15..65

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 96.

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 Seatmaps {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/shopping/seatmaps.js and 1 other location - About 3 hrs to fix
src/amadeus/namespaces/shopping/flight_offers_search.js on lines 14..123

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 96.

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 Location {
  constructor(client, locationId) {
    this.client = client;
    this.locationId = locationId;
  }
Severity: Major
Found in src/amadeus/namespaces/reference_data/location.js and 1 other location - About 2 hrs to fix
src/amadeus/namespaces/shopping/hotel_offer_search.js on lines 15..38

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 87.

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 HotelOfferSearch {
  constructor(client, offerId) {
    this.client = client;
    this.offerId = offerId;
  }
Severity: Major
Found in src/amadeus/namespaces/shopping/hotel_offer_search.js and 1 other location - About 2 hrs to fix
src/amadeus/namespaces/reference_data/location.js on lines 15..38

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 87.

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 3 locations. Consider refactoring.
Open

class PointOfInterest {
  constructor(client, poiId) {
    this.client = client;
    this._poiId = poiId;
  }
Severity: Major
Found in src/amadeus/namespaces/reference_data/locations/poi.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/safety/safety_rated_location.js on lines 14..31
src/amadeus/namespaces/shopping/activity.js on lines 14..31

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 80.

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 3 locations. Consider refactoring.
Open

class Activity {
  constructor(client, activityId) {
    this.client = client;
    this.activityId = activityId;
  }
Severity: Major
Found in src/amadeus/namespaces/shopping/activity.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/reference_data/locations/poi.js on lines 14..31
src/amadeus/namespaces/safety/safety_rated_location.js on lines 14..31

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 80.

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 3 locations. Consider refactoring.
Open

class SafetyRatedLocation {
  constructor(client, locationId) {
    this.client = client;
    this.locationId = locationId;
  }
Severity: Major
Found in src/amadeus/namespaces/safety/safety_rated_location.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/reference_data/locations/poi.js on lines 14..31
src/amadeus/namespaces/shopping/activity.js on lines 14..31

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 80.

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 3 locations. Consider refactoring.
Open

class SafetyRatedLocations {
  constructor(client) {
    this.client = client;
    this.bySquare = new BySquare(client);
  }
Severity: Major
Found in src/amadeus/namespaces/safety/safety_rated_locations.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/reference_data/locations/pois.js on lines 16..45
src/amadeus/namespaces/shopping/activities.js on lines 16..45

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 77.

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 3 locations. Consider refactoring.
Open

class PointsOfInterest {
  constructor(client) {
    this.client = client;
    this.bySquare = new BySquare(client);
  }
Severity: Major
Found in src/amadeus/namespaces/reference_data/locations/pois.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/safety/safety_rated_locations.js on lines 16..45
src/amadeus/namespaces/shopping/activities.js on lines 16..45

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 77.

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 3 locations. Consider refactoring.
Open

class Activities {
  constructor(client) {
    this.client = client;
    this.bySquare = new BySquare(client);
  }
Severity: Major
Found in src/amadeus/namespaces/shopping/activities.js and 2 other locations - About 2 hrs to fix
src/amadeus/namespaces/reference_data/locations/pois.js on lines 16..45
src/amadeus/namespaces/safety/safety_rated_locations.js on lines 16..45

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 77.

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 4 locations. Consider refactoring.
Open

class Hotels {
  constructor(client) {
    this.client = client;
    this.byCity = new byCity(client);
    this.byGeocode = new byGeocode(client);
Severity: Major
Found in src/amadeus/namespaces/reference_data/locations/hotels.js and 3 other locations - About 1 hr to fix
src/amadeus/namespaces/shopping/flight_offers.js on lines 18..25
src/amadeus/namespaces/travel.js on lines 22..29
src/amadeus/namespaces/travel/analytics/air_traffic.js on lines 18..26

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 73.

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 4 locations. Consider refactoring.
Open

class Travel {
  constructor(client) {
    this.client    = client;
    this.analytics = new Analytics(client);
    this.predictions = new Predictions(client);
Severity: Major
Found in src/amadeus/namespaces/travel.js and 3 other locations - About 1 hr to fix
src/amadeus/namespaces/reference_data/locations/hotels.js on lines 18..25
src/amadeus/namespaces/shopping/flight_offers.js on lines 18..25
src/amadeus/namespaces/travel/analytics/air_traffic.js on lines 18..26

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 73.

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 4 locations. Consider refactoring.
Open

class FlightOffers {
  constructor(client) {
    this.client = client;
    this.prediction = new FlightChoicePrediction(client);
    this.pricing = new Pricing(client);
Severity: Major
Found in src/amadeus/namespaces/shopping/flight_offers.js and 3 other locations - About 1 hr to fix
src/amadeus/namespaces/reference_data/locations/hotels.js on lines 18..25
src/amadeus/namespaces/travel.js on lines 22..29
src/amadeus/namespaces/travel/analytics/air_traffic.js on lines 18..26

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 73.

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 4 locations. Consider refactoring.
Open

class AirTraffic {
  constructor(client) {
    this.client   = client;
    this.traveled = new Traveled(client);
    this.booked = new Booked(client);
Severity: Major
Found in src/amadeus/namespaces/travel/analytics/air_traffic.js and 3 other locations - About 1 hr to fix
src/amadeus/namespaces/reference_data/locations/hotels.js on lines 18..25
src/amadeus/namespaces/shopping/flight_offers.js on lines 18..25
src/amadeus/namespaces/travel.js on lines 22..29

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 73.

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 33 locations. Consider refactoring.
Open

class Traveled{
  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/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/safety/safety_rated_locations/by_square.js on lines 14..43
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/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 33 locations. Consider refactoring.
Open

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

Severity: Major
Found in src/amadeus/namespaces/e_reputation/hotel_sentiments.js and 32 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/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/safety/safety_rated_locations/by_square.js on lines 14..43
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 33 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/safety/safety_rated_locations/by_square.js on lines 14..43
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 33 locations. Consider refactoring.
Open

class RecommendedLocations {
  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/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/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/safety/safety_rated_locations/by_square.js on lines 14..43
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 33 locations. Consider refactoring.
Open

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

Severity: Major
Found in src/amadeus/namespaces/travel/predictions/trip_purpose.js and 32 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/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/safety/safety_rated_locations/by_square.js on lines 14..43
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

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 33 locations. Consider refactoring.
Open

class bySquare {
  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/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/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/safety/safety_rated_locations/by_square.js on lines 14..43
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

Severity
Category
Status
Source
Language