Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -3,21 +3,19 @@
|
|||
namespace Pterodactyl\Models;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $node_id
|
||||
* @property string $ip
|
||||
* @property string|null $ip_alias
|
||||
* @property int $port
|
||||
* @property int|null $server_id
|
||||
* @property string|null $notes
|
||||
* @property \Carbon\Carbon|null $created_at
|
||||
* @property \Carbon\Carbon|null $updated_at
|
||||
*
|
||||
* @property string $alias
|
||||
* @property bool $has_alias
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $node_id
|
||||
* @property string $ip
|
||||
* @property string|null $ip_alias
|
||||
* @property int $port
|
||||
* @property int|null $server_id
|
||||
* @property string|null $notes
|
||||
* @property \Carbon\Carbon|null $created_at
|
||||
* @property \Carbon\Carbon|null $updated_at
|
||||
* @property string $alias
|
||||
* @property bool $has_alias
|
||||
* @property \Pterodactyl\Models\Server|null $server
|
||||
* @property \Pterodactyl\Models\Node $node
|
||||
* @property \Pterodactyl\Models\Node $node
|
||||
*/
|
||||
class Allocation extends Model
|
||||
{
|
||||
|
@ -25,7 +23,7 @@ class Allocation extends Model
|
|||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
*/
|
||||
const RESOURCE_NAME = 'allocation';
|
||||
public const RESOURCE_NAME = 'allocation';
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
|
@ -78,6 +76,7 @@ class Allocation extends Model
|
|||
* Accessor to automatically provide the IP alias if defined.
|
||||
*
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAliasAttribute($value)
|
||||
|
@ -89,11 +88,12 @@ class Allocation extends Model
|
|||
* Accessor to quickly determine if this allocation has an alias.
|
||||
*
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getHasAliasAttribute($value)
|
||||
{
|
||||
return ! is_null($this->ip_alias);
|
||||
return !is_null($this->ip_alias);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue