Code Duplication    Length = 5-5 lines in 2 locations

src/BaseLinodeApi.php 2 locations

@@ 71-75 (lines=5) @@
68
69
            $query = ['api_action' => $action];
70
71
            foreach ($parameters as $key => $value) {
72
                if ($value !== null) {
73
                    $query[urlencode($key)] = urlencode($value);
74
                }
75
            }
76
77
            $this->batch->addRequest($query);
78
@@ 90-94 (lines=5) @@
87
88
        $query = "api_key={$this->key}&api_action={$action}";
89
90
        foreach ($parameters as $key => $value) {
91
            if ($value !== null) {
92
                $query .= sprintf('&%s=%s', urlencode($key), urlencode($value));
93
            }
94
        }
95
96
        if ($this->debug) {
97
            return $query;