Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Apply fixes from StyleCI #43

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Commands/Package/ComposerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function handle()
*/
protected function getStub()
{
return __DIR__ . '/stubs/composer.stub';
return __DIR__.'/stubs/composer.stub';
}

/**
Expand Down Expand Up @@ -83,15 +83,15 @@ protected function getNameInput()
*/
protected function composerNamespace()
{
return ucfirst($this->vendorName()) . '\\\\' . studly_case($this->packageName()) . '\\\\';
return ucfirst($this->vendorName()).'\\\\'.studly_case($this->packageName()).'\\\\';
}

/**
* @return string
*/
protected function composerProviderNamespace()
{
return $this->composerNamespace() . studly_case($this->packageName()) . 'ServiceProvider';
return $this->composerNamespace().studly_case($this->packageName()).'ServiceProvider';
}

/**
Expand Down
26 changes: 13 additions & 13 deletions src/Commands/PackageMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
}

Expand All @@ -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,
Expand Down Expand Up @@ -252,7 +252,7 @@ protected function createServiceProvider()
{
$this->call('package:provider', array_merge(
[
'name' => $this->packageName() . 'ServiceProvider',
'name' => $this->packageName().'ServiceProvider',
],
$this->packageOptions()
));
Expand All @@ -267,7 +267,7 @@ protected function createBaseTestCase()
{
$this->call('package:basetest', array_merge(
[
'provider' => $this->packageName() . 'ServiceProvider',
'provider' => $this->packageName().'ServiceProvider',
],
$this->packageOptions()
));
Expand All @@ -291,7 +291,7 @@ protected function packageOptions()
*/
protected function rootNamespace()
{
return ucfirst($this->vendor) . '\\' . $this->packageName();
return ucfirst($this->vendor).'\\'.$this->packageName();
}

/**
Expand Down Expand Up @@ -319,7 +319,7 @@ protected function alreadyExists($path)
*/
protected function packagePath()
{
return $this->getDirectoryInput() . $this->packageName;
return $this->getDirectoryInput().$this->packageName;
}

/**
Expand Down Expand Up @@ -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/']);
}

Expand All @@ -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?');
}

Expand All @@ -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?');
}

Expand All @@ -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)?');
}

Expand All @@ -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?');
}

Expand All @@ -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?');
}

Expand Down
10 changes: 5 additions & 5 deletions src/Traits/CreatesPackageStubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -37,7 +37,7 @@ protected function getPath($name)
*/
protected function basePath()
{
return base_path() . '/' . $this->resolveDirectory();
return base_path().'/'.$this->resolveDirectory();
}

/**
Expand Down Expand Up @@ -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?');
}

Expand All @@ -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.'/';
}

/**
Expand Down