Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
svenluijten committed Aug 16, 2020
1 parent ef85a07 commit 62b7d69
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Commands/DeleteEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Commands;

use Sven\FlexEnv\Env;
use Illuminate\Console\Command;
use Sven\FlexEnv\Env;

class DeleteEnv extends Command
{
Expand Down Expand Up @@ -33,7 +33,7 @@ public function handle()

$result = $env->delete($key)->get($key);

if ($result !== '' && ! is_null($result)) {
if ($result !== '' && !is_null($result)) {
$env->rollback();

return $this->comment("No value was found for \"$key\" in the .env file, nothing was changed.");
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/ExampleEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Commands;

use Sven\FlexEnv\Env;
use Illuminate\Console\Command;
use Sven\FlexEnv\Env;

class ExampleEnv extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/GetEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Commands;

use Sven\FlexEnv\Env;
use Illuminate\Console\Command;
use Sven\FlexEnv\Env;

class GetEnv extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/ListEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Commands;

use Sven\FlexEnv\Env;
use Illuminate\Console\Command;
use Sven\FlexEnv\Env;

class ListEnv extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/SetEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Commands;

use Sven\FlexEnv\Env;
use Illuminate\Console\Command;
use Sven\FlexEnv\Env;

class SetEnv extends Command
{
Expand Down
6 changes: 3 additions & 3 deletions src/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Env
*/
public function __construct($path)
{
if (! file_exists($path)) {
if (!file_exists($path)) {
file_put_contents($path, '');
}

Expand Down Expand Up @@ -67,13 +67,13 @@ public function set($key, $value, $linebreak = false)
{
$oldValue = $this->get($key);

if (! preg_match('/\d/', $value) || preg_match('/=/', $value)) {
if (!preg_match('/\d/', $value) || preg_match('/=/', $value)) {
$value = "\"$value\"";
}

$new = $linebreak ? "\n$key=$value" : "$key=$value";

if (! is_null($oldValue)) {
if (!is_null($oldValue)) {
return $this->replaceInFile("$key=$oldValue", $new);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/EnvTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Sven\FlexEnv\Tests;

use Sven\FlexEnv\Env;
use GrahamCampbell\TestBench\AbstractPackageTestCase;
use Sven\FlexEnv\Env;

abstract class EnvTestCase extends AbstractPackageTestCase
{
Expand Down

0 comments on commit 62b7d69

Please sign in to comment.