modxcms/revolution

View on GitHub
core/model/aws/services/ec2.class.php

Summary

Maintainability
F
3 wks
Test Coverage

File ec2.class.php has 1382 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*
 * Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
Severity: Major
Found in core/model/aws/services/ec2.class.php - About 3 days to fix

    AmazonEC2 has 116 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class AmazonEC2 extends CFRuntime
    {
    
        /*%******************************************************************************************%*/
        // CLASS CONSTANTS
    Severity: Major
    Found in core/model/aws/services/ec2.class.php - About 2 days to fix

      Method run_instances has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function run_instances($image_id, $min_count, $max_count, $opt = null)
          {
              if (!$opt) $opt = array();
              $opt['ImageId'] = $image_id;
              $opt['MinCount'] = $min_count;
      Severity: Minor
      Found in core/model/aws/services/ec2.class.php - About 1 hr to fix

        Method describe_spot_price_history has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function describe_spot_price_history($opt = null)
            {
                if (!$opt) $opt = array();
        
                // Optional parameter
        Severity: Minor
        Found in core/model/aws/services/ec2.class.php - About 1 hr to fix

          Method modify_image_attribute has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function modify_image_attribute($image_id, $opt = null)
              {
                  if (!$opt) $opt = array();
                  $opt['ImageId'] = $image_id;
          
          
          Severity: Minor
          Found in core/model/aws/services/ec2.class.php - About 1 hr to fix

            Method describe_images has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function describe_images($opt = null)
                {
                    if (!$opt) $opt = array();
            
                    // Optional parameter
            Severity: Minor
            Found in core/model/aws/services/ec2.class.php - About 1 hr to fix

              Method describe_snapshots has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function describe_snapshots($opt = null)
                  {
                      if (!$opt) $opt = array();
              
                      // Optional parameter
              Severity: Minor
              Found in core/model/aws/services/ec2.class.php - About 1 hr to fix

                Method create_network_acl_entry has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function create_network_acl_entry($network_acl_id, $rule_number, $protocol, $rule_action, $egress, $cidr_block, $opt = null)
                Severity: Major
                Found in core/model/aws/services/ec2.class.php - About 50 mins to fix

                  Method replace_network_acl_entry has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function replace_network_acl_entry($network_acl_id, $rule_number, $protocol, $rule_action, $egress, $cidr_block, $opt = null)
                  Severity: Major
                  Found in core/model/aws/services/ec2.class.php - About 50 mins to fix

                    Function get_password_data has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function get_password_data($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['InstanceId'] = $instance_id;
                    
                    
                    Severity: Minor
                    Found in core/model/aws/services/ec2.class.php - About 45 mins 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

                    Function run_instances has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function run_instances($image_id, $min_count, $max_count, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['ImageId'] = $image_id;
                            $opt['MinCount'] = $min_count;
                    Severity: Minor
                    Found in core/model/aws/services/ec2.class.php - About 25 mins 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

                    Function describe_spot_price_history has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function describe_spot_price_history($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Minor
                    Found in core/model/aws/services/ec2.class.php - About 25 mins 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

                        public function describe_images($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 1 day to fix
                    core/model/aws/services/ec2.class.php on lines 3889..3930

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

                    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

                        public function describe_snapshots($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 1 day to fix
                    core/model/aws/services/ec2.class.php on lines 2414..2455

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

                    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

                        public function replace_network_acl_entry($network_acl_id, $rule_number, $protocol, $rule_action, $egress, $cidr_block, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['NetworkAclId'] = $network_acl_id;
                            $opt['RuleNumber'] = $rule_number;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 7 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 1405..1434

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

                    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

                        public function create_network_acl_entry($network_acl_id, $rule_number, $protocol, $rule_action, $egress, $cidr_block, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['NetworkAclId'] = $network_acl_id;
                            $opt['RuleNumber'] = $rule_number;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 7 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 3838..3867

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

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

                        public function describe_reserved_instances($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_dhcp_options($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_bundle_tasks($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_placement_groups($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_instances($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_availability_zones($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_internet_gateways($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_route_tables($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_network_acls($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_vpn_gateways($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_reserved_instances_offerings($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510

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

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

                        public function describe_spot_instance_requests($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_customer_gateways($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_regions($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_licenses($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_vpn_connections($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_vpcs($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_subnets($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_key_pairs($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1498..1521
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

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

                        public function describe_volumes($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 19 other locations - About 4 hrs to fix
                    core/model/aws/services/ec2.class.php on lines 203..226
                    core/model/aws/services/ec2.class.php on lines 247..270
                    core/model/aws/services/ec2.class.php on lines 708..731
                    core/model/aws/services/ec2.class.php on lines 830..853
                    core/model/aws/services/ec2.class.php on lines 1104..1127
                    core/model/aws/services/ec2.class.php on lines 1196..1219
                    core/model/aws/services/ec2.class.php on lines 1284..1307
                    core/model/aws/services/ec2.class.php on lines 1549..1572
                    core/model/aws/services/ec2.class.php on lines 1619..1642
                    core/model/aws/services/ec2.class.php on lines 1670..1693
                    core/model/aws/services/ec2.class.php on lines 1712..1735
                    core/model/aws/services/ec2.class.php on lines 2081..2104
                    core/model/aws/services/ec2.class.php on lines 2251..2274
                    core/model/aws/services/ec2.class.php on lines 2324..2347
                    core/model/aws/services/ec2.class.php on lines 2642..2665
                    core/model/aws/services/ec2.class.php on lines 2712..2735
                    core/model/aws/services/ec2.class.php on lines 3277..3300
                    core/model/aws/services/ec2.class.php on lines 3487..3510
                    core/model/aws/services/ec2.class.php on lines 3562..3585

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

                    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

                        public function __construct($key = null, $secret_key = null, $token = null)
                        {
                            $this->api_version = '2011-02-28';
                            $this->hostname = self::DEFAULT_URL;
                    
                    
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 2 other locations - About 4 hrs to fix
                    core/model/aws/services/sns.class.php on lines 121..146
                    core/model/aws/services/sqs.class.php on lines 167..192

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

                    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

                        public function revoke_security_group_egress($group_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['GroupId'] = $group_id;
                    
                    
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 1 hr to fix
                    core/model/aws/services/ec2.class.php on lines 437..452

                    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

                        public function authorize_security_group_egress($group_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['GroupId'] = $group_id;
                    
                    
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 1 other location - About 1 hr to fix
                    core/model/aws/services/ec2.class.php on lines 3426..3441

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

                        public function register_image($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 3 other locations - About 50 mins to fix
                    core/model/aws/services/ec2.class.php on lines 1770..1784
                    core/model/aws/services/ec2.class.php on lines 2593..2607
                    core/model/aws/services/ec2.class.php on lines 2952..2966

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

                    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

                        public function authorize_security_group_ingress($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 3 other locations - About 50 mins to fix
                    core/model/aws/services/ec2.class.php on lines 1770..1784
                    core/model/aws/services/ec2.class.php on lines 2952..2966
                    core/model/aws/services/ec2.class.php on lines 3988..4002

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

                    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

                        public function revoke_security_group_ingress($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 3 other locations - About 50 mins to fix
                    core/model/aws/services/ec2.class.php on lines 2593..2607
                    core/model/aws/services/ec2.class.php on lines 2952..2966
                    core/model/aws/services/ec2.class.php on lines 3988..4002

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

                    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

                        public function describe_tags($opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Optional parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 3 other locations - About 50 mins to fix
                    core/model/aws/services/ec2.class.php on lines 1770..1784
                    core/model/aws/services/ec2.class.php on lines 2593..2607
                    core/model/aws/services/ec2.class.php on lines 3988..4002

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

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

                        public function cancel_spot_instance_requests($spot_instance_request_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function monitor_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function terminate_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014

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

                        public function start_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function reboot_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function stop_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function unmonitor_instances($instance_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 750..760
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function create_dhcp_options($dhcp_configuration, $opt = null)
                        {
                            if (!$opt) $opt = array();
                    
                            // Required parameter
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 7 other locations - About 45 mins to fix
                    core/model/aws/services/ec2.class.php on lines 175..185
                    core/model/aws/services/ec2.class.php on lines 321..331
                    core/model/aws/services/ec2.class.php on lines 548..558
                    core/model/aws/services/ec2.class.php on lines 1584..1594
                    core/model/aws/services/ec2.class.php on lines 2472..2482
                    core/model/aws/services/ec2.class.php on lines 3004..3014
                    core/model/aws/services/ec2.class.php on lines 3113..3123

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

                        public function create_vpn_connection($type, $customer_gateway_id, $vpn_gateway_id, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['Type'] = $type;
                            $opt['CustomerGatewayId'] = $customer_gateway_id;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 16 other locations - About 30 mins to fix
                    core/model/aws/services/cloudwatch.class.php on lines 589..597
                    core/model/aws/services/ec2.class.php on lines 1077..1085
                    core/model/aws/services/ec2.class.php on lines 1928..1936
                    core/model/aws/services/ec2.class.php on lines 3382..3390
                    core/model/aws/services/elasticache.class.php on lines 206..214
                    core/model/aws/services/elasticache.class.php on lines 517..525
                    core/model/aws/services/elasticache.class.php on lines 567..575
                    core/model/aws/services/elb.class.php on lines 441..449
                    core/model/aws/services/elb.class.php on lines 502..510
                    core/model/aws/services/iam.class.php on lines 251..259
                    core/model/aws/services/iam.class.php on lines 542..550
                    core/model/aws/services/iam.class.php on lines 760..768
                    core/model/aws/services/importexport.class.php on lines 95..103
                    core/model/aws/services/rds.class.php on lines 368..376
                    core/model/aws/services/sns.class.php on lines 208..216
                    core/model/aws/services/sns.class.php on lines 230..238

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

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

                        public function delete_network_acl_entry($network_acl_id, $rule_number, $egress, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['NetworkAclId'] = $network_acl_id;
                            $opt['RuleNumber'] = $rule_number;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 16 other locations - About 30 mins to fix
                    core/model/aws/services/cloudwatch.class.php on lines 589..597
                    core/model/aws/services/ec2.class.php on lines 1077..1085
                    core/model/aws/services/ec2.class.php on lines 1928..1936
                    core/model/aws/services/ec2.class.php on lines 2028..2036
                    core/model/aws/services/elasticache.class.php on lines 206..214
                    core/model/aws/services/elasticache.class.php on lines 517..525
                    core/model/aws/services/elasticache.class.php on lines 567..575
                    core/model/aws/services/elb.class.php on lines 441..449
                    core/model/aws/services/elb.class.php on lines 502..510
                    core/model/aws/services/iam.class.php on lines 251..259
                    core/model/aws/services/iam.class.php on lines 542..550
                    core/model/aws/services/iam.class.php on lines 760..768
                    core/model/aws/services/importexport.class.php on lines 95..103
                    core/model/aws/services/rds.class.php on lines 368..376
                    core/model/aws/services/sns.class.php on lines 208..216
                    core/model/aws/services/sns.class.php on lines 230..238

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

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

                        public function attach_volume($volume_id, $instance_id, $device, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['VolumeId'] = $volume_id;
                            $opt['InstanceId'] = $instance_id;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 16 other locations - About 30 mins to fix
                    core/model/aws/services/cloudwatch.class.php on lines 589..597
                    core/model/aws/services/ec2.class.php on lines 1928..1936
                    core/model/aws/services/ec2.class.php on lines 2028..2036
                    core/model/aws/services/ec2.class.php on lines 3382..3390
                    core/model/aws/services/elasticache.class.php on lines 206..214
                    core/model/aws/services/elasticache.class.php on lines 517..525
                    core/model/aws/services/elasticache.class.php on lines 567..575
                    core/model/aws/services/elb.class.php on lines 441..449
                    core/model/aws/services/elb.class.php on lines 502..510
                    core/model/aws/services/iam.class.php on lines 251..259
                    core/model/aws/services/iam.class.php on lines 542..550
                    core/model/aws/services/iam.class.php on lines 760..768
                    core/model/aws/services/importexport.class.php on lines 95..103
                    core/model/aws/services/rds.class.php on lines 368..376
                    core/model/aws/services/sns.class.php on lines 208..216
                    core/model/aws/services/sns.class.php on lines 230..238

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

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

                        public function create_customer_gateway($type, $ip_address, $bgp_asn, $opt = null)
                        {
                            if (!$opt) $opt = array();
                            $opt['Type'] = $type;
                            $opt['IpAddress'] = $ip_address;
                    Severity: Major
                    Found in core/model/aws/services/ec2.class.php and 16 other locations - About 30 mins to fix
                    core/model/aws/services/cloudwatch.class.php on lines 589..597
                    core/model/aws/services/ec2.class.php on lines 1077..1085
                    core/model/aws/services/ec2.class.php on lines 2028..2036
                    core/model/aws/services/ec2.class.php on lines 3382..3390
                    core/model/aws/services/elasticache.class.php on lines 206..214
                    core/model/aws/services/elasticache.class.php on lines 517..525
                    core/model/aws/services/elasticache.class.php on lines 567..575
                    core/model/aws/services/elb.class.php on lines 441..449
                    core/model/aws/services/elb.class.php on lines 502..510
                    core/model/aws/services/iam.class.php on lines 251..259
                    core/model/aws/services/iam.class.php on lines 542..550
                    core/model/aws/services/iam.class.php on lines 760..768
                    core/model/aws/services/importexport.class.php on lines 95..103
                    core/model/aws/services/rds.class.php on lines 368..376
                    core/model/aws/services/sns.class.php on lines 208..216
                    core/model/aws/services/sns.class.php on lines 230..238

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

                    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

                    There are no issues that match your filters.

                    Category
                    Status