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();
@@ 146-151 (lines=6) @@
143
        // if the body doesn't have needed fields, throw an exception
144
        $this->validateHasKeys($body, $needKeys);
145
146
        if (isset($body['BillingPlan'])) {
147
            $expected = ['Small', 'Medium', 'Large'];
148
            if (! in_array($body['BillingPlan'], $expected)) {
149
                throw new UnexpectedValueException('BillingPlan should be one of '.implode(', ', $expected));
150
            }
151
        }
152
153
        // make the URL for this request
154
        $url = $this->getBaseUrl();