Skip to content

Commit

Permalink
[5.6] Better type hints on magic methods. (#23686)
Browse files Browse the repository at this point in the history
* [5.6] Better type hints for Support/Facades/Broadcast.php

* [5.6] Better type hints on Support/Facades/Blade.php

* [5.6] Better type hints on Support/Facades/Bus.php
  • Loading branch information
TBlindaruk authored and taylorotwell committed Mar 25, 2018
1 parent 3e9e435 commit 77ade2d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Facades/Blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
namespace Illuminate\Support\Facades;

/**
* @method static void compile($path = null)
* @method static string getPath()
* @method static void setPath($path)
* @method static string compileString($value)
* @method static string stripParentheses($expression)
* @method static void extend(callable $compiler)
* @method static array getExtensions()
* @method static void if($name, callable $callback)
* @method static bool check($name, ...$parameters)
* @method static void component($path, $alias = null)
* @method static void include($path, $alias = null)
* @method static void directive($name, callable $handler)
* @method static array getCustomDirectives()
* @method static void setEchoFormat($format)
* @method static void withDoubleEncoding()
* @method static void withoutDoubleEncoding()
*
* @see \Illuminate\View\Compilers\BladeCompiler
*/
class Blade extends Facade
Expand Down
2 changes: 2 additions & 0 deletions Facades/Broadcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactoryContract;

/**
* @method static void connection($name = null);
*
* @see \Illuminate\Contracts\Broadcasting\Factory
*/
class Broadcast extends Facade
Expand Down
7 changes: 7 additions & 0 deletions Facades/Bus.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;

/**
* @method static mixed dispatch($command)
* @method static mixed dispatchNow($command, $handler = null)
* @method static bool hasCommandHandler($command)
* @method static bool|mixed getCommandHandler($command)
* @method static \Illuminate\Contracts\Bus\Dispatcher pipeThrough(array $pipes)
* @method static \Illuminate\Contracts\Bus\Dispatcher map(array $map)
*
* @see \Illuminate\Contracts\Bus\Dispatcher
*/
class Bus extends Facade
Expand Down

0 comments on commit 77ade2d

Please sign in to comment.