Skip to content

Commit a91d84e

Browse files
authored
Merge pull request pterodactyl#608 from Pterodactyl/feature/PTDL-472
Merge code refactor into develop.
2 parents b2429f1 + 1e1eac1 commit a91d84e

File tree

504 files changed

+22991
-7170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+22991
-7170
lines changed

.dev/vagrant/motd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ Default panel users:
1313

1414
MySQL is accessible using root/pterodactyl or pterodactyl/pterodactyl
1515

16-
Services for pteroq and mailhog are running
16+
Service for pteroq and mailhog are running
1717
#####################################################

.env.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ MAIL_PASSWORD=null
2424
MAIL_ENCRYPTION=null
2525
MAIL_FROM=you@example.com
2626

27-
API_PREFIX=api
28-
API_VERSION=v1
29-
API_DEBUG=false
30-
3127
QUEUE_DRIVER=database
3228
QUEUE_HIGH=high
3329
QUEUE_STANDARD=standard

.env.travis

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
APP_ENV=testing
2+
APP_DEBUG=true
3+
APP_KEY=SomeRandomString3232RandomString
4+
APP_THEME=pterodactyl
5+
APP_TIMEZONE=UTC
6+
APP_URL=http://localhost/
7+
8+
DB_HOST=127.0.0.1
9+
DB_DATABASE=travis
10+
DB_USERNAME=root
11+
DB_PASSWORD=""
12+
13+
CACHE_DRIVER=array
14+
SESSION_DRIVER=array
15+
MAIL_DRIVER=array
16+
QUEUE_DRIVER=sync

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ docker-compose.yml
2323
# for image related files
2424
misc
2525
.phpstorm.meta.php
26+
.php_cs.cache

.php_cs

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
<?php
22

3-
require_once __DIR__ . '/vendor/sllh/php-cs-fixer-styleci-bridge/autoload.php';
3+
$finder = PhpCsFixer\Finder::create()
4+
->in([
5+
'app',
6+
'bootstrap',
7+
'config',
8+
'database',
9+
'resources/lang',
10+
'routes',
11+
'tests',
12+
]);
413

5-
use SLLH\StyleCIBridge\ConfigBridge;
6-
7-
return ConfigBridge::create();
14+
return PhpCsFixer\Config::create()
15+
->setRules([
16+
'@Symfony' => true,
17+
'@PSR1' => true,
18+
'@PSR2' => true,
19+
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
20+
'array_syntax' => ['syntax' => 'short'],
21+
'blank_line_before_return' => true,
22+
'blank_line_before_statement' => false,
23+
'combine_consecutive_unsets' => true,
24+
'concat_space' => ['spacing' => 'one'],
25+
'declare_equal_normalize' => ['space' => 'single'],
26+
'heredoc_to_nowdoc' => true,
27+
'linebreak_after_opening_tag' => true,
28+
'new_with_braces' => false,
29+
'no_alias_functions' => true,
30+
'no_multiline_whitespace_before_semicolons' => true,
31+
'no_unreachable_default_argument_value' => true,
32+
'no_useless_return' => true,
33+
'not_operator_with_successor_space' => true,
34+
'phpdoc_align' => ['tags' => ['param']],
35+
'phpdoc_separation' => false,
36+
'protected_to_private' => false,
37+
'psr0' => ['dir' => 'app'],
38+
'psr4' => true,
39+
'random_api_migration' => true,
40+
'standardize_not_equals' => true,
41+
])->setRiskyAllowed(true)->setFinder($finder);

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ disabled:
44
- concat_without_spaces
55
enabled:
66
- concat_with_spaces
7+
- no_unused_imports

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: php
2+
dist: trusty
3+
php:
4+
- '7.0'
5+
- '7.1'
6+
- '7.2'
7+
sudo: false
8+
cache:
9+
directories:
10+
- $HOME/.composer/cache
11+
services:
12+
- mysql
13+
before_install:
14+
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
15+
before_script:
16+
- cp .env.travis .env
17+
- composer install --no-interaction --prefer-dist --no-suggest --verbose
18+
- php artisan migrate --seed -v
19+
script:
20+
- vendor/bin/phpunit --coverage-clover coverage.xml
21+
notifications:
22+
email: false
23+
after_success:
24+
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
246246
* New theme applied to Admin CP. Many graphical changes were made, some data was moved around and some display data changed. Too much was changed to feasibly log it all in here. Major breaking changes or notable new features will be logged.
247247
* New server creation page now makes significantly less AJAX calls and is much quicker to respond.
248248
* Server and Node view pages wee modified to split tabs into individual pages to make re-themeing and modifications significantly easier, and reduce MySQL query loads on page.
249-
* `[pre.4]`Services and Pack magement overhauled to be faster, cleaner, and more extensible in the future.
249+
* `[pre.4]`Service and Pack magement overhauled to be faster, cleaner, and more extensible in the future.
250250
* Most of the backend `UnhandledException` display errors now include a clearer error that directs admins to the program's logs.
251251
* Table seeders for services now can be run during upgrades and will attempt to locate and update, or create new if not found in the database.
252252
* Many structural changes to the database and `Pterodactyl\Models` classes that would flood this changelog if they were all included. All required migrations included to handle database changes.

app/Console/Commands/AddLocation.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class AddLocation extends Command
3131
{
3232
protected $data = [];
3333

34-
/**
35-
* The name and signature of the console command.
36-
*
37-
* @var string
38-
*/
39-
protected $signature = 'pterodactyl:location
34+
/**
35+
* The name and signature of the console command.
36+
*
37+
* @var string
38+
*/
39+
protected $signature = 'pterodactyl:location
4040
{--short= : The shortcode name of this location (ex. us1).}
4141
{--long= : A longer description of this location.}';
4242

@@ -49,8 +49,6 @@ class AddLocation extends Command
4949

5050
/**
5151
* Create a new command instance.
52-
*
53-
* @return void
5452
*/
5553
public function __construct()
5654
{

app/Console/Commands/AddNode.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class AddNode extends Command
5757

5858
/**
5959
* Create a new command instance.
60-
*
61-
* @return void
6260
*/
6361
public function __construct()
6462
{

0 commit comments

Comments
 (0)