Skip to content

Commit

Permalink
Merge branch 'release/0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Dec 29, 2016
2 parents b30df77 + 35341fc commit db86908
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/Providers/LaravelFacebookServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,18 @@ public function boot()
public function register()
{
$this->app->bind(LaravelFacebookAdsContract::class, function ($app) {
return $this->createInstance($app);
return $this->createInstance();
});

$this->app->singleton('facebook-ads', function ($app) {
return $this->createInstance($app);
return $this->createInstance();
});
}

/**
* @param $app
*
* @return FacebookAds
*/
protected function createInstance($app)
protected function createInstance()
{
return new FacebookAds(
(new AdAccounts()),
Expand Down
8 changes: 4 additions & 4 deletions src/Services/AdAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Edbizarro\LaravelFacebookAds\Services;

use FacebookAds\Object\AdUser;
use FacebookAds\Object\AdAccount;
use Illuminate\Support\Collection;
use FacebookAds\Object\AdAccountUser;
use FacebookAds\Object\AdUser;
use Illuminate\Support\Collection;

/**
* Class AdAccounts.
Expand Down Expand Up @@ -53,7 +53,7 @@ public function getAds($accountId, $fields = [])
*
* @deprecated use getAccountUser instead
*/
private function getUser($userId = 'me')
protected function getUser($userId = 'me')
{
return new AdUser($userId);
}
Expand All @@ -63,7 +63,7 @@ private function getUser($userId = 'me')
*
* @return AdAccountUser
*/
private function getAccountUser($accountUserId = 'me')
protected function getAccountUser($accountUserId = 'me')
{
return new AdAccountUser($accountUserId);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Services/Insights/AdInsights.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function getInsights($objectId, $params = [])
$fields = $params['fields'];
unset($params['fields']);

$ad = new Ad($objectId);
$insights = $ad->getInsights($fields, $params);
$adObject = new Ad($objectId);
$insights = $adObject->getInsights($fields, $params);

return $this->response($insights);
}
Expand Down

0 comments on commit db86908

Please sign in to comment.