@@ -4,13 +4,13 @@ |
||
4 | 4 | |
5 | 5 | class Salesforce extends Facade |
6 | 6 | { |
7 | - /** |
|
8 | - * Get the registered name of the component. |
|
9 | - * |
|
10 | - * @return string |
|
11 | - */ |
|
12 | - protected static function getFacadeAccessor() |
|
13 | - { |
|
14 | - return 'salesforce'; |
|
15 | - } |
|
7 | + /** |
|
8 | + * Get the registered name of the component. |
|
9 | + * |
|
10 | + * @return string |
|
11 | + */ |
|
12 | + protected static function getFacadeAccessor() |
|
13 | + { |
|
14 | + return 'salesforce'; |
|
15 | + } |
|
16 | 16 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | return array( |
3 | 3 | |
4 | - /* |
|
4 | + /* |
|
5 | 5 | |-------------------------------------------------------------------------- |
6 | 6 | | Your Salesforce credentials |
7 | 7 | |-------------------------------------------------------------------------- |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | | |
10 | 10 | */ |
11 | 11 | |
12 | - // production |
|
13 | - 'username' => '', |
|
14 | - 'password' => '', |
|
15 | - 'token' => '', |
|
16 | - 'wsdl' => app_path() . '/wsdl/enterprise.wsdl.xml', |
|
12 | + // production |
|
13 | + 'username' => '', |
|
14 | + 'password' => '', |
|
15 | + 'token' => '', |
|
16 | + 'wsdl' => app_path() . '/wsdl/enterprise.wsdl.xml', |
|
17 | 17 | ); |
@@ -13,5 +13,5 @@ |
||
13 | 13 | 'username' => '', |
14 | 14 | 'password' => '', |
15 | 15 | 'token' => '', |
16 | - 'wsdl' => app_path() . '/wsdl/enterprise.wsdl.xml', |
|
16 | + 'wsdl' => app_path().'/wsdl/enterprise.wsdl.xml', |
|
17 | 17 | ); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | return array( |
3 | 3 | |
4 | - /* |
|
4 | + /* |
|
5 | 5 | |-------------------------------------------------------------------------- |
6 | 6 | | Your Salesforce credentials |
7 | 7 | |-------------------------------------------------------------------------- |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // sandbox |
13 | - 'username' => '', |
|
14 | - 'password' => '', |
|
15 | - 'token' => '', |
|
16 | - 'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml', |
|
13 | + 'username' => '', |
|
14 | + 'password' => '', |
|
15 | + 'token' => '', |
|
16 | + 'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml', |
|
17 | 17 | ); |
@@ -13,5 +13,5 @@ |
||
13 | 13 | 'username' => '', |
14 | 14 | 'password' => '', |
15 | 15 | 'token' => '', |
16 | - 'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml', |
|
16 | + 'wsdl' => app_path().'/wsdl/enterprise.sandbox.wsdl.xml', |
|
17 | 17 | ); |
@@ -10,46 +10,46 @@ |
||
10 | 10 | */ |
11 | 11 | class LaravelSalesforceServiceProvider extends ServiceProvider |
12 | 12 | { |
13 | - /** |
|
14 | - * Indicates if loading of the provider is deferred. |
|
15 | - * |
|
16 | - * @var bool |
|
17 | - */ |
|
18 | - protected $defer = true; |
|
13 | + /** |
|
14 | + * Indicates if loading of the provider is deferred. |
|
15 | + * |
|
16 | + * @var bool |
|
17 | + */ |
|
18 | + protected $defer = true; |
|
19 | 19 | |
20 | - /** |
|
21 | - * Bootstrap the application events. |
|
22 | - * |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function boot() |
|
26 | - { |
|
27 | - $this->package('davispeixoto/laravel-salesforce'); |
|
28 | - } |
|
20 | + /** |
|
21 | + * Bootstrap the application events. |
|
22 | + * |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function boot() |
|
26 | + { |
|
27 | + $this->package('davispeixoto/laravel-salesforce'); |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * Register the service provider. |
|
32 | - * |
|
33 | - * @return void |
|
34 | - */ |
|
35 | - public function register() |
|
36 | - { |
|
37 | - $this->app->singleton('salesforce', function ($app) { |
|
38 | - $sf = new Salesforce(new Client()); |
|
39 | - $sf->connect($app['config']); |
|
30 | + /** |
|
31 | + * Register the service provider. |
|
32 | + * |
|
33 | + * @return void |
|
34 | + */ |
|
35 | + public function register() |
|
36 | + { |
|
37 | + $this->app->singleton('salesforce', function ($app) { |
|
38 | + $sf = new Salesforce(new Client()); |
|
39 | + $sf->connect($app['config']); |
|
40 | 40 | |
41 | - return $sf; |
|
42 | - }); |
|
43 | - } |
|
41 | + return $sf; |
|
42 | + }); |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Get the services provided by the provider. |
|
47 | - * |
|
48 | - * @return array |
|
49 | - */ |
|
50 | - public function provides() |
|
51 | - { |
|
52 | - return array('salesforce'); |
|
53 | - } |
|
45 | + /** |
|
46 | + * Get the services provided by the provider. |
|
47 | + * |
|
48 | + * @return array |
|
49 | + */ |
|
50 | + public function provides() |
|
51 | + { |
|
52 | + return array('salesforce'); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
37 | - $this->app->singleton('salesforce', function ($app) { |
|
37 | + $this->app->singleton('salesforce', function($app) { |
|
38 | 38 | $sf = new Salesforce(new Client()); |
39 | 39 | $sf->connect($app['config']); |
40 | 40 |
@@ -14,69 +14,69 @@ |
||
14 | 14 | */ |
15 | 15 | class Salesforce |
16 | 16 | { |
17 | - /** |
|
18 | - * @var Client $sfh The Salesforce Handler |
|
19 | - */ |
|
20 | - public $sfh; |
|
17 | + /** |
|
18 | + * @var Client $sfh The Salesforce Handler |
|
19 | + */ |
|
20 | + public $sfh; |
|
21 | 21 | |
22 | - /** |
|
23 | - * Salesforce constructor. |
|
24 | - * |
|
25 | - * @param Client $sfh |
|
26 | - * @throws SalesforceException |
|
27 | - */ |
|
28 | - public function __construct(Client $sfh) |
|
29 | - { |
|
30 | - $this->sfh = $sfh; |
|
31 | - } |
|
22 | + /** |
|
23 | + * Salesforce constructor. |
|
24 | + * |
|
25 | + * @param Client $sfh |
|
26 | + * @throws SalesforceException |
|
27 | + */ |
|
28 | + public function __construct(Client $sfh) |
|
29 | + { |
|
30 | + $this->sfh = $sfh; |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * @param $method |
|
35 | - * @param $args |
|
36 | - * @return mixed |
|
37 | - */ |
|
38 | - public function __call($method, $args) |
|
39 | - { |
|
40 | - return call_user_func_array(array($this->sfh, $method), $args); |
|
41 | - } |
|
33 | + /** |
|
34 | + * @param $method |
|
35 | + * @param $args |
|
36 | + * @return mixed |
|
37 | + */ |
|
38 | + public function __call($method, $args) |
|
39 | + { |
|
40 | + return call_user_func_array(array($this->sfh, $method), $args); |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * Authenticates into Salesforce according to |
|
45 | - * the provided credentials and WSDL file |
|
46 | - * |
|
47 | - * @param $configExternal |
|
48 | - * @throws SalesforceException |
|
49 | - */ |
|
43 | + /** |
|
44 | + * Authenticates into Salesforce according to |
|
45 | + * the provided credentials and WSDL file |
|
46 | + * |
|
47 | + * @param $configExternal |
|
48 | + * @throws SalesforceException |
|
49 | + */ |
|
50 | 50 | |
51 | - public function connect($configExternal) |
|
52 | - { |
|
53 | - $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
|
51 | + public function connect($configExternal) |
|
52 | + { |
|
53 | + $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
|
54 | 54 | |
55 | - if (empty($wsdl)) { |
|
56 | - $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
|
57 | - } |
|
55 | + if (empty($wsdl)) { |
|
56 | + $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
|
57 | + } |
|
58 | 58 | |
59 | - $username = $configExternal->get('laravel-salesforce::username'); |
|
60 | - $password = $configExternal->get('laravel-salesforce::password'); |
|
61 | - $token = $configExternal->get('laravel-salesforce::token'); |
|
59 | + $username = $configExternal->get('laravel-salesforce::username'); |
|
60 | + $password = $configExternal->get('laravel-salesforce::password'); |
|
61 | + $token = $configExternal->get('laravel-salesforce::token'); |
|
62 | 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 | - } |
|
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 | 70 | |
71 | - /* |
|
71 | + /* |
|
72 | 72 | * Debugging functions |
73 | 73 | */ |
74 | 74 | |
75 | - /** |
|
76 | - * @return mixed |
|
77 | - */ |
|
78 | - public function dump() |
|
79 | - { |
|
80 | - return print_r($this, true); |
|
81 | - } |
|
75 | + /** |
|
76 | + * @return mixed |
|
77 | + */ |
|
78 | + public function dump() |
|
79 | + { |
|
80 | + return print_r($this, true); |
|
81 | + } |
|
82 | 82 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
54 | 54 | |
55 | 55 | if (empty($wsdl)) { |
56 | - $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
|
56 | + $wsdl = __DIR__.'/Wsdl/enterprise.wsdl.xml'; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | $username = $configExternal->get('laravel-salesforce::username'); |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | |
63 | 63 | try { |
64 | 64 | $this->sfh->createConnection($wsdl); |
65 | - $this->sfh->login($username, $password . $token); |
|
65 | + $this->sfh->login($username, $password.$token); |
|
66 | 66 | } catch (Exception $e) { |
67 | - throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); |
|
67 | + throw new SalesforceException('Exception at Constructor'.$e->getMessage()."\n\n".$e->getTraceAsString()); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 |