| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 63 | private function makeSoap($type) |
||
| 64 | { |
||
| 65 | $soapClass = '\\Eduardokum\\CorreiosPhp\\Soap\\Soap' . ucfirst(strtolower($type)); |
||
| 66 | |||
| 67 | if (class_exists($soapClass) && !empty(trim($type))) { |
||
| 68 | $this->soap = new $soapClass(); |
||
| 69 | return $this->soap; |
||
| 70 | } |
||
| 71 | |||
| 72 | throw new InvalidSoapException("The type '$type' is not acceptable"); |
||
| 73 | } |
||
| 100 |