Skip to content

Commit

Permalink
fix style ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alsofronie committed Dec 13, 2016
1 parent 76adc12 commit 592e25f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Illuminate/Routing/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Illuminate\Routing\Console;

use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Input\InputOption;

class ControllerMakeCommand extends GeneratorCommand
Expand Down Expand Up @@ -37,7 +37,7 @@ class ControllerMakeCommand extends GeneratorCommand
protected function getStub()
{
if ($this->option('model')) {
return __DIR__ . '/stubs/controller.model.stub';
return __DIR__.'/stubs/controller.model.stub';
} elseif ($this->option('resource')) {
return __DIR__.'/stubs/controller.stub';
}
Expand Down Expand Up @@ -70,18 +70,18 @@ protected function getOptions()
}

/**
* Parses the model namespace
* Parses the model namespace.
*
* @param string $modelNamespace
* @return string
*/
protected function parseModel($modelNamespace)
{
if (preg_match('([^A-Za-z0-9_/\\\\])', $modelNamespace)) {
$this->line("");
$this->error(" ");
$this->error(" Model name contains invalid characters ");
$this->error(" ");
$this->line('');
$this->error(' ');
$this->error(' Model name contains invalid characters ');
$this->error(' ');
exit(1);
}

Expand All @@ -92,8 +92,8 @@ protected function parseModel($modelNamespace)
$modelNamespace = trim($modelNamespace, '\\');
$rootNamespace = $this->laravel->getNamespace();

if (!Str::startsWith($modelNamespace, $rootNamespace)) {
$modelNamespace = $rootNamespace . $modelNamespace;
if (! Str::startsWith($modelNamespace, $rootNamespace)) {
$modelNamespace = $rootNamespace.$modelNamespace;
}

return $modelNamespace;
Expand Down

0 comments on commit 592e25f

Please sign in to comment.