File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to ` laravel-licenser ` will be documented in this file.
44
5+ ### 1.0.2
6+ - Fixed adding or subtracting licenses by 0
7+
58### 1.0.1
69- Added publish option for older versions of Laravel.
710- Fixed setting a new value for the license amount.
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ abstract protected function subtracted();
139139 */
140140 final public function add ($ quantity = 1 )
141141 {
142- if (!is_int ($ quantity ) || $ quantity <= 0 ) {
142+ if (!is_int ($ quantity ) || $ quantity < 0 ) {
143143 throw new LicenseException ("Quantity must be a positive integer. " );
144144 }
145145
@@ -161,7 +161,7 @@ final public function add($quantity = 1)
161161 */
162162 final public function sub ($ quantity = 1 )
163163 {
164- if (!is_int ($ quantity ) || $ quantity <= 0 ) {
164+ if (!is_int ($ quantity ) || $ quantity < 0 ) {
165165 throw new LicenseException ("Quantity must be a positive integer. " );
166166 }
167167
@@ -187,7 +187,7 @@ final public function sub($quantity = 1)
187187 */
188188 final public function set ($ quantity )
189189 {
190- if (!is_int ($ quantity ) || $ quantity <= 0 ) {
190+ if (!is_int ($ quantity ) || $ quantity < 0 ) {
191191 throw new LicenseException ("Quantity must be a positive integer. " );
192192 }
193193
You can’t perform that action at this time.
0 commit comments