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 — feature/tweak ( 28e05b )
by jake
02:03
created

Message::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
// @codingStandardsIgnoreFile
3
4
namespace Jnjxp\Molniya\Messenger\Message;
5
6
/**
7
 * Message
8
 *
9
 * @category Message
10
 * @package  Jnjxp\Molniya
11
 * @author   Jake Johns <[email protected]>
12
 * @license  https://jnj.mit-license.org/ MIT License
13
 * @link     https://github.com/jnjxp/jnjxp.molniya
14
 *
15
 * @see MessageInterface
16
 */
17
class Message implements MessageInterface
18
{
19
    /**
20
     * Content
21
     *
22
     * @var string
23
     *
24
     * @access protected
25
     */
26
    protected $content;
27
28
    /**
29
     * Context
30
     *
31
     * @var string
32
     *
33
     * @access protected
34
     */
35
    protected $context;
36
37
    /**
38
     * __construct
39
     *
40
     * @param string $content DESCRIPTION
41
     * @param string $context DESCRIPTION
42
     *
43
     * @access public
44
     */
45
    public function __construct(string $content, string $context)
46
    {
47
        $this->content = $content;
48
        $this->context = $context;
49
    }
50
51
    /**
52
     * Get content
53
     *
54
     * @return string
55
     *
56
     * @access public
57
     */
58
    public function getContent() : string
59
    {
60
        return $this->content;
61
    }
62
63
    /**
64
     * Get context
65
     *
66
     * @return string
67
     *
68
     * @access public
69
     */
70
    public function getContext() : string
71
    {
72
        return $this->context;
73
    }
74
75
    /**
76
     * Json serialize
77
     *
78
     * @return array
79
     *
80
     * @access public
81
     */
82
    public function jsonSerialize() : array
83
    {
84
        return [
85
            'content' => $this->getContent(),
86
            'context' => $this->getContext()
87
        ];
88
    }
89
90
    /**
91
     * __toString
92
     *
93
     * @return string
94
     *
95
     * @access public
96
     */
97
    public function __toString() : string
98
    {
99
        return $this->getContent();
100
    }
101
}
102