@@ -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
0 commit comments