We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
13 | class CentrifugeBroadcaster extends Broadcaster |
||
14 | { |
||
15 | /** |
||
16 | * The Centrifuge SDK instance. |
||
17 | * |
||
18 | * @var \denis660\Centrifuge\Contracts\CentrifugeInterface |
||
19 | */ |
||
20 | protected $Centrifuge; |
||
21 | |||
22 | /** |
||
23 | * Create a new broadcaster instance. |
||
24 | * |
||
25 | * @param \denis660\Centrifuge\Contracts\CentrifugeInterface $Centrifuge |
||
26 | */ |
||
27 | public function __construct(CentrifugeInterface $Centrifuge) |
||
31 | |||
32 | /** |
||
33 | * Authenticate the incoming request for a given channel. |
||
34 | * |
||
35 | * @param \Illuminate\Http\Request $request |
||
36 | * @return mixed |
||
37 | */ |
||
38 | public function auth($request) |
||
62 | |||
63 | /** |
||
64 | * Return the valid authentication response. |
||
65 | * |
||
66 | * @param \Illuminate\Http\Request $request |
||
67 | * @param mixed $result |
||
68 | * @return mixed |
||
69 | */ |
||
70 | public function validAuthenticationResponse($request, $result) |
||
74 | |||
75 | /** |
||
76 | * Broadcast the given event. |
||
77 | * |
||
78 | * @param array $channels |
||
79 | * @param string $event |
||
80 | * @param array $payload |
||
81 | * @return void |
||
82 | */ |
||
83 | public function broadcast(array $channels, $event, array $payload = []) |
||
97 | |||
98 | /** |
||
99 | * Get client from request. |
||
100 | * |
||
101 | * @param \Illuminate\Http\Request $request |
||
102 | * @return string |
||
103 | */ |
||
104 | private function getClientFromRequest($request) |
||
108 | |||
109 | /** |
||
110 | * Get channels from request. |
||
111 | * |
||
112 | * @param \Illuminate\Http\Request $request |
||
113 | * @return array |
||
114 | */ |
||
115 | private function getChannelsFromRequest($request) |
||
121 | |||
122 | /** |
||
123 | * Get channel name without $ symbol (if present). |
||
124 | * |
||
125 | * @param string $channel |
||
126 | * @return string |
||
127 | */ |
||
128 | private function getChannelName(string $channel) |
||
132 | |||
133 | /** |
||
134 | * Make response for client, based on access rights. |
||
135 | * |
||
136 | * @param bool $access_granted |
||
137 | * @param string $client |
||
138 | * @return array |
||
139 | */ |
||
140 | private function makeResponseForClient(bool $access_granted, string $client) |
||
151 | } |
||
152 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: