mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Apply fixes from StyleCI (#331)
This commit is contained in:
@@ -179,7 +179,7 @@ class NodeRepository
|
||||
|
||||
/**
|
||||
* Adds allocations to a provided node.
|
||||
* @param integer $id
|
||||
* @param int $id
|
||||
* @param array $data
|
||||
*/
|
||||
public function addAllocations($id, array $data)
|
||||
@@ -204,7 +204,7 @@ class NodeRepository
|
||||
}
|
||||
|
||||
DB::transaction(function () use ($parsed, $node, $data) {
|
||||
foreach(Network::parse(gethostbyname($data['allocation_ip'])) as $ip) {
|
||||
foreach (Network::parse(gethostbyname($data['allocation_ip'])) as $ip) {
|
||||
foreach ($data['allocation_ports'] as $port) {
|
||||
// Determine if this is a valid single port, or a valid port range.
|
||||
if (! ctype_digit($port) && ! preg_match('/^(\d{1,5})-(\d{1,5})$/', $port)) {
|
||||
|
||||
@@ -354,7 +354,7 @@ class ServerRepository
|
||||
$validator = Validator::make($data, [
|
||||
'owner_id' => 'sometimes|required|numeric|exists:users,id',
|
||||
'name' => 'sometimes|required|regex:([\w .-]{1,200})',
|
||||
'reset_token' => 'sometimes|required|accepted'
|
||||
'reset_token' => 'sometimes|required|accepted',
|
||||
]);
|
||||
|
||||
// Run validator, throw catchable and displayable exception if it fails.
|
||||
|
||||
Reference in New Issue
Block a user