diff --git a/src/Commands/Package/ComposerMakeCommand.php b/src/Commands/Package/ComposerMakeCommand.php index 94180b5..a28f6b8 100644 --- a/src/Commands/Package/ComposerMakeCommand.php +++ b/src/Commands/Package/ComposerMakeCommand.php @@ -55,7 +55,7 @@ public function handle() */ protected function getStub() { - return __DIR__ . '/stubs/composer.stub'; + return __DIR__.'/stubs/composer.stub'; } /** @@ -83,7 +83,7 @@ protected function getNameInput() */ protected function composerNamespace() { - return ucfirst($this->vendorName()) . '\\\\' . studly_case($this->packageName()) . '\\\\'; + return ucfirst($this->vendorName()).'\\\\'.studly_case($this->packageName()).'\\\\'; } /** @@ -91,7 +91,7 @@ protected function composerNamespace() */ protected function composerProviderNamespace() { - return $this->composerNamespace() . studly_case($this->packageName()) . 'ServiceProvider'; + return $this->composerNamespace().studly_case($this->packageName()).'ServiceProvider'; } /** diff --git a/src/Commands/PackageMakeCommand.php b/src/Commands/PackageMakeCommand.php index 0320f26..4bf248a 100644 --- a/src/Commands/PackageMakeCommand.php +++ b/src/Commands/PackageMakeCommand.php @@ -97,7 +97,7 @@ public function handle() { $this->checkForInputs(); - if (!$this->option('no-interaction') && !$this->confirm('Do you wish to continue?')) { + if (! $this->option('no-interaction') && ! $this->confirm('Do you wish to continue?')) { return $this->error('Canceled command!'); } @@ -118,12 +118,12 @@ public function handle() $this->call('package:save', [ 'namespace' => $this->rootNamespace(), - 'path' => $this->dir . $this->packageName, + 'path' => $this->dir.$this->packageName, ]); $this->callSilent('package:add', [ 'name' => $this->packageName, - 'path' => $this->dir . $this->packageName, + 'path' => $this->dir.$this->packageName, 'vendor' => $this->vendor, 'branch' => 'master', '--no-interaction' => true, @@ -252,7 +252,7 @@ protected function createServiceProvider() { $this->call('package:provider', array_merge( [ - 'name' => $this->packageName() . 'ServiceProvider', + 'name' => $this->packageName().'ServiceProvider', ], $this->packageOptions() )); @@ -267,7 +267,7 @@ protected function createBaseTestCase() { $this->call('package:basetest', array_merge( [ - 'provider' => $this->packageName() . 'ServiceProvider', + 'provider' => $this->packageName().'ServiceProvider', ], $this->packageOptions() )); @@ -291,7 +291,7 @@ protected function packageOptions() */ protected function rootNamespace() { - return ucfirst($this->vendor) . '\\' . $this->packageName(); + return ucfirst($this->vendor).'\\'.$this->packageName(); } /** @@ -319,7 +319,7 @@ protected function alreadyExists($path) */ protected function packagePath() { - return $this->getDirectoryInput() . $this->packageName; + return $this->getDirectoryInput().$this->packageName; } /** @@ -353,7 +353,7 @@ protected function getDirectoryInput() return $this->dir; } - if (!$this->dir = $this->argument('dir')) { + if (! $this->dir = $this->argument('dir')) { $this->dir = $this->anticipate('Where should the package be installed?', ['../packages/', 'packages/']); } @@ -371,7 +371,7 @@ public function getCopyrightInput() return $this->copyright; } - if (!$this->copyright = $this->argument('copyright')) { + if (! $this->copyright = $this->argument('copyright')) { $this->copyright = $this->ask('Who will hold the copyrights?'); } @@ -389,7 +389,7 @@ protected function getNameInput() return $this->packageName; } - if (!$this->packageName = trim($this->argument('name'))) { + if (! $this->packageName = trim($this->argument('name'))) { $this->packageName = $this->ask('What\'s your packages name?'); } @@ -407,7 +407,7 @@ protected function getVendorInput() return $this->vendor; } - if (!$this->vendor = trim($this->argument('vendor'))) { + if (! $this->vendor = trim($this->argument('vendor'))) { $this->vendor = $this->ask('What\'s the packages github name (vendor name of the package)?'); } @@ -425,7 +425,7 @@ public function getAuthorInput() return $this->author; } - if (!$this->author = $this->argument('author')) { + if (! $this->author = $this->argument('author')) { $this->author = $this->ask('Who is the author of the package?'); } @@ -443,7 +443,7 @@ public function getEmailInput() return $this->email; } - if (!$this->email = $this->argument('email')) { + if (! $this->email = $this->argument('email')) { $this->email = $this->ask('What\'s the mantainer\'s e-mail?'); } diff --git a/src/Traits/CreatesPackageStubs.php b/src/Traits/CreatesPackageStubs.php index 1f29e49..9310050 100644 --- a/src/Traits/CreatesPackageStubs.php +++ b/src/Traits/CreatesPackageStubs.php @@ -27,7 +27,7 @@ protected function getPath($name) { $name = str_replace_first($this->rootNamespace(), '', $name); - return $this->basePath() . str_replace('\\', '/', $name) . $this->getFileType(); + return $this->basePath().str_replace('\\', '/', $name).$this->getFileType(); } /** @@ -37,7 +37,7 @@ protected function getPath($name) */ protected function basePath() { - return base_path() . '/' . $this->resolveDirectory(); + return base_path().'/'.$this->resolveDirectory(); } /** @@ -109,7 +109,7 @@ protected function getNamespaceInput() { $namespace = trim($this->option('namespace')); - if (!$namespace && !$namespace = cache()->get('package:namespace')) { + if (! $namespace && ! $namespace = cache()->get('package:namespace')) { $namespace = $this->ask('What is the namespace of your package?'); } @@ -134,11 +134,11 @@ protected function getDirInput() { $dir = trim($this->option('dir')); - if (!$dir && !$dir = cache()->get('package:path')) { + if (! $dir && ! $dir = cache()->get('package:path')) { $dir = $this->ask('Where is your package stored (relative path)?'); } - return ends_with($dir, '/') ? $dir : $dir . '/'; + return ends_with($dir, '/') ? $dir : $dir.'/'; } /**