• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sirn-se / websocket-php / 5608975860

pending completion
5608975860

push

github

Sören Jensen
Middleware support

90 of 90 new or added lines in 8 files covered. (100.0%)

245 of 671 relevant lines covered (36.51%)

1.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Http/ServerRequest.php
1
<?php
2

3
/**
4
 * Copyright (C) 2014-2023 Textalk and contributors.
5
 *
6
 * This file is part of Websocket PHP and is free software under the ISC License.
7
 * License text: https://raw.githubusercontent.com/sirn-se/websocket-php/master/COPYING.md
8
 */
9

10
namespace WebSocket\Http;
11

12
use BadMethodCallException;
13
use Psr\Http\Message\{
14
    ServerRequestInterface,
15
    UriInterface
16
};
17

18
/**
19
 * WebSocket\Http\ServerRequest class.
20
 * Only used for handshake procedure.
21
 */
22
class ServerRequest extends Request implements ServerRequestInterface
23
{
24
    /**
25
     * Retrieve server parameters.
26
     * @return array
27
     */
28
    public function getServerParams(): array
29
    {
30
        throw new BadMethodCallException("Not implemented.");
×
31
    }
32

33
    /**
34
     * Retrieves cookies sent by the client to the server.
35
     * @return array
36
     */
37
    public function getCookieParams(): array
38
    {
39
        throw new BadMethodCallException("Not implemented.");
×
40
    }
41

42
    /**
43
     * Return an instance with the specified cookies.
44
     * @param array $cookies Array of key/value pairs representing cookies.
45
     * @return static
46
     */
47
    public function withCookieParams(array $cookies): self
48
    {
49
        throw new BadMethodCallException("Not implemented.");
×
50
    }
51

52
    /**
53
     * Retrieves the deserialized query string arguments, if any.
54
     * @return array
55
     */
56
    public function getQueryParams(): array
57
    {
58
        parse_str($this->getUri()->getQuery(), $result);
×
59
        return $result;
×
60
    }
61

62
    /**
63
     * Return an instance with the specified query string arguments.
64
     * @param array $query Array of query string arguments
65
     * @return static
66
     */
67
    public function withQueryParams(array $query): self
68
    {
69
        throw new BadMethodCallException("Not implemented.");
×
70
    }
71

72
    /**
73
     * Retrieve normalized file upload data.
74
     * @return array An array tree of UploadedFileInterface instances.
75
     */
76
    public function getUploadedFiles(): array
77
    {
78
        throw new BadMethodCallException("Not implemented.");
×
79
    }
80

81
    /**
82
     * Create a new instance with the specified uploaded files.
83
     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
84
     * @return static
85
     * @throws \InvalidArgumentException if an invalid structure is provided.
86
     */
87
    public function withUploadedFiles(array $uploadedFiles): self
88
    {
89
        throw new BadMethodCallException("Not implemented.");
×
90
    }
91

92
    /**
93
     * Retrieve any parameters provided in the request body.
94
     * @return null|array|object The deserialized body parameters, if any.
95
     */
96
    public function getParsedBody()
97
    {
98
        throw new BadMethodCallException("Not implemented.");
×
99
    }
100

101
    /**
102
     * Return an instance with the specified body parameters.
103
     * @param null|array|object $data The deserialized body data.
104
     * @return static
105
     * @throws \InvalidArgumentException if an unsupported argument type is provided.
106
     */
107
    public function withParsedBody($data): self
108
    {
109
        throw new BadMethodCallException("Not implemented.");
×
110
    }
111

112
    /**
113
     * Retrieve attributes derived from the request.
114
     * @return mixed[] Attributes derived from the request.
115
     */
116
    public function getAttributes()
117
    {
118
        throw new BadMethodCallException("Not implemented.");
×
119
    }
120

121
    /**
122
     * Retrieve a single derived request attribute.
123
     * @param string $name The attribute name.
124
     * @param mixed $default Default value to return if the attribute does not exist.
125
     * @return mixed
126
     */
127
    public function getAttribute($name, $default = null)
128
    {
129
        throw new BadMethodCallException("Not implemented.");
×
130
    }
131

132
    /**
133
     * Return an instance with the specified derived request attribute.
134
     * @param string $name The attribute name.
135
     * @param mixed $value The value of the attribute.
136
     * @return static
137
     */
138
    public function withAttribute($name, $value): self
139
    {
140
        throw new BadMethodCallException("Not implemented.");
×
141
    }
142

143
    /**
144
     * Return an instance that removes the specified derived request attribute.
145
     * @param string $name The attribute name.
146
     * @return static
147
     */
148
    public function withoutAttribute($name): self
149
    {
150
        throw new BadMethodCallException("Not implemented.");
×
151
    }
152
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc