Skip to content

Commit

Permalink
Merge pull request #2 from hexadog/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gaetan-hexadog authored Jun 16, 2021
2 parents 3885271 + 24e4c8b commit 0c6b141
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'concat_space' => [
'spacing' => 'one'
]
])
->setFinder($finder);
10 changes: 4 additions & 6 deletions src/Providers/PackageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PackageServiceProvider extends ServiceProvider
/**
* Our root directory for this package to make traversal easier.
*/
public const PACKAGE_DIR = __DIR__.'/../../';
public const PACKAGE_DIR = __DIR__ . '/../../';

/**
* Name for this package to publish assets.
Expand All @@ -23,8 +23,6 @@ class PackageServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->loadViewsFrom($this->getPath('resources/views'), $this->getNormalizedNamespace());

$this->strapPublishers();
}

Expand All @@ -48,7 +46,7 @@ protected function getPath($path = '')
// We get the child class
$rc = new ReflectionClass(get_class($this));

return dirname($rc->getFileName()).'/../../'.$path;
return dirname($rc->getFileName()) . '/../../' . $path;
}

/**
Expand Down Expand Up @@ -82,7 +80,7 @@ protected function strapPublishers(): void
$configPath = $this->getPath('config');

$this->publishes([
"{$configPath}/config.php" => config_path($this->getNormalizedNamespace().'.php'),
], $this->getNormalizedNamespace().'-config');
"{$configPath}/config.php" => config_path($this->getNormalizedNamespace() . '.php'),
], $this->getNormalizedNamespace() . '-config');
}
}

0 comments on commit 0c6b141

Please sign in to comment.