Skip to content

Commit f7b88cd

Browse files
committed
Update
1 parent 47b3eb3 commit f7b88cd

16 files changed

Lines changed: 80 additions & 80 deletions

‎src/Html/Form.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ protected function buildBody() : void
468468
if ( $input['use-request'] ) {
469469
$except = ['html', 'string', 'title', 'radio', 'checkbox', 'select', 'submit'];
470470
if ( !Stringify::contains($except, $input['type']) ) {
471-
if ( Request::isSetted($input['name']) ) {
471+
if ( Request::isSet($input['name']) ) {
472472
$input['value'] = Request::get($input['name']);
473473
}
474474
}
@@ -956,7 +956,7 @@ protected function getInputContent(array $input = []) : string
956956
foreach ($input['options'] as $key => $option) {
957957
$selected = false;
958958
if ( $input['use-request'] ) {
959-
if ( Request::isSetted($input['name']) ) {
959+
if ( Request::isSet($input['name']) ) {
960960
if ( Request::get($input['name']) === $key ) {
961961
$selected = true;
962962
}
@@ -988,7 +988,7 @@ protected function getInputContent(array $input = []) : string
988988

989989
if ( !$checked ) {
990990
if ( $input['use-request'] ) {
991-
if ( Request::isSetted($input['name']) ) {
991+
if ( Request::isSet($input['name']) ) {
992992
if ( Stringify::contains(Request::get($input['name']), $key) ) {
993993
$checked = true;
994994
}

‎src/Http/Cookie.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ final class Cookie
5454
public static function get(?string $key = null, bool $validate = true) : mixed
5555
{
5656
if ( $key ) {
57-
if ( !self::isSetted($key) ) {
57+
if ( !self::isSet($key) ) {
5858
return null;
5959
}
6060

@@ -67,7 +67,7 @@ public static function get(?string $key = null, bool $validate = true) : mixed
6767
return $value;
6868
}
6969

70-
if ( !self::isSetted() ) {
70+
if ( !self::isSet() ) {
7171
return null;
7272
}
7373

@@ -153,7 +153,7 @@ public static function setSecure(string $key, mixed $value = '', int $expires =
153153
*/
154154
public static function delete(string $key, string $path = '/', string $domain = '') : bool
155155
{
156-
if ( self::isSetted($key) ) {
156+
if ( self::isSet($key) ) {
157157
unset($_COOKIE[$key]);
158158
return setcookie($key, '', [
159159
'expires' => time() - 3600,
@@ -171,7 +171,7 @@ public static function delete(string $key, string $path = '/', string $domain =
171171
* @param string $key
172172
* @return bool
173173
*/
174-
public static function isSetted(?string $key = null) : bool
174+
public static function isSet(?string $key = null) : bool
175175
{
176176
if ( $key ) {
177177
return isset($_COOKIE[$key]);

‎src/Http/Get.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ final class Get
3030
public static function get(?string $key = null) : mixed
3131
{
3232
if ( $key ) {
33-
return self::isSetted($key) ? $_GET[$key] : null;
33+
return self::isSet($key) ? $_GET[$key] : null;
3434
}
35-
return self::isSetted() ? $_GET : null;
35+
return self::isSet() ? $_GET : null;
3636
}
3737

3838
/**
@@ -55,7 +55,7 @@ public static function set(string $key, $value = null) : void
5555
* @param string $key
5656
* @return bool
5757
*/
58-
public static function isSetted(?string $key = null) : bool
58+
public static function isSet(?string $key = null) : bool
5959
{
6060
if ( $key ) {
6161
return isset($_GET[$key]);

‎src/Http/Post.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ final class Post
3030
public static function get(?string $key = null) : mixed
3131
{
3232
if ( $key ) {
33-
return self::isSetted($key) ? $_POST[$key] : null;
33+
return self::isSet($key) ? $_POST[$key] : null;
3434
}
35-
return self::isSetted() ? $_POST : null;
35+
return self::isSet() ? $_POST : null;
3636
}
3737

3838
/**
@@ -55,7 +55,7 @@ public static function set(?string $key = null, $value = null) : void
5555
* @param string $key
5656
* @return bool
5757
*/
58-
public static function isSetted(?string $key = null) : bool
58+
public static function isSet(?string $key = null) : bool
5959
{
6060
if ( $key ) {
6161
return isset($_POST[$key]);

‎src/Http/Request.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ final class Request
3030
public static function get(?string $key = null) : mixed
3131
{
3232
if ( $key ) {
33-
return self::isSetted($key) ? $_REQUEST[$key] : null;
33+
return self::isSet($key) ? $_REQUEST[$key] : null;
3434
}
35-
return self::isSetted() ? $_REQUEST : null;
35+
return self::isSet() ? $_REQUEST : null;
3636
}
3737

3838
/**
@@ -55,7 +55,7 @@ public static function set(string $key, $value = null) : void
5555
* @param string $key
5656
* @return bool
5757
*/
58-
public static function isSetted(?string $key = null) : bool
58+
public static function isSet(?string $key = null) : bool
5959
{
6060
if ( $key ) {
6161
return isset($_REQUEST[$key]);

‎src/Http/Server.php‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public static function get(?string $key = null, $format = true) : mixed
3434
{
3535
if ( $key ) {
3636
if ( $format ) $key = Stringify::undash($key, true);
37-
return self::isSetted($key) ? $_SERVER[$key] : null;
37+
return self::isSet($key) ? $_SERVER[$key] : null;
3838
}
39-
return self::isSetted() ? $_SERVER : null;
39+
return self::isSet() ? $_SERVER : null;
4040
}
4141

4242
/**
@@ -62,7 +62,7 @@ public static function set(string $key, $value = null, $format = true) : void
6262
* @param bool $format
6363
* @return bool
6464
*/
65-
public static function isSetted(?string $key = null, $format = true) : bool
65+
public static function isSet(?string $key = null, $format = true) : bool
6666
{
6767
if ( $key ) {
6868
if ( $format ) $key = Stringify::undash($key, true);
@@ -104,28 +104,28 @@ public static function getIp(?string $domain = null) : string
104104
return Validator::isIp($ip) ? $ip : $default;
105105
}
106106

107-
if ( self::isSetted('http-x-real-ip') ) {
107+
if ( self::isSet('http-x-real-ip') ) {
108108
$ip = self::get('http-x-real-ip');
109109
return Validator::isIp($ip) ? $ip : $default;
110110
}
111111

112-
if ( self::isSetted('http-x-forwarded-for') ) {
112+
if ( self::isSet('http-x-forwarded-for') ) {
113113
$ip = self::get('http-x-forwarded-for');
114114
$ip = Stringify::stripSlash($ip);
115115
$ip = Stringify::split($ip, ['regex' => '/,/']);
116116
$ip = (string)trim(current($ip));
117117
return Validator::isIp($ip) ? $ip : $default;
118118
}
119119

120-
if ( self::isSetted('http-cf-connecting-ip') ) {
120+
if ( self::isSet('http-cf-connecting-ip') ) {
121121
$ip = self::get('http-cf-connecting-ip');
122122
$ip = Stringify::stripSlash($ip);
123123
$ip = Stringify::split($ip, ['regex' => '/,/']);
124124
$ip = (string)trim(current($ip));
125125
return Validator::isIp($ip) ? $ip : $default;
126126
}
127127

128-
if ( self::isSetted('remote-addr') ) {
128+
if ( self::isSet('remote-addr') ) {
129129
$ip = self::get('remote-addr');
130130
$ip = Stringify::stripSlash($ip);
131131
return Validator::isIp($ip) ? $ip : $default;
@@ -162,7 +162,7 @@ public static function getCountryCode(array $headers = []) : mixed
162162
], $headers);
163163

164164
foreach ($headers as $header) {
165-
if ( self::isSetted($header) ) {
165+
if ( self::isSet($header) ) {
166166
$code = self::get($header);
167167
if ( !empty($code) ) {
168168
$code = Stringify::stripSlash($code);
@@ -294,11 +294,11 @@ public static function getBasicAuthPwd() : string
294294
*/
295295
public static function getAuthorizationHeaders() : mixed
296296
{
297-
if ( self::isSetted('Authorization', false) ) {
297+
if ( self::isSet('Authorization', false) ) {
298298
return trim(self::get('Authorization', false));
299299
}
300300

301-
if ( self::isSetted('http-authorization') ) {
301+
if ( self::isSet('http-authorization') ) {
302302
return trim(self::get('http-authorization'));
303303
}
304304

@@ -340,7 +340,7 @@ public static function getBearerToken() : string
340340
*/
341341
public static function isSsl() : bool
342342
{
343-
if ( self::isSetted('https') ) {
343+
if ( self::isSet('https') ) {
344344

345345
$isOn = strtolower(self::get('https')) === 'on';
346346
$isOne = self::get('https') === '1';
@@ -349,7 +349,7 @@ public static function isSsl() : bool
349349
return true;
350350
}
351351

352-
} elseif ( self::isSetted('server-port') ) {
352+
} elseif ( self::isSet('server-port') ) {
353353
return self::get('server-port') === '443';
354354
}
355355

‎src/Http/Session.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ public static function isRegistered() : bool
229229
public static function get(?string $key = null) : mixed
230230
{
231231
if ( $key ) {
232-
return self::isSetted($key) ? $_SESSION[$key] : null;
232+
return self::isSet($key) ? $_SESSION[$key] : null;
233233
}
234-
return self::isSetted() ? $_SESSION : null;
234+
return self::isSet() ? $_SESSION : null;
235235
}
236236

237237
/**
@@ -254,7 +254,7 @@ public static function set(mixed $key, mixed $value = null) : void
254254
* @param string $key
255255
* @return bool
256256
*/
257-
public static function isSetted(?string $key = null) : bool
257+
public static function isSet(?string $key = null) : bool
258258
{
259259
if ( $key ) {
260260
return isset($_SESSION[$key]);

‎src/Http/Upload.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ final class Upload
3939
public static function get(?string $key = null) : mixed
4040
{
4141
if ( $key ) {
42-
return self::isSetted($key) ? $_FILES[$key] : null;
42+
return self::isSet($key) ? $_FILES[$key] : null;
4343
}
44-
return self::isSetted() ? $_FILES : null;
44+
return self::isSet() ? $_FILES : null;
4545
}
4646

4747
/**
@@ -64,7 +64,7 @@ public static function set(string $key, $value = null) : void
6464
* @param string $key
6565
* @return bool
6666
*/
67-
public static function isSetted(?string $key = null) : bool
67+
public static function isSet(?string $key = null) : bool
6868
{
6969
if ( $key ) {
7070
return isset($_FILES[$key]);
@@ -115,7 +115,7 @@ public static function move(string $from, string $to) : bool
115115
*/
116116
public static function handle(string $upload, array $args = [], array $types = [])
117117
{
118-
// if ( self::isSetted('file') ) {
118+
// if ( self::isSet('file') ) {
119119

120120
// // Handle
121121
// static::$handler = Arrayify::merge([

‎src/Security/License.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ protected function setServerData() : void
284284
{
285285
$this->server = [
286286
'ip' => Server::getIp(),
287-
'host' => Server::isSetted('http-host') ?: ''
287+
'host' => Server::isSet('http-host') ?: ''
288288
];
289289
}
290290

‎tests/CookieTest.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ public function testIsSetted(): void
8585
{
8686
$_COOKIE['test_key'] = 'test_value';
8787

88-
$this->assertTrue(Cookie::isSetted('test_key'));
89-
$this->assertFalse(Cookie::isSetted('non_existent'));
88+
$this->assertTrue(Cookie::isSet('test_key'));
89+
$this->assertFalse(Cookie::isSet('non_existent'));
9090
}
9191

9292
/**
9393
* Test check if any cookies are set.
9494
*/
9595
public function testIsSettedAny(): void
9696
{
97-
$this->assertFalse(Cookie::isSetted());
97+
$this->assertFalse(Cookie::isSet());
9898

9999
$_COOKIE['test_key'] = 'test_value';
100-
$this->assertTrue(Cookie::isSetted());
100+
$this->assertTrue(Cookie::isSet());
101101
}
102102

103103
/**
@@ -152,7 +152,7 @@ public function testCookieWithEmptyValue(): void
152152

153153
$value = Cookie::get('empty_key');
154154
$this->assertEquals('', $value);
155-
$this->assertTrue(Cookie::isSetted('empty_key'));
155+
$this->assertTrue(Cookie::isSet('empty_key'));
156156
}
157157

158158
/**
@@ -164,7 +164,7 @@ public function testCookieWithNullValue(): void
164164

165165
$value = Cookie::get('null_key');
166166
$this->assertNull($value);
167-
$this->assertTrue(Cookie::isSetted('null_key'));
167+
$this->assertTrue(Cookie::isSet('null_key'));
168168
}
169169

170170
/**

0 commit comments

Comments
 (0)