Skip to content

Commit 1e28557

Browse files
committed
Added Macroable, various edits
1 parent c2cacba commit 1e28557

File tree

4 files changed

+11
-20
lines changed

4 files changed

+11
-20
lines changed

src/Debugbar/ShortcodesCollector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
use DebugBar\DataCollector\DataCollector;
66
use DebugBar\DataCollector\Renderable;
77
use Illuminate\Support\Collection;
8+
use Illuminate\Support\Traits\Macroable;
89

910
/**
1011
* Collects info about shortcodes
1112
*/
1213
class ShortcodesCollector extends DataCollector implements Renderable
1314
{
15+
use Macroable;
16+
1417
/**
1518
* @var array Shortcodes list
1619
*/

src/Facades/Shortcodes.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
namespace Vedmant\LaravelShortcodes\Facades;
44

55
use Illuminate\Support\Facades\Facade;
6+
use Illuminate\Support\HtmlString;
67
use Vedmant\LaravelShortcodes\ShortcodesManager;
78

89
/**
910
* @method static mixed global(string $key, $value = null, $default = null)
11+
* @method static mixed|ShortcodesManager shared($key = null, $value = null, $default = null)
1012
* @method static ShortcodesManager add($name, $callable = null)
1113
* @method static ShortcodesManager remove($name)
12-
* @method static ShortcodesManager render($content)
13-
* @method static mixed|ShortcodesManager shared($key = null, $value = null, $default = null)
14+
* @method static array registered()
15+
* @method static array rendered()
16+
* @method static HtmlString render($content)
1417
*
1518
* @see \Vedmant\LaravelShortcodes\ShortcodesManager
1619
*/

src/LaravelShortcodesServiceProvider.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ class LaravelShortcodesServiceProvider extends ServiceProvider
1616
*/
1717
public function boot()
1818
{
19-
// $this->loadTranslationsFrom(__DIR__.'/../lang', 'shortcodes');
2019
$this->loadViewsFrom(__DIR__ . '/../views', 'shortcodes');
21-
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
22-
// $this->loadRoutesFrom(__DIR__.'/routes.php');
2320

2421
// Publishing is only necessary when using the CLI.
2522
if ($this->app->runningInConsole()) {
@@ -98,21 +95,6 @@ protected function bootForConsole()
9895
__DIR__ . '/../config/shortcodes.php' => config_path('shortcodes.php'),
9996
], 'shortcodes.config');
10097

101-
// Publishing the views.
102-
/*$this->publishes([
103-
__DIR__.'/../resources/views' => base_path('resources/views/vendor/shortcodes'),
104-
], 'shortcodes.views');*/
105-
106-
// Publishing assets.
107-
/*$this->publishes([
108-
__DIR__.'/../resources/assets' => public_path('vendor/vedmant'),
109-
], 'shortcodes.views');*/
110-
111-
// Publishing the translation files.
112-
/*$this->publishes([
113-
__DIR__.'/../resources/lang' => resource_path('lang/vendor/vedmant'),
114-
], 'shortcodes.views');*/
115-
11698
// Registering package commands.
11799
$this->commands([
118100
MakeShortcodeCommand::class,

src/Shortcode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44

55
use Illuminate\Contracts\Foundation\Application;
66
use Illuminate\Support\Facades\Log;
7+
use Illuminate\Support\Traits\Macroable;
78
use Throwable;
89

910
abstract class Shortcode implements ShortcodeContract
1011
{
12+
use Macroable;
13+
1114
/**
1215
* @var Application Application
1316
*/

0 commit comments

Comments
 (0)