Skip to content

Commit

Permalink
Merge pull request #6 from DCzajkowski/analysis-86gpV4
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
DCzajkowski authored Nov 16, 2017
2 parents e328b07 + 77d90f6 commit fbb31e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Console/Commands/AuthTestsMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public function publishStub($stubPath, $destinationTest)
*
* @return string
*/
public function snakeCase($stub) {
public function snakeCase($stub)
{
return preg_replace_callback('/ public function test.+/', function ($matches) {
return strtolower(preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', '_$0', $matches[0])));
}, $stub);
Expand All @@ -127,7 +128,8 @@ public function snakeCase($stub) {
*
* @return string
*/
public function annotate($stub) {
public function annotate($stub)
{
return str_replace('function _', 'function ', preg_replace_callback('/ public function test./', function ($matches) {
return ' /** @test */' . PHP_EOL . ' public function ' . strtolower($matches[0][-1]);
}, $stub));
Expand Down

0 comments on commit fbb31e0

Please sign in to comment.