1 | <?php |
||
7 | trait HasLicenses |
||
8 | { |
||
9 | /** |
||
10 | * Attempt to allocate unused licenses. |
||
11 | * |
||
12 | * @param string $class The License class you want to work with |
||
13 | * @param int $quantity The amount of licenses you want to attempt to use |
||
14 | * @param boolean $add If true then it will increase the maximum available licenses |
||
15 | * @return self |
||
16 | */ |
||
17 | public function licensesAllocate($class, $quantity, $add = false) |
||
23 | |||
24 | /** |
||
25 | * Attempt to Deallocate used licenses. |
||
26 | * |
||
27 | * @param string $class The License class you want to work with |
||
28 | * @param int $quantity The amount of licenses you want to attempt to use |
||
29 | * @param boolean $add If true then it will increase the maximum available licenses |
||
|
|||
30 | * @return self |
||
31 | */ |
||
32 | public function licensesDeallocate($class, $quantity, $sub = false) |
||
38 | |||
39 | /** |
||
40 | * Returns the amount of unused licenses. |
||
41 | * |
||
42 | * @param string $class The License class you want to work with |
||
43 | * @return int |
||
44 | */ |
||
45 | public function licensesRemaining($class) |
||
50 | |||
51 | /** |
||
52 | * Returns the amount of used licenses |
||
53 | * |
||
54 | * @param string $class The License class you want to work with |
||
55 | * @return int |
||
56 | */ |
||
57 | public function licensesUsed($class) |
||
62 | |||
63 | /** |
||
64 | * Increase the maximum amount of licenses |
||
65 | * |
||
66 | * @param string $class The License class you want to work with |
||
67 | * @param integer $quantity |
||
68 | * @return self |
||
69 | */ |
||
70 | public function licensesAdd($class, $quantity = 1) |
||
77 | |||
78 | /** |
||
79 | * Decreases the maximum amount of licenses available |
||
80 | * |
||
81 | * @param string $class The License class you want to work with |
||
82 | * @param integer $quantity |
||
83 | * @return self |
||
84 | */ |
||
85 | public function licensesSub($class, $quantity = 1) |
||
92 | |||
93 | /** |
||
94 | * Sets the maximum amount of licenses to a specific value |
||
95 | * |
||
96 | * @param string $class The License class you want to work with |
||
97 | * @param integer $quantity |
||
98 | * @return self |
||
99 | */ |
||
100 | public function licensesSet($class, $quantity) |
||
107 | |||
108 | /** |
||
109 | * Creates an instance of License from the supplied classname string |
||
110 | * |
||
111 | * @param string $class The License class you want to work with |
||
112 | * @return License |
||
113 | */ |
||
114 | private function getLicenseInstance($class) |
||
122 | } |
||
123 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.