Completed
Push — master ( 35dadb...090c71 )
by Manuel
05:09
created
app/Observers/DeviceObserver.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,32 +7,32 @@
 block discarded – undo
7 7
 
8 8
 class DeviceObserver
9 9
 {
10
-    /**
11
-     * @var PusherManager
12
-     */
13
-    protected $pusher;
10
+	/**
11
+	 * @var PusherManager
12
+	 */
13
+	protected $pusher;
14 14
 
15
-    /**
16
-     * @var DeviceTransformer
17
-     */
18
-    private $transformer;
15
+	/**
16
+	 * @var DeviceTransformer
17
+	 */
18
+	private $transformer;
19 19
 
20
-    /**
21
-     * DeviceObserver constructor.
22
-     *
23
-     * @param PusherManager     $pusher
24
-     * @param DeviceTransformer $transformer
25
-     */
26
-    public function __construct(PusherManager $pusher, DeviceTransformer $transformer)
27
-    {
28
-        $this->pusher = $pusher;
29
-        $this->transformer = $transformer;
30
-    }
20
+	/**
21
+	 * DeviceObserver constructor.
22
+	 *
23
+	 * @param PusherManager     $pusher
24
+	 * @param DeviceTransformer $transformer
25
+	 */
26
+	public function __construct(PusherManager $pusher, DeviceTransformer $transformer)
27
+	{
28
+		$this->pusher = $pusher;
29
+		$this->transformer = $transformer;
30
+	}
31 31
 
32
-    public function deleted($device)
33
-    {
34
-        $this->pusher->trigger(config('services.pusher.channel'), 'DeviceWasDeleted', [
35
-            'device' => $this->transformer->transform($device),
36
-        ]);
37
-    }
32
+	public function deleted($device)
33
+	{
34
+		$this->pusher->trigger(config('services.pusher.channel'), 'DeviceWasDeleted', [
35
+			'device' => $this->transformer->transform($device),
36
+		]);
37
+	}
38 38
 }
Please login to merge, or discard this patch.
app/Handlers/Events/NotifyUsersAboutPoke.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -8,52 +8,52 @@
 block discarded – undo
8 8
 
9 9
 class NotifyUsersAboutPoke
10 10
 {
11
-    /**
12
-     * The Pusher instance.
13
-     *
14
-     * @var PusherManager
15
-     */
16
-    protected $pusher;
17
-
18
-    /**
19
-     * @var DeviceTransformer
20
-     */
21
-    private $transformer;
22
-
23
-    /**
24
-     * Create the event handler.
25
-     *
26
-     * @param PusherManager     $pusher
27
-     * @param DeviceTransformer $transformer
28
-     */
29
-    public function __construct(PusherManager $pusher, DeviceTransformer $transformer)
30
-    {
31
-        $this->pusher = $pusher;
32
-        $this->transformer = $transformer;
33
-    }
34
-
35
-    /**
36
-     * Handle the server was poked event.
37
-     *
38
-     * @param ServerWasPoked $event
39
-     *
40
-     * @return void
41
-     */
42
-    public function handle(ServerWasPoked $event)
43
-    {
44
-        $channel = config('services.pusher.channel');
45
-        $device = $event->getDevice();
46
-
47
-        if ($device->isPublic()) {
48
-            $this->pusher->trigger($channel, 'ServerWasPoked', [
49
-                'device' => $this->transformer->transform($device),
50
-            ]);
51
-        } else {
52
-            $channel = $channel.'-'.$device->group;
53
-
54
-            $this->pusher->trigger($channel, 'ServerWasPoked', [
55
-                'device' => $this->transformer->transform($device),
56
-            ]);
57
-        }
58
-    }
11
+	/**
12
+	 * The Pusher instance.
13
+	 *
14
+	 * @var PusherManager
15
+	 */
16
+	protected $pusher;
17
+
18
+	/**
19
+	 * @var DeviceTransformer
20
+	 */
21
+	private $transformer;
22
+
23
+	/**
24
+	 * Create the event handler.
25
+	 *
26
+	 * @param PusherManager     $pusher
27
+	 * @param DeviceTransformer $transformer
28
+	 */
29
+	public function __construct(PusherManager $pusher, DeviceTransformer $transformer)
30
+	{
31
+		$this->pusher = $pusher;
32
+		$this->transformer = $transformer;
33
+	}
34
+
35
+	/**
36
+	 * Handle the server was poked event.
37
+	 *
38
+	 * @param ServerWasPoked $event
39
+	 *
40
+	 * @return void
41
+	 */
42
+	public function handle(ServerWasPoked $event)
43
+	{
44
+		$channel = config('services.pusher.channel');
45
+		$device = $event->getDevice();
46
+
47
+		if ($device->isPublic()) {
48
+			$this->pusher->trigger($channel, 'ServerWasPoked', [
49
+				'device' => $this->transformer->transform($device),
50
+			]);
51
+		} else {
52
+			$channel = $channel.'-'.$device->group;
53
+
54
+			$this->pusher->trigger($channel, 'ServerWasPoked', [
55
+				'device' => $this->transformer->transform($device),
56
+			]);
57
+		}
58
+	}
59 59
 }
Please login to merge, or discard this patch.