Skip to content

Commit

Permalink
Added an 'success' function to License
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercd100 committed Sep 18, 2017
1 parent c5ae65b commit 0dd1805
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `laravel-licenser` will be documented in this file.

### 3.2.0
- Added an 'success' function to License

### 3.1.0
- Added an 'error' function to License

Expand Down
17 changes: 15 additions & 2 deletions src/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,26 @@ final public function allocate($quantity, $add = false)
$this->add($quantity - $remaining);
}
}

$this->success($remaining, $quantity);
}

/**
* Called when there are enough licenses available
*
* @param int $quantity
* @return void
*/
protected function success($quantity)
{

}

/**
* Called when there are not enough licenses available
*
* @param [type] $remaining
* @param [type] $quantity
* @param int $remaining
* @param int $quantity
* @return void
*/
protected function error($remaining, $quantity)
Expand Down

0 comments on commit 0dd1805

Please sign in to comment.