Skip to content

Commit

Permalink
Merge pull request #8 from vedmant/analysis-qo360K
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
vedmant committed Jul 3, 2019
2 parents 55d5d2b + 0749ce8 commit ea49104
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Vedmant\LaravelShortcodes;

use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Foundation\Application;

class Manager
{
Expand Down Expand Up @@ -134,13 +134,15 @@ public function render($content)
}

/**
* Generate all registered shortcodes info
* Generate all registered shortcodes info.
* @return Collection
*/
public function registeredData(): Collection
{
return (new Collection($this->renderer->shortcodes))->mapWithKeys(function ($class, $name) {
if (! is_string($class) || ! class_exists($class)) return [];
if (! is_string($class) || ! class_exists($class)) {
return [];
}
/** @var Shortcode $shortcode */
$shortcode = new $class($this->app, $this, [], $name);

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Vedmant\LaravelShortcodes\Tests\Unit;

use Vedmant\LaravelShortcodes\Tests\TestCase;
use Vedmant\LaravelShortcodes\Tests\Resources\BShortcode;
use Vedmant\LaravelShortcodes\Tests\Resources\HrShortcode;
use Vedmant\LaravelShortcodes\Tests\TestCase;

class ManagerTest extends TestCase
{
Expand Down

0 comments on commit ea49104

Please sign in to comment.