Completed
Pull Request — master (#553)
by
unknown
03:27 queued 54s
created

EventHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
handle() 0 1 ?
A forward() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
/**
13
 * EventHandler.php.
14
 *
15
 * Part of Overtrue\WeChat.
16
 *
17
 * For the full copyright and license information, please view the LICENSE
18
 * file that was distributed with this source code.
19
 *
20
 * @author    mingyoung <[email protected]>
21
 * @copyright 2016
22
 *
23
 * @see      https://github.com/overtrue
24
 * @see      http://overtrue.me
25
 */
26
27
namespace EasyWeChat\OpenPlatform\EventHandlers;
28
29
use EasyWeChat\Support\Collection;
30
31
abstract class EventHandler
32
{
33
    /**
34
     * Handle event.
35
     *
36
     * @param Collection $message
37
     *
38
     * @return mixed
39
     */
40
    abstract public function handle(Collection $message);
41
42
    /**
43
     * Forward handle.
44
     *
45
     * @param Collection $message
46
     *
47
     * @return Collection
48
     */
49
    public function forward(Collection $message)
50
    {
51
        //
52
        return $message;
53
    }
54
}
55