Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 8, 2017
1 parent 2ed02d4 commit 7839ef6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Console/KeyGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function fire()
protected function setKeyInEnvironmentFile($key)
{
file_put_contents($this->laravel->environmentFilePath(), preg_replace(
$this->getAppKeyPattern(),
$this->keyReplacementPattern(),
'APP_KEY='.$key,
file_get_contents($this->laravel->environmentFilePath())
));
Expand All @@ -75,10 +75,10 @@ protected function generateRandomKey()
*
* @return string
*/
protected function getAppKeyPattern()
protected function keyReplacementPattern()
{
$escapedKey = preg_quote('='.$this->laravel['config']['app.key'], '/');
$escaped = preg_quote('='.$this->laravel['config']['app.key'], '/');

return "/^APP_KEY$escapedKey/m";
return "/^APP_KEY{$escaped}/m";
}
}

0 comments on commit 7839ef6

Please sign in to comment.