Skip to content

Commit

Permalink
Save method now returns false if no elements mutated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edujugon committed Apr 12, 2017
1 parent 3d9b6f5 commit 5046a1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Services/ServiceCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function filter($callback)

/**
* Persist values in google.
* @return mixed
* @return false|mixed
*/
public function save()
{
Expand All @@ -129,6 +129,9 @@ public function save()
$operations[] = $operation;
});

if(empty($operations))
return false;

return $this->adWordsServices->mutate($operations);
}

Expand Down

0 comments on commit 5046a1c

Please sign in to comment.