hnhdigital-os/php-linode-api

View on GitHub
src/endpoints/Linode/Instance.php

Summary

Maintainability
A
2 hrs
Test Coverage

The class Instance has 17 public methods. Consider refactoring Instance to keep number of public methods under 10.
Open

class Instance extends Base
{
    /**
     * Endpoint.
     *
Severity: Minor
Found in src/endpoints/Linode/Instance.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

Instance has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class Instance extends Base
{
    /**
     * Endpoint.
     *
Severity: Minor
Found in src/endpoints/Linode/Instance.php - About 2 hrs to fix

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid using undefined variables such as '$linode_id' which will lead to PHP notices.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$linode_id'.
    Open

                'linode_id' => $linode_id,
    Severity: Minor
    Found in src/endpoints/Linode/Instance.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Line exceeds 120 characters; contains 127 characters
    Open

         * this request to complete successfully, your User must have the `add_linodes` grant. Cloning to a new Linode will incur a

    Line exceeds 120 characters; contains 125 characters
    Open

         * If cloning to an existing Linode, any actions currently running or queued must be completed first before you can clone

    Line exceeds 120 characters; contains 123 characters
    Open

         *  If you already have a snapshot of this Linode, this is a destructive action. The previous snapshot will be deleted.

    Line exceeds 120 characters; contains 126 characters
    Open

         * If any actions are currently running or queued, those actions must be completed first before you can initiate a mutate.

    Line exceeds 120 characters; contains 121 characters
    Open

         * Resizes a Linode you have the `read_write` permission to a different Type. If any actions are currently running or

    Line exceeds 120 characters; contains 127 characters
    Open

         * Rescue Mode is a safe environment for performing many system recovery and disk management tasks. Rescue Mode is based on

    Line exceeds 120 characters; contains 125 characters
    Open

         * tasks other than disaster recovery, such as formatting disks to use different filesystems, copying data between disks,

    Line exceeds 120 characters; contains 127 characters
    Open

         * list of available public images, or use one of your own), and optionally provide a StackScript to deploy with this Disk.

    Line exceeds 120 characters; contains 123 characters
    Open

         * queued, those actions must be completed first before you can initiate a resize. Additionally, the following criteria

    Line exceeds 120 characters; contains 123 characters
    Open

         * You can clone your Linode's existing Disks or Configuration profiles to another Linode on your Account. In order for

    Line exceeds 120 characters; contains 124 characters
    Open

         * incur an additional monthly charge. If you need an additional public IP Address you must request one - please [open a

    Line exceeds 120 characters; contains 127 characters
    Open

         * Shuts down a Linode you have permission to modify. If any actions are currently running or queued, those actions must be

    Line exceeds 120 characters; contains 126 characters
    Open

         * Adds a new Disk to a Linode. You can optionally create a Disk from an Image (see [/images](/#operation/getImages) for a

    Line exceeds 120 characters; contains 124 characters
    Open

         * Allocates a public or private IPv4 address to a Linode. Public IP Addresses, after the one included with each Linode,

    Line exceeds 120 characters; contains 126 characters
    Open

         * Linodes created with now-deprecated Types are entitled to a free upgrade to the next generation. A mutating Linode will

    Line exceeds 120 characters; contains 123 characters
    Open

         * the Finnix recovery distribution, a self-contained and bootable Linux distribution. You can also use Rescue Mode for

    Line exceeds 120 characters; contains 124 characters
    Open

         * Reboots a Linode you have permission to modify. If any actions are currently running or queued, those actions must be

    Line exceeds 120 characters; contains 126 characters
    Open

         * A rebuild will first shut down the Linode, delete all disks and configs on the Linode, and then deploy a new `image` to

    There are no issues that match your filters.

    Category
    Status