Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from spatie/analysis-XVL4lw
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
freekmurze authored May 24, 2018
2 parents f2f15cd + 468ab16 commit 571f1b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/DotPathComponentFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private function resolveNamespaceFromAlias(string $alias): string
{
$namespace = $this->namespaces[$alias] ?? null;

if (!$namespace) {
if (! $namespace) {
throw new InvalidArgumentException("View component namespace [$alias] doesn't exist.");
}

Expand Down
8 changes: 4 additions & 4 deletions src/ViewComponentsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Spatie\ViewComponents;

use Illuminate\Contracts\Support\Htmlable;
use InvalidArgumentException;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use InvalidArgumentException;
use Illuminate\Contracts\Support\Htmlable;

class ViewComponentsServiceProvider extends ServiceProvider
{
Expand All @@ -16,11 +16,11 @@ public function boot()

$componentClass = $this->app->make(ComponentFinder::class)->find($expressionParts[0]);

if (!class_exists($componentClass)) {
if (! class_exists($componentClass)) {
throw new InvalidArgumentException("View component [{$componentClass}] not found.");
}

if (!array_key_exists(Htmlable::class, class_implements($componentClass))) {
if (! array_key_exists(Htmlable::class, class_implements($componentClass))) {
throw new InvalidArgumentException(
"View component [{$componentClass}] must implement Illuminate\Support\Htmlable."
);
Expand Down
2 changes: 1 addition & 1 deletion tests/NamespacesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Spatie\ViewComponents\Tests;

use Illuminate\Support\Facades\Blade;
use InvalidArgumentException;
use Illuminate\Support\Facades\Blade;

class NamespacesTest extends TestCase
{
Expand Down

0 comments on commit 571f1b1

Please sign in to comment.