| Conditions | 3 |
| Paths | 6 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php namespace Davispeixoto\LaravelSalesforce; |
||
| 51 | public function connect($configExternal) |
||
| 52 | { |
||
| 53 | $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
||
| 54 | |||
| 55 | if (empty($wsdl)) { |
||
| 56 | $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
||
| 57 | } |
||
| 58 | |||
| 59 | $username = $configExternal->get('laravel-salesforce::username'); |
||
| 60 | $password = $configExternal->get('laravel-salesforce::password'); |
||
| 61 | $token = $configExternal->get('laravel-salesforce::token'); |
||
| 62 | |||
| 63 | try { |
||
| 64 | $this->sfh->createConnection($wsdl); |
||
| 65 | $this->sfh->login($username, $password . $token); |
||
| 66 | } catch (Exception $e) { |
||
| 67 | throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); |
||
| 68 | } |
||
| 69 | } |
||
| 70 | |||
| 83 |