Skip to content

Commit

Permalink
fix: end of line (tymondesigns#1832)
Browse files Browse the repository at this point in the history
* fix: noeol. close tymondesigns#1831

* fix: bad code comment
  • Loading branch information
shaunthegeek authored and tymondesigns committed Jul 9, 2019
1 parent 13e8ddc commit 85bb8d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Console/JWTGenerateSecretCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ public function handle()
}

if (Str::contains(file_get_contents($path), 'JWT_SECRET') === false) {
// update existing entry
file_put_contents($path, PHP_EOL."JWT_SECRET=$key", FILE_APPEND);
// create new entry
file_put_contents($path, PHP_EOL."JWT_SECRET=$key".PHP_EOL, FILE_APPEND);
} else {
if ($this->isConfirmed() === false) {
$this->comment('Phew... No changes were made to your secret key.');

return;
}

// create new entry
// update existing entry
file_put_contents($path, str_replace(
'JWT_SECRET='.$this->laravel['config']['jwt.secret'],
'JWT_SECRET='.$key, file_get_contents($path)
Expand Down

0 comments on commit 85bb8d6

Please sign in to comment.