1 | <?php |
||
13 | class RedisPusherBroadcaster extends Broadcaster |
||
14 | { |
||
15 | use UsePusherChannelConventions; |
||
16 | |||
17 | /** |
||
18 | * The Pusher SDK instance. |
||
19 | * |
||
20 | * @var \Pusher\Pusher |
||
21 | */ |
||
22 | protected $pusher; |
||
23 | |||
24 | /** |
||
25 | * The Pusher app ID, to be passed in the payload. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $appId; |
||
30 | |||
31 | /** |
||
32 | * The Redis instance. |
||
33 | * |
||
34 | * @var \Illuminate\Contracts\Redis\Factory |
||
35 | */ |
||
36 | protected $redis; |
||
37 | |||
38 | /** |
||
39 | * Create a new broadcaster instance. |
||
40 | * |
||
41 | * @param Pusher $pusher |
||
42 | * @param mixed $appId |
||
43 | * @param \Illuminate\Contracts\Redis\Factory $redis |
||
44 | */ |
||
45 | public function __construct(Pusher $pusher, $appId, Redis $redis) |
||
51 | |||
52 | /** |
||
53 | * Authenticate the incoming request for a given channel. |
||
54 | * |
||
55 | * @param \Illuminate\Http\Request $request |
||
56 | * @return mixed |
||
57 | * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException |
||
58 | */ |
||
59 | public function auth($request) |
||
72 | |||
73 | /** |
||
74 | * Return the valid authentication response. |
||
75 | * |
||
76 | * @param \Illuminate\Http\Request $request |
||
77 | * @param mixed $result |
||
78 | * @return mixed |
||
79 | * @throws \Pusher\PusherException |
||
80 | */ |
||
81 | public function validAuthenticationResponse($request, $result) |
||
99 | |||
100 | /** |
||
101 | * Decode the given Pusher response. |
||
102 | * |
||
103 | * @param \Illuminate\Http\Request $request |
||
104 | * @param mixed $response |
||
105 | * @return array |
||
106 | */ |
||
107 | protected function decodePusherResponse($request, $response) |
||
116 | |||
117 | /** |
||
118 | * Broadcast the given event. |
||
119 | * |
||
120 | * @param array $channels |
||
121 | * @param string $event |
||
122 | * @param array $payload |
||
123 | * @return void |
||
124 | */ |
||
125 | public function broadcast(array $channels, $event, array $payload = []) |
||
142 | } |
||
143 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.