Skip to content

Commit 5405819

Browse files
committed
Switching to 100% relative namespace for exceptions. Fixing exception with dash
1 parent c7168e2 commit 5405819

Some content is hidden

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

86 files changed

+2059
-1875
lines changed

generated/Exceptions/Ingres-iiException.php

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
namespace Safe\Exceptions;
3+
4+
class IngresiiException extends AbstractSafeException
5+
{
6+
}

generated/apache.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
namespace Safe;
44

5+
use Safe\Exceptions\ApacheException;
6+
57
/**
68
* Fetch the Apache version.
79
*
810
* @return string Returns the Apache version on success .
9-
* @throws Exceptions\ApacheException
11+
* @throws ApacheException
1012
*
1113
*/
1214
function apache_get_version(): string
1315
{
1416
error_clear_last();
1517
$result = \apache_get_version();
1618
if ($result === FALSE) {
17-
throw Exceptions\ApacheException::createFromPhpError();
19+
throw ApacheException::createFromPhpError();
1820
}
1921
return $result;
2022
}
@@ -29,15 +31,15 @@ function apache_get_version(): string
2931
*
3032
* This function requires Apache 1.
3133
*
32-
* @throws Exceptions\ApacheException
34+
* @throws ApacheException
3335
*
3436
*/
3537
function apache_reset_timeout(): void
3638
{
3739
error_clear_last();
3840
$result = \apache_reset_timeout();
3941
if ($result === FALSE) {
40-
throw Exceptions\ApacheException::createFromPhpError();
42+
throw ApacheException::createFromPhpError();
4143
}
4244
}
4345

@@ -46,15 +48,15 @@ function apache_reset_timeout(): void
4648
* Fetch all HTTP response headers.
4749
*
4850
* @return array An array of all Apache response headers on success .
49-
* @throws Exceptions\ApacheException
51+
* @throws ApacheException
5052
*
5153
*/
5254
function apache_response_headers(): array
5355
{
5456
error_clear_last();
5557
$result = \apache_response_headers();
5658
if ($result === FALSE) {
57-
throw Exceptions\ApacheException::createFromPhpError();
59+
throw ApacheException::createFromPhpError();
5860
}
5961
return $result;
6062
}
@@ -68,15 +70,15 @@ function apache_response_headers(): array
6870
* @param string $variable The environment variable that's being set.
6971
* @param string $value The new variable value.
7072
* @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers.
71-
* @throws Exceptions\ApacheException
73+
* @throws ApacheException
7274
*
7375
*/
7476
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
7577
{
7678
error_clear_last();
7779
$result = \apache_setenv($variable, $value, $walk_to_top);
7880
if ($result === FALSE) {
79-
throw Exceptions\ApacheException::createFromPhpError();
81+
throw ApacheException::createFromPhpError();
8082
}
8183
}
8284

generated/apc.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Safe;
44

5+
use Safe\Exceptions\ApcException;
6+
57
/**
68
* apc_cas updates an already existing integer value if the
79
* old parameter matches the currently stored value
@@ -10,15 +12,15 @@
1012
* @param string $key The key of the value being updated.
1113
* @param int $old The old value (the value currently stored).
1214
* @param int $new The new value to update to.
13-
* @throws Exceptions\ApcException
15+
* @throws ApcException
1416
*
1517
*/
1618
function apc_cas(string $key, int $old, int $new): void
1719
{
1820
error_clear_last();
1921
$result = \apc_cas($key, $old, $new);
2022
if ($result === FALSE) {
21-
throw Exceptions\ApcException::createFromPhpError();
23+
throw ApcException::createFromPhpError();
2224
}
2325
}
2426

@@ -30,15 +32,15 @@ function apc_cas(string $key, int $old, int $new): void
3032
* the bytecode cache.
3133
* @param bool $atomic
3234
* @return mixed Returns TRUE on success .
33-
* @throws Exceptions\ApcException
35+
* @throws ApcException
3436
*
3537
*/
3638
function apc_compile_file(string $filename, bool $atomic = true)
3739
{
3840
error_clear_last();
3941
$result = \apc_compile_file($filename, $atomic);
4042
if ($result === FALSE) {
41-
throw Exceptions\ApcException::createFromPhpError();
43+
throw ApcException::createFromPhpError();
4244
}
4345
return $result;
4446
}
@@ -53,7 +55,7 @@ function apc_compile_file(string $filename, bool $atomic = true)
5355
* this referenced variable.
5456
* @return int Returns the current value of key's value on success,
5557
*
56-
* @throws Exceptions\ApcException
58+
* @throws ApcException
5759
*
5860
*/
5961
function apc_dec(string $key, int $step = 1, bool &$success = null): int
@@ -65,7 +67,7 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
6567
$result = \apc_dec($key, $step);
6668
}
6769
if ($result === FALSE) {
68-
throw Exceptions\ApcException::createFromPhpError();
70+
throw ApcException::createFromPhpError();
6971
}
7072
return $result;
7173
}
@@ -91,15 +93,15 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
9193
* i.e. CONSTANT and Constant
9294
* represent different values. If this parameter evaluates to FALSE the
9395
* constants will be declared as case-insensitive symbols.
94-
* @throws Exceptions\ApcException
96+
* @throws ApcException
9597
*
9698
*/
9799
function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void
98100
{
99101
error_clear_last();
100102
$result = \apc_define_constants($key, $constants, $case_sensitive);
101103
if ($result === FALSE) {
102-
throw Exceptions\ApcException::createFromPhpError();
104+
throw ApcException::createFromPhpError();
103105
}
104106
}
105107

@@ -114,15 +116,15 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv
114116
* Or if keys is an array, then
115117
* an empty array is returned on success, or an array of failed files
116118
* is returned.
117-
* @throws Exceptions\ApcException
119+
* @throws ApcException
118120
*
119121
*/
120122
function apc_delete_file($keys)
121123
{
122124
error_clear_last();
123125
$result = \apc_delete_file($keys);
124126
if ($result === FALSE) {
125-
throw Exceptions\ApcException::createFromPhpError();
127+
throw ApcException::createFromPhpError();
126128
}
127129
return $result;
128130
}
@@ -133,15 +135,15 @@ function apc_delete_file($keys)
133135
*
134136
* @param string|string[]|APCIterator $key The key used to store the value (with
135137
* apc_store).
136-
* @throws Exceptions\ApcException
138+
* @throws ApcException
137139
*
138140
*/
139141
function apc_delete(string $key)
140142
{
141143
error_clear_last();
142144
$result = \apc_delete($key);
143145
if ($result === FALSE) {
144-
throw Exceptions\ApcException::createFromPhpError();
146+
throw ApcException::createFromPhpError();
145147
}
146148
return $result;
147149
}
@@ -156,7 +158,7 @@ function apc_delete(string $key)
156158
* this referenced variable.
157159
* @return int Returns the current value of key's value on success,
158160
*
159-
* @throws Exceptions\ApcException
161+
* @throws ApcException
160162
*
161163
*/
162164
function apc_inc(string $key, int $step = 1, bool &$success = null): int
@@ -168,7 +170,7 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
168170
$result = \apc_inc($key, $step);
169171
}
170172
if ($result === FALSE) {
171-
throw Exceptions\ApcException::createFromPhpError();
173+
throw ApcException::createFromPhpError();
172174
}
173175
return $result;
174176
}
@@ -183,15 +185,15 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
183185
* i.e. CONSTANT and Constant
184186
* represent different values. If this parameter evaluates to FALSE the
185187
* constants will be declared as case-insensitive symbols.
186-
* @throws Exceptions\ApcException
188+
* @throws ApcException
187189
*
188190
*/
189191
function apc_load_constants(string $key, bool $case_sensitive = true): void
190192
{
191193
error_clear_last();
192194
$result = \apc_load_constants($key, $case_sensitive);
193195
if ($result === FALSE) {
194-
throw Exceptions\ApcException::createFromPhpError();
196+
throw ApcException::createFromPhpError();
195197
}
196198
}
197199

generated/apcu.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Safe;
44

5+
use Safe\Exceptions\ApcuException;
6+
57
/**
68
* apcu_cas updates an already existing integer value if the
79
* old parameter matches the currently stored value
@@ -10,15 +12,15 @@
1012
* @param string $key The key of the value being updated.
1113
* @param int $old The old value (the value currently stored).
1214
* @param int $new The new value to update to.
13-
* @throws Exceptions\ApcuException
15+
* @throws ApcuException
1416
*
1517
*/
1618
function apcu_cas(string $key, int $old, int $new): void
1719
{
1820
error_clear_last();
1921
$result = \apcu_cas($key, $old, $new);
2022
if ($result === FALSE) {
21-
throw Exceptions\ApcuException::createFromPhpError();
23+
throw ApcuException::createFromPhpError();
2224
}
2325
}
2426

@@ -32,7 +34,7 @@ function apcu_cas(string $key, int $old, int $new): void
3234
* this referenced variable.
3335
* @return int Returns the current value of key's value on success,
3436
*
35-
* @throws Exceptions\ApcuException
37+
* @throws ApcuException
3638
*
3739
*/
3840
function apcu_dec(string $key, int $step = 1, bool &$success = null): int
@@ -44,7 +46,7 @@ function apcu_dec(string $key, int $step = 1, bool &$success = null): int
4446
$result = \apcu_dec($key, $step);
4547
}
4648
if ($result === FALSE) {
47-
throw Exceptions\ApcuException::createFromPhpError();
49+
throw ApcuException::createFromPhpError();
4850
}
4951
return $result;
5052
}
@@ -58,15 +60,15 @@ function apcu_dec(string $key, int $step = 1, bool &$success = null): int
5860
* or as an array of strings for several keys,
5961
* or as an APCUIterator object.
6062
* @return bool|array Returns TRUE on success .
61-
* @throws Exceptions\ApcuException
63+
* @throws ApcuException
6264
*
6365
*/
6466
function apcu_delete($key): void
6567
{
6668
error_clear_last();
6769
$result = \apcu_delete($key);
6870
if ($result === FALSE) {
69-
throw Exceptions\ApcuException::createFromPhpError();
71+
throw ApcuException::createFromPhpError();
7072
}
7173
}
7274

@@ -80,7 +82,7 @@ function apcu_delete($key): void
8082
* this referenced variable.
8183
* @return int Returns the current value of key's value on success,
8284
*
83-
* @throws Exceptions\ApcuException
85+
* @throws ApcuException
8486
*
8587
*/
8688
function apcu_inc(string $key, int $step = 1, bool &$success = null): int
@@ -92,7 +94,7 @@ function apcu_inc(string $key, int $step = 1, bool &$success = null): int
9294
$result = \apcu_inc($key, $step);
9395
}
9496
if ($result === FALSE) {
95-
throw Exceptions\ApcuException::createFromPhpError();
97+
throw ApcuException::createFromPhpError();
9698
}
9799
return $result;
98100
}

0 commit comments

Comments
 (0)