Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -30,7 +30,6 @@ class FindAssignableAllocationService
|
|||
* no allocation can be found, a new one will be created with a random port between the defined
|
||||
* range from the configuration.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Pterodactyl\Models\Allocation
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -41,8 +40,8 @@ class FindAssignableAllocationService
|
|||
*/
|
||||
public function handle(Server $server)
|
||||
{
|
||||
if (! config('pterodactyl.client_features.allocations.enabled')) {
|
||||
throw new AutoAllocationNotEnabledException;
|
||||
if (!config('pterodactyl.client_features.allocations.enabled')) {
|
||||
throw new AutoAllocationNotEnabledException();
|
||||
}
|
||||
|
||||
// Attempt to find a given available allocation for a server. If one cannot be found
|
||||
|
@ -67,9 +66,6 @@ class FindAssignableAllocationService
|
|||
* in the settings. If there are no matches in that range, or something is wrong with the
|
||||
* range information provided an exception will be raised.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Pterodactyl\Models\Allocation
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException
|
||||
|
@ -81,8 +77,8 @@ class FindAssignableAllocationService
|
|||
$start = config('pterodactyl.client_features.allocations.range_start', null);
|
||||
$end = config('pterodactyl.client_features.allocations.range_end', null);
|
||||
|
||||
if (! $start || ! $end) {
|
||||
throw new NoAutoAllocationSpaceAvailableException;
|
||||
if (!$start || !$end) {
|
||||
throw new NoAutoAllocationSpaceAvailableException();
|
||||
}
|
||||
|
||||
Assert::integerish($start);
|
||||
|
@ -102,7 +98,7 @@ class FindAssignableAllocationService
|
|||
|
||||
// If we've already allocated all of the ports, just abort.
|
||||
if (empty($available)) {
|
||||
throw new NoAutoAllocationSpaceAvailableException;
|
||||
throw new NoAutoAllocationSpaceAvailableException();
|
||||
}
|
||||
|
||||
// Pick a random port out of the remaining available ports.
|
||||
|
|
Reference in a new issue