Apply fixes from StyleCI

This commit is contained in:
Dane Everitt 2016-12-07 22:46:38 +00:00 committed by StyleCI Bot
parent a1d3bbf73d
commit c1fb0a665f
150 changed files with 1558 additions and 1760 deletions

View file

@ -1,7 +1,7 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -21,10 +21,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
namespace Pterodactyl\Repositories;
class HelperRepository {
class HelperRepository
{
/**
* Listing of editable files in the control panel.
* @var array
@ -40,10 +41,9 @@ class HelperRepository {
'text/plain',
'text/x-perl',
'text/x-shellscript',
'inode/x-empty'
'inode/x-empty',
];
public function __construct()
{
//
@ -58,17 +58,14 @@ class HelperRepository {
*/
public static function bytesToHuman($bytes, $decimals = 2)
{
$sz = explode(',', 'B,KB,MB,GB');
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)).' '.$sz[$factor];
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . $sz[$factor];
}
public static function editableFiles()
{
return self::$editable;
}
}