GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 3.0 ( 6209fa...31a631 )
by Szurovecz
04:34 queued 02:00
created

NullMessageBus::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
 * Copyright (c) 2012-2014 Janos Szurovecz
4
 *
5
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
6
 * this software and associated documentation files (the "Software"), to deal in
7
 * the Software without restriction, including without limitation the rights to
8
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
 * of the Software, and to permit persons to whom the Software is furnished to do
10
 * so, subject to the following conditions:
11
 *
12
 * The above copyright notice and this permission notice shall be included in all
13
 * copies or substantial portions of the Software.
14
 *
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
 * SOFTWARE.
22
 */
23
24
namespace predaddy\messagehandling\util;
25
26
use Closure;
27
use precore\lang\Object;
28
use predaddy\messagehandling\MessageBus;
29
use predaddy\messagehandling\MessageCallback;
30
31
/**
32
 * @author Janos Szurovecz <[email protected]>
33
 * @codeCoverageIgnore
34
 */
35
final class NullMessageBus extends Object implements MessageBus
36
{
37
    /**
38
     * Post a message on this bus. It is dispatched to all subscribed handlers.
39
     * MessageCallback will be notified with each message handler calls.
40
     *
41
     * MessageCallback is not necessarily supported by all implementations!
42
     *
43
     * @param object $message
44
     * @param MessageCallback $callback
45
     * @return void
46
     * @throws \InvalidArgumentException If $message is not an object
47
     */
48
    public function post($message, MessageCallback $callback = null)
49
    {
50
        self::getLogger()->warn("Calling '{}' will do nothing.", [__METHOD__]);
51
    }
52
53
    /**
54
     * Register the given handler to this bus. When registered, it will receive all messages posted to this bus.
55
     *
56
     * @param mixed $handler
57
     * @return void
58
     */
59
    public function register($handler)
60
    {
61
        self::getLogger()->warn("Calling '{}' will do nothing.", [__METHOD__]);
62
    }
63
64
    /**
65
     * Un-register the given handler to this bus.
66
     * When unregistered, it will no longer receive messages posted to this bus.
67
     *
68
     * @param object $handler
69
     * @return void
70
     */
71
    public function unregister($handler)
72
    {
73
        self::getLogger()->warn("Calling '{}' will do nothing.", [__METHOD__]);
74
    }
75
76
    /**
77
     * @param Closure $closure
78
     * @param int $priority Used to sort handlers when dispatching messages
79
     * @return void
80
     */
81
    public function registerClosure(Closure $closure, $priority = self::DEFAULT_PRIORITY)
82
    {
83
        self::getLogger()->warn("Calling '{}' will do nothing.", [__METHOD__]);
84
    }
85
86
    /**
87
     * @param Closure $closure
88
     * @param int $priority
89
     * @return void
90
     */
91
    public function unregisterClosure(Closure $closure, $priority = self::DEFAULT_PRIORITY)
92
    {
93
        self::getLogger()->warn("Calling '{}' will do nothing.", [__METHOD__]);
94
    }
95
96
    public function __toString()
97
    {
98
        return __CLASS__;
99
    }
100
}
101