Skip to content

Commit 50ea871

Browse files
committed
Applying PSR-2 coding style to generated files
1 parent 965e0c7 commit 50ea871

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+10153
-10243
lines changed

generated/apache.php

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
/**
88
* Fetch the Apache version.
9-
*
9+
*
1010
* @return string Returns the Apache version on success .
1111
* @throws ApacheException
12-
*
12+
*
1313
*/
1414
function apache_get_version(): string
1515
{
1616
error_clear_last();
1717
$result = \apache_get_version();
18-
if ($result === FALSE) {
18+
if ($result === false) {
1919
throw ApacheException::createFromPhpError();
2020
}
2121
return $result;
@@ -28,34 +28,34 @@ function apache_get_version(): string
2828
* ignore_user_abort(true) and periodic
2929
* apache_reset_timeout calls, Apache can theoretically
3030
* run forever.
31-
*
31+
*
3232
* This function requires Apache 1.
33-
*
33+
*
3434
* @throws ApacheException
35-
*
35+
*
3636
*/
3737
function apache_reset_timeout(): void
3838
{
3939
error_clear_last();
4040
$result = \apache_reset_timeout();
41-
if ($result === FALSE) {
41+
if ($result === false) {
4242
throw ApacheException::createFromPhpError();
4343
}
4444
}
4545

4646

4747
/**
4848
* Fetch all HTTP response headers.
49-
*
49+
*
5050
* @return array An array of all Apache response headers on success .
5151
* @throws ApacheException
52-
*
52+
*
5353
*/
5454
function apache_response_headers(): array
5555
{
5656
error_clear_last();
5757
$result = \apache_response_headers();
58-
if ($result === FALSE) {
58+
if ($result === false) {
5959
throw ApacheException::createFromPhpError();
6060
}
6161
return $result;
@@ -66,20 +66,18 @@ function apache_response_headers(): array
6666
* apache_setenv sets the value of the Apache
6767
* environment variable specified by
6868
* variable.
69-
*
69+
*
7070
* @param string $variable The environment variable that's being set.
7171
* @param string $value The new variable value.
7272
* @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers.
7373
* @throws ApacheException
74-
*
74+
*
7575
*/
7676
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
7777
{
7878
error_clear_last();
7979
$result = \apache_setenv($variable, $value, $walk_to_top);
80-
if ($result === FALSE) {
80+
if ($result === false) {
8181
throw ApacheException::createFromPhpError();
8282
}
8383
}
84-
85-

generated/apc.php

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@
55
use Safe\Exceptions\ApcException;
66

77
/**
8-
* apc_cas updates an already existing integer value if the
9-
* old parameter matches the currently stored value
8+
* apc_cas updates an already existing integer value if the
9+
* old parameter matches the currently stored value
1010
* with the value of the new parameter.
11-
*
11+
*
1212
* @param string $key The key of the value being updated.
1313
* @param int $old The old value (the value currently stored).
1414
* @param int $new The new value to update to.
1515
* @throws ApcException
16-
*
16+
*
1717
*/
1818
function apc_cas(string $key, int $old, int $new): void
1919
{
2020
error_clear_last();
2121
$result = \apc_cas($key, $old, $new);
22-
if ($result === FALSE) {
22+
if ($result === false) {
2323
throw ApcException::createFromPhpError();
2424
}
2525
}
2626

2727

2828
/**
2929
* Stores a file in the bytecode cache, bypassing all filters.
30-
*
30+
*
3131
* @param string $filename Full or relative path to a PHP file that will be compiled and stored in
3232
* the bytecode cache.
33-
* @param bool $atomic
33+
* @param bool $atomic
3434
* @return mixed Returns TRUE on success .
3535
* @throws ApcException
36-
*
36+
*
3737
*/
3838
function apc_compile_file(string $filename, bool $atomic = true)
3939
{
4040
error_clear_last();
4141
$result = \apc_compile_file($filename, $atomic);
42-
if ($result === FALSE) {
42+
if ($result === false) {
4343
throw ApcException::createFromPhpError();
4444
}
4545
return $result;
@@ -48,25 +48,25 @@ function apc_compile_file(string $filename, bool $atomic = true)
4848

4949
/**
5050
* Decreases a stored integer value.
51-
*
51+
*
5252
* @param string $key The key of the value being decreased.
5353
* @param int $step The step, or value to decrease.
5454
* @param bool $success Optionally pass the success or fail boolean value to
5555
* this referenced variable.
5656
* @return int Returns the current value of key's value on success,
57-
*
57+
*
5858
* @throws ApcException
59-
*
59+
*
6060
*/
6161
function apc_dec(string $key, int $step = 1, bool &$success = null): int
6262
{
6363
error_clear_last();
6464
if ($success !== null) {
6565
$result = \apc_dec($key, $step, $success);
66-
}else {
66+
} else {
6767
$result = \apc_dec($key, $step);
6868
}
69-
if ($result === FALSE) {
69+
if ($result === false) {
7070
throw ApcException::createFromPhpError();
7171
}
7272
return $result;
@@ -78,10 +78,10 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
7878
* APC is to increase the performance of scripts/applications, this mechanism
7979
* is provided to streamline the process of mass constant definition. However,
8080
* this function does not perform as well as anticipated.
81-
*
81+
*
8282
* For a better-performing solution, try the
8383
* hidef extension from PECL.
84-
*
84+
*
8585
* @param string $key The key serves as the name of the constant set
8686
* being stored. This key is used to retrieve the
8787
* stored constants in apc_load_constants.
@@ -94,21 +94,21 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
9494
* represent different values. If this parameter evaluates to FALSE the
9595
* constants will be declared as case-insensitive symbols.
9696
* @throws ApcException
97-
*
97+
*
9898
*/
9999
function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void
100100
{
101101
error_clear_last();
102102
$result = \apc_define_constants($key, $constants, $case_sensitive);
103-
if ($result === FALSE) {
103+
if ($result === false) {
104104
throw ApcException::createFromPhpError();
105105
}
106106
}
107107

108108

109109
/**
110110
* Deletes the given files from the opcode cache.
111-
*
111+
*
112112
* @param mixed $keys The files to be deleted. Accepts a string,
113113
* array of strings, or an APCIterator
114114
* object.
@@ -117,13 +117,13 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv
117117
* an empty array is returned on success, or an array of failed files
118118
* is returned.
119119
* @throws ApcException
120-
*
120+
*
121121
*/
122122
function apc_delete_file($keys)
123123
{
124124
error_clear_last();
125125
$result = \apc_delete_file($keys);
126-
if ($result === FALSE) {
126+
if ($result === false) {
127127
throw ApcException::createFromPhpError();
128128
}
129129
return $result;
@@ -132,17 +132,17 @@ function apc_delete_file($keys)
132132

133133
/**
134134
* Removes a stored variable from the cache.
135-
*
135+
*
136136
* @param string|string[]|APCIterator $key The key used to store the value (with
137137
* apc_store).
138138
* @throws ApcException
139-
*
139+
*
140140
*/
141141
function apc_delete(string $key)
142142
{
143143
error_clear_last();
144144
$result = \apc_delete($key);
145-
if ($result === FALSE) {
145+
if ($result === false) {
146146
throw ApcException::createFromPhpError();
147147
}
148148
return $result;
@@ -151,25 +151,25 @@ function apc_delete(string $key)
151151

152152
/**
153153
* Increases a stored number.
154-
*
154+
*
155155
* @param string $key The key of the value being increased.
156156
* @param int $step The step, or value to increase.
157157
* @param bool $success Optionally pass the success or fail boolean value to
158158
* this referenced variable.
159159
* @return int Returns the current value of key's value on success,
160-
*
160+
*
161161
* @throws ApcException
162-
*
162+
*
163163
*/
164164
function apc_inc(string $key, int $step = 1, bool &$success = null): int
165165
{
166166
error_clear_last();
167167
if ($success !== null) {
168168
$result = \apc_inc($key, $step, $success);
169-
}else {
169+
} else {
170170
$result = \apc_inc($key, $step);
171171
}
172-
if ($result === FALSE) {
172+
if ($result === false) {
173173
throw ApcException::createFromPhpError();
174174
}
175175
return $result;
@@ -178,23 +178,21 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
178178

179179
/**
180180
* Loads a set of constants from the cache.
181-
*
181+
*
182182
* @param string $key The name of the constant set (that was stored with
183183
* apc_define_constants) to be retrieved.
184184
* @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
185185
* i.e. CONSTANT and Constant
186186
* represent different values. If this parameter evaluates to FALSE the
187187
* constants will be declared as case-insensitive symbols.
188188
* @throws ApcException
189-
*
189+
*
190190
*/
191191
function apc_load_constants(string $key, bool $case_sensitive = true): void
192192
{
193193
error_clear_last();
194194
$result = \apc_load_constants($key, $case_sensitive);
195-
if ($result === FALSE) {
195+
if ($result === false) {
196196
throw ApcException::createFromPhpError();
197197
}
198198
}
199-
200-

0 commit comments

Comments
 (0)