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.x ( 2acdda...833fea )
by
unknown
01:59
created

NonBufferedBody   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 128
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 16
lcom 0
cbo 0
dl 0
loc 128
rs 10
c 0
b 0
f 0

15 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
A close() 0 3 1
A detach() 0 4 1
A getSize() 0 4 1
A tell() 0 4 1
A eof() 0 4 1
A isSeekable() 0 4 1
A seek() 0 3 1
A rewind() 0 3 1
A isWritable() 0 4 1
A write() 0 13 2
A isReadable() 0 4 1
A read() 0 4 1
A getContents() 0 4 1
A getMetadata() 0 4 1
1
<?php
2
/**
3
 * Slim Framework (https://slimframework.com)
4
 *
5
 * @link      https://github.com/slimphp/Slim
6
 * @copyright Copyright (c) 2011-2017 Josh Lockhart
7
 * @license   https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
8
 */
9
namespace Slim\Http;
10
11
use Psr\Http\Message\StreamInterface;
12
13
/**
14
 * Represents a non-readable stream that whenever it is written pushes
15
 * the data back to the browser immediately.
16
 */
17
class NonBufferedBody implements StreamInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function __toString()
23
    {
24
        return '';
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function close()
31
    {
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function detach()
38
    {
39
        return null;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getSize()
46
    {
47
        return null;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function tell()
54
    {
55
        return 0;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function eof()
62
    {
63
        return true;
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function isSeekable()
70
    {
71
        return false;
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     */
77
    public function seek($offset, $whence = SEEK_SET)
78
    {
79
    }
80
81
    /**
82
     * {@inheritdoc}
83
     */
84
    public function rewind()
85
    {
86
    }
87
88
    /**
89
     * {@inheritdoc}
90
     */
91
    public function isWritable()
92
    {
93
        return true;
94
    }
95
96
    /**
97
     * {@inheritdoc}
98
     */
99
    public function write($string)
100
    {
101
        $buffered = '';
102
        while (0 < \ob_get_level()) {
103
            $buffered = \ob_get_clean() . $buffered;
104
        }
105
106
        echo $buffered . $string;
107
108
        \flush();
109
110
        return \strlen($string) + \strlen($buffered);
111
    }
112
113
    /**
114
     * {@inheritdoc}
115
     */
116
    public function isReadable()
117
    {
118
        return false;
119
    }
120
121
    /**
122
     * {@inheritdoc}
123
     */
124
    public function read($length)
125
    {
126
        return '';
127
    }
128
129
    /**
130
     * {@inheritdoc}
131
     */
132
    public function getContents()
133
    {
134
        return '';
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140
    public function getMetadata($key = null)
141
    {
142
        return null;
143
    }
144
}
145