asennikov/ember-g-map

View on GitHub

Showing 35 of 35 total issues

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

  initPlacesService() {
    const map = this.get('map');
    let service = this.get('placesService');

    if (isPresent(map)
Severity: Major
Found in addon/components/g-map-address-route.js and 1 other location - About 3 hrs to fix
addon/components/g-map-address-marker.js on lines 23..34

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

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

  initPlacesService() {
    const map = this.get('map');
    let service = this.get('placesService');

    if (isPresent(map)
Severity: Major
Found in addon/components/g-map-address-marker.js and 1 other location - About 3 hrs to fix
addon/components/g-map-address-route.js on lines 23..34

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

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

  updateOriginLocation(results) {
    if (!this.isDestroyed) {
      const lat = results[0].geometry.location.lat();
      const lng = results[0].geometry.location.lng();

Severity: Major
Found in addon/components/g-map-address-route.js and 1 other location - About 3 hrs to fix
addon/components/g-map-address-route.js on lines 81..90

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

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

  updateDestinationLocation(results) {
    if (!this.isDestroyed) {
      const lat = results[0].geometry.location.lat();
      const lng = results[0].geometry.location.lng();

Severity: Major
Found in addon/components/g-map-address-route.js and 1 other location - About 3 hrs to fix
addon/components/g-map-address-route.js on lines 70..79

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

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

GMapMarkerComponent has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

const GMapMarkerComponent = Component.extend({
  layout,
  classNames: ['g-map-marker'],

  map: alias('mapContext.map'),
Severity: Minor
Found in addon/components/g-map-marker.js - About 3 hrs to fix

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

        if (isPresent(service)
          && isPresent(address)
          && (typeof FastBoot === 'undefined')) {
          const request = { query: address };
    
    
    Severity: Major
    Found in addon/components/g-map-address-marker.js and 2 other locations - About 3 hrs to fix
    addon/components/g-map-address-route.js on lines 45..55
    addon/components/g-map-address-route.js on lines 57..67

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

    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

        if (isPresent(service)
          && isPresent(originAddress)
          && (typeof FastBoot === 'undefined')) {
          const originRequest = { query: originAddress };
    
    
    Severity: Major
    Found in addon/components/g-map-address-route.js and 2 other locations - About 3 hrs to fix
    addon/components/g-map-address-marker.js on lines 44..54
    addon/components/g-map-address-route.js on lines 57..67

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

    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

        if (isPresent(service)
          && isPresent(destinationAddress)
          && (typeof FastBoot === 'undefined')) {
          const destinationRequest = { query: destinationAddress };
    
    
    Severity: Major
    Found in addon/components/g-map-address-route.js and 2 other locations - About 3 hrs to fix
    addon/components/g-map-address-marker.js on lines 44..54
    addon/components/g-map-address-route.js on lines 45..55

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

    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

    Function exports has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function() {
      return Promise.all([
        getChannelURL('release'),
        getChannelURL('beta'),
        getChannelURL('canary')
    Severity: Major
    Found in config/ember-try.js - About 3 hrs to fix

      Function contentFor has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

        contentFor(type, config) {
          let content = '';
      
          if (type === 'head') {
            let src = '//maps.googleapis.com/maps/api/js';
      Severity: Minor
      Found in index.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

        updatePolylineOptions() {
          const polyline = this.get('polyline');
          const options = compact(this.getProperties(allowedPolylineOptions));
      
          if (isPresent(polyline) && isPresent(Object.keys(options))) {
      Severity: Major
      Found in addon/components/g-map-polyline.js and 1 other location - About 2 hrs to fix
      addon/components/g-map-infowindow.js on lines 62..69

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

        setOptions() {
          const infowindow = this.get('infowindow');
          const options = compact(this.getProperties(allowedOptions));
      
          if (isPresent(infowindow) && isPresent(Object.keys(options))) {
      Severity: Major
      Found in addon/components/g-map-infowindow.js and 1 other location - About 2 hrs to fix
      addon/components/g-map-polyline.js on lines 106..113

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

        sendOnDrag(e) {
          const onDrag = this.get('onDrag');
          const polyline = this.get('polyline');
      
          if (typeOf(onDrag) === 'function') {
      Severity: Major
      Found in addon/components/g-map-polyline.js and 1 other location - About 2 hrs to fix
      addon/components/g-map-polyline.js on lines 122..131

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

      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

        sendOnClick(e) {
          const onClick = this.get('onClick');
          const polyline = this.get('polyline');
      
          if (typeOf(onClick) === 'function') {
      Severity: Major
      Found in addon/components/g-map-polyline.js and 1 other location - About 2 hrs to fix
      addon/components/g-map-polyline.js on lines 140..149

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

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

        setTitle() {
          const marker = this.get('marker');
          const title = this.get('title');
      
          if (isPresent(marker) && isPresent(title)) {
      Severity: Major
      Found in addon/components/g-map-marker.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 107..114
      addon/components/g-map-marker.js on lines 140..147
      addon/components/g-map-marker.js on lines 153..159
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 197..204
      addon/components/g-map-polyline.js on lines 74..81

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

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

        setMap() {
          const map = this.get('map');
          const polyline = this.get('polyline');
      
          if (isPresent(polyline) && isPresent(map)) {
      Severity: Major
      Found in addon/components/g-map-polyline.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 107..114
      addon/components/g-map-marker.js on lines 140..147
      addon/components/g-map-marker.js on lines 153..159
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 197..204
      addon/components/g-map-marker.js on lines 210..217

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

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

        setMap() {
          const map = this.get('map');
          const marker = this.get('marker');
      
          if (isPresent(marker) && isPresent(map)) {
      Severity: Major
      Found in addon/components/g-map-marker.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 140..147
      addon/components/g-map-marker.js on lines 153..159
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 197..204
      addon/components/g-map-marker.js on lines 210..217
      addon/components/g-map-polyline.js on lines 74..81

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

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

        setIcon() {
          const marker = this.get('marker');
          const icon = this.get('icon');
      
          if (isPresent(marker) && isPresent(icon)) {
      Severity: Major
      Found in addon/components/g-map-marker.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 107..114
      addon/components/g-map-marker.js on lines 153..159
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 197..204
      addon/components/g-map-marker.js on lines 210..217
      addon/components/g-map-polyline.js on lines 74..81

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

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

        setLabel() {
          const marker = this.get('marker');
          const label = this.get('label');
      
          if (isPresent(marker) && isPresent(label)) {
      Severity: Major
      Found in addon/components/g-map-marker.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 107..114
      addon/components/g-map-marker.js on lines 140..147
      addon/components/g-map-marker.js on lines 153..159
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 210..217
      addon/components/g-map-polyline.js on lines 74..81

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

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

        setZIndex() {
          const marker = this.get('marker');
          const zIndex = this.get('zIndex');
          if (isPresent(marker) && isPresent(zIndex)) {
            marker.setZIndex(zIndex);
      Severity: Major
      Found in addon/components/g-map-marker.js and 6 other locations - About 1 hr to fix
      addon/components/g-map-marker.js on lines 107..114
      addon/components/g-map-marker.js on lines 140..147
      addon/components/g-map-marker.js on lines 165..171
      addon/components/g-map-marker.js on lines 197..204
      addon/components/g-map-marker.js on lines 210..217
      addon/components/g-map-polyline.js on lines 74..81

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

      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