Skip to content

Commit

Permalink
refactor(core)!: ProviderWith* traits moved into `LastDragon_ru\Lar…
Browse files Browse the repository at this point in the history
…aASP\Core\Provider\With*`.
  • Loading branch information
LastDragon-ru committed Aug 28, 2023
1 parent 321eab4 commit 39b2b22
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Core\Concerns;
namespace LastDragon_ru\LaraASP\Core\Provider;

use Closure;
use Illuminate\Foundation\Application;
Expand All @@ -13,7 +13,7 @@
/**
* @mixin ServiceProvider
*/
trait ProviderHelper {
trait Helper {
/**
* Should return the name of the package.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Core\Concerns;
namespace LastDragon_ru\LaraASP\Core\Provider;

use Illuminate\Contracts\Foundation\CachesConfiguration;
use Illuminate\Support\ServiceProvider;
Expand All @@ -11,8 +11,8 @@
/**
* @mixin ServiceProvider
*/
trait ProviderWithConfig {
use ProviderHelper;
trait WithConfig {
use Helper;

protected function bootConfig(): void {
$package = $this->getName();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Core\Concerns;
namespace LastDragon_ru\LaraASP\Core\Provider;

use Illuminate\Support\ServiceProvider;

/**
* @mixin ServiceProvider
*/
trait ProviderWithRoutes {
use ProviderHelper;
trait WithRoutes {
use Helper;

protected function bootRoutes(): void {
$this->callAfterBoot(function (): void {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Core\Concerns;
namespace LastDragon_ru\LaraASP\Core\Provider;

use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Translator;
Expand All @@ -10,8 +10,8 @@
*
* @mixin ServiceProvider
*/
trait ProviderWithTranslations {
use ProviderHelper;
trait WithTranslations {
use Helper;

protected function bootTranslations(): void {
$package = $this->getName();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Core\Concerns;
namespace LastDragon_ru\LaraASP\Core\Provider;

use Illuminate\Support\ServiceProvider;

/**
* @mixin ServiceProvider
*/
trait ProviderWithViews {
use ProviderHelper;
trait WithViews {
use Helper;

protected function bootViews(): void {
$package = $this->getName();
Expand Down
4 changes: 2 additions & 2 deletions packages/documentator/src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
namespace LastDragon_ru\LaraASP\Documentator;

use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithViews;
use LastDragon_ru\LaraASP\Core\Provider\WithViews;
use LastDragon_ru\LaraASP\Documentator\Commands\Commands;
use LastDragon_ru\LaraASP\Documentator\Commands\Preprocess;
use LastDragon_ru\LaraASP\Documentator\Commands\Requirements;

class Provider extends ServiceProvider {
use ProviderWithViews;
use WithViews;

public function boot(): void {
$this->bootViews();
Expand Down
8 changes: 4 additions & 4 deletions packages/formatter/src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace LastDragon_ru\LaraASP\Formatter;

use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithConfig;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithTranslations;
use LastDragon_ru\LaraASP\Core\Provider\WithConfig;
use LastDragon_ru\LaraASP\Core\Provider\WithTranslations;

class Provider extends ServiceProvider {
use ProviderWithConfig;
use ProviderWithTranslations;
use WithConfig;
use WithTranslations;

public function boot(): void {
$this->bootConfig();
Expand Down
8 changes: 4 additions & 4 deletions packages/graphql/src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithConfig;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithTranslations;
use LastDragon_ru\LaraASP\Core\Provider\WithConfig;
use LastDragon_ru\LaraASP\Core\Provider\WithTranslations;
use LastDragon_ru\LaraASP\GraphQL\Builder\Contracts\Scout\FieldResolver as ScoutFieldResolver;
use LastDragon_ru\LaraASP\GraphQL\Builder\Manipulator;
use LastDragon_ru\LaraASP\GraphQL\Builder\Scout\DefaultFieldResolver as ScoutDefaultFieldResolver;
Expand All @@ -28,8 +28,8 @@
use function implode;

class Provider extends ServiceProvider {
use ProviderWithConfig;
use ProviderWithTranslations;
use WithConfig;
use WithTranslations;

public function boot(Dispatcher $dispatcher): void {
$this->bootConfig();
Expand Down
4 changes: 2 additions & 2 deletions packages/serializer/src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use Illuminate\Contracts\Container\Container;
use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithConfig;
use LastDragon_ru\LaraASP\Core\Provider\WithConfig;
use LastDragon_ru\LaraASP\Serializer\Contracts\Serializer;

class Provider extends ServiceProvider {
use ProviderWithConfig;
use WithConfig;

public function register(): void {
parent::register();
Expand Down
12 changes: 6 additions & 6 deletions packages/spa/src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Foundation\Exceptions\Handler;
use Illuminate\Support\ServiceProvider;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithConfig;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithRoutes;
use LastDragon_ru\LaraASP\Core\Concerns\ProviderWithTranslations;
use LastDragon_ru\LaraASP\Core\Provider\WithConfig;
use LastDragon_ru\LaraASP\Core\Provider\WithRoutes;
use LastDragon_ru\LaraASP\Core\Provider\WithTranslations;
use LastDragon_ru\LaraASP\Spa\Routing\UnresolvedValueException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class Provider extends ServiceProvider {
use ProviderWithConfig;
use ProviderWithRoutes;
use ProviderWithTranslations;
use WithConfig;
use WithRoutes;
use WithTranslations;

// <editor-fold desc="\Illuminate\Support\ServiceProvider">
// =========================================================================
Expand Down

0 comments on commit 39b2b22

Please sign in to comment.