Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper authored and StyleCIBot committed Mar 26, 2021
1 parent 097353b commit 2caf81f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions src/BladeCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ trait BladeCompiler
/**
* Creates attributes tags.
*
* @param array<mixed> $attributes
*
* @param array<mixed> $attributes
*
* @return string
*/
protected function createAttributes(array $attributes)
Expand All @@ -25,9 +25,9 @@ protected function createAttributes(array $attributes)
/**
* Created a view based on a string.
*
* @param \Illuminate\Contracts\View\Factory $factory
* @param string $contents
*
* @param \Illuminate\Contracts\View\Factory $factory
* @param string $contents
*
* @return string
*/
protected function createViewFromString(Factory $factory, string $contents)
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ServiceProvider extends AddonServiceProvider
{
/** @var array<mixed> */
/** @var array<mixed> */
protected $tags = [
BladeComponent::class,
];
Expand Down
36 changes: 18 additions & 18 deletions src/Tags/BladeComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

use Illuminate\Container\Container;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\View;
use Octoper\BladeComponents\BladeCompiler;
use Statamic\Tags\Tags;
use Illuminate\Support\Facades\View;

class BladeComponent extends Tags
{
Expand All @@ -19,14 +19,14 @@ class BladeComponent extends Tags

/** @var array<string> */
protected static $aliases = [
'x'
];
'x',
];

/**
* Renders given component to Laravel Blade components
* Renders given component to Laravel Blade components.
*
* @param string $component
*
*
* @return string
*/
public function wildcard(string $component): string
Expand All @@ -42,17 +42,17 @@ public function wildcard(string $component): string
return View::make($this->createViewFromString($factory, $compiledBladeView))->render();
}

/**
* Creates a slot Laravel Blade component.
*
* @return string
*/
public function slot(): string
{
if (!isset($this->params['name']) || empty($this->params['name'])) {
return '';
}

return "<x-slot {$this->createAttributes($this->params->toArray())}>{$this->parse()}</x-slot>";
}
/**
* Creates a slot Laravel Blade component.
*
* @return string
*/
public function slot(): string
{
if (! isset($this->params['name']) || empty($this->params['name'])) {
return '';
}

return "<x-slot {$this->createAttributes($this->params->toArray())}>{$this->parse()}</x-slot>";
}
}

0 comments on commit 2caf81f

Please sign in to comment.