Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -16,14 +16,12 @@ trait EnvironmentWriterTrait
|
|||
/**
|
||||
* Update the .env file for the application using the passed in values.
|
||||
*
|
||||
* @param array $values
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\PterodactylException
|
||||
*/
|
||||
public function writeToEnvironment(array $values = [])
|
||||
{
|
||||
$path = base_path('.env');
|
||||
if (! file_exists($path)) {
|
||||
if (!file_exists($path)) {
|
||||
throw new PterodactylException('Cannot locate .env file, was this software installed correctly?');
|
||||
}
|
||||
|
||||
|
@ -33,7 +31,7 @@ trait EnvironmentWriterTrait
|
|||
// If the key value is not sorrounded by quotation marks, and contains anything that could reasonably
|
||||
// cause environment parsing issues, wrap it in quotes before writing it. This also adds slashes to the
|
||||
// value to ensure quotes within it don't cause us issues.
|
||||
if (! preg_match('/^\"(.*)\"$/', $value) && preg_match('/([^\w.\-+\/])+/', $value)) {
|
||||
if (!preg_match('/^\"(.*)\"$/', $value) && preg_match('/([^\w.\-+\/])+/', $value)) {
|
||||
$value = sprintf('"%s"', addslashes($value));
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue