Skip to content

Commit

Permalink
Use static function.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Aug 4, 2019
1 parent b94e91c commit ec79878
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BladeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function register()
$snakeMethod = Str::snake($method);
$directive = \strtolower($namespace).'_'.$snakeMethod;

$bladeCompiler->directive($directive, function ($expression) use ($namespace, $method) {
$bladeCompiler->directive($directive, static function ($expression) use ($namespace, $method) {
return "<?php echo $namespace::$method($expression); ?>";
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/HtmlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function register()
*/
protected function registerHtmlBuilder(): void
{
$this->app->singleton('html', function ($app) {
$this->app->singleton('html', static function ($app) {
return new HtmlBuilder(
$app->make('url'), $app->make('view')
);
Expand All @@ -43,7 +43,7 @@ protected function registerHtmlBuilder(): void
*/
protected function registerFormBuilder(): void
{
$this->app->singleton('form', function ($app) {
$this->app->singleton('form', static function ($app) {
return (new FormBuilder(
$app->make('html'), $app->make('url'), $app->make('view'), $app->make('request')
))->setSessionStore($app->make('session.store'));
Expand Down

0 comments on commit ec79878

Please sign in to comment.