Code Duplication    Length = 6-6 lines in 2 locations

src/DocumentProvider.php 2 locations

@@ 113-118 (lines=6) @@
110
        // if the body doesn't have needed fields, throw an exception
111
        $this->validateHasKeys($body, $needKeys);
112
113
        if (isset($body['BillingPlan'])) {
114
            $expected = ['Small', 'Medium', 'Large'];
115
            if (! in_array($body['BillingPlan'], $expected)) {
116
                throw new UnexpectedValueException('BillingPlan should be one of '.implode(', ', $expected));
117
            }
118
        }
119
120
        // make the URL for this request
121
        $url = $this->getBaseUrl();
@@ 150-155 (lines=6) @@
147
        // if the body doesn't have needed fields, throw an exception
148
        $this->validateHasKeys($body, $needKeys);
149
150
        if (isset($body['BillingPlan'])) {
151
            $expected = ['Small', 'Medium', 'Large'];
152
            if (! in_array($body['BillingPlan'], $expected)) {
153
                throw new UnexpectedValueException('BillingPlan should be one of '.implode(', ', $expected));
154
            }
155
        }
156
157
        // make the URL for this request
158
        $url = $this->getBaseUrl();