@@ -332,16 +332,18 @@ public static function getCompleteNumber(File $phpcsFile, $stackPtr)
332332 *
333333 * @since 1.0.0
334334 *
335- * @param string $string Arbitrary token content string.
335+ * @param string $textString Arbitrary text string.
336+ * This text string should be the (combined) token content of
337+ * one or more tokens which together represent a number in PHP.
336338 *
337339 * @return string|false Decimal number as a string or `FALSE` if the passed parameter
338340 * was not a numeric string.
339341 * > Note: floating point numbers with exponent will not be expanded,
340342 * but returned as-is.
341343 */
342- public static function getDecimalValue ($ string )
344+ public static function getDecimalValue ($ textString )
343345 {
344- if (\is_string ($ string ) === false || $ string === '' ) {
346+ if (\is_string ($ textString ) === false || $ textString === '' ) {
345347 return false ;
346348 }
347349
@@ -352,26 +354,26 @@ public static function getDecimalValue($string)
352354 * here to allow the hexdec(), bindec() functions to work correctly and for
353355 * the decimal/float to return a cross-version compatible decimal value.}
354356 */
355- $ string = \str_replace ('_ ' , '' , $ string );
357+ $ textString = \str_replace ('_ ' , '' , $ textString );
356358
357- if (self ::isDecimalInt ($ string ) === true ) {
358- return $ string ;
359+ if (self ::isDecimalInt ($ textString ) === true ) {
360+ return $ textString ;
359361 }
360362
361- if (self ::isHexidecimalInt ($ string ) === true ) {
362- return (string ) \hexdec ($ string );
363+ if (self ::isHexidecimalInt ($ textString ) === true ) {
364+ return (string ) \hexdec ($ textString );
363365 }
364366
365- if (self ::isBinaryInt ($ string ) === true ) {
366- return (string ) \bindec ($ string );
367+ if (self ::isBinaryInt ($ textString ) === true ) {
368+ return (string ) \bindec ($ textString );
367369 }
368370
369- if (self ::isOctalInt ($ string ) === true ) {
370- return (string ) \octdec ($ string );
371+ if (self ::isOctalInt ($ textString ) === true ) {
372+ return (string ) \octdec ($ textString );
371373 }
372374
373- if (self ::isFloat ($ string ) === true ) {
374- return $ string ;
375+ if (self ::isFloat ($ textString ) === true ) {
376+ return $ textString ;
375377 }
376378
377379 return false ;
@@ -384,20 +386,20 @@ public static function getDecimalValue($string)
384386 *
385387 * @since 1.0.0
386388 *
387- * @param string $string Arbitrary string.
389+ * @param string $textString Arbitrary string.
388390 *
389391 * @return bool
390392 */
391- public static function isDecimalInt ($ string )
393+ public static function isDecimalInt ($ textString )
392394 {
393- if (\is_string ($ string ) === false || $ string === '' ) {
395+ if (\is_string ($ textString ) === false || $ textString === '' ) {
394396 return false ;
395397 }
396398
397399 // Remove potential PHP 7.4 numeric literal separators.
398- $ string = \str_replace ('_ ' , '' , $ string );
400+ $ textString = \str_replace ('_ ' , '' , $ textString );
399401
400- return (\preg_match (self ::REGEX_DECIMAL_INT , $ string ) === 1 );
402+ return (\preg_match (self ::REGEX_DECIMAL_INT , $ textString ) === 1 );
401403 }
402404
403405 /**
@@ -407,20 +409,20 @@ public static function isDecimalInt($string)
407409 *
408410 * @since 1.0.0
409411 *
410- * @param string $string Arbitrary string.
412+ * @param string $textString Arbitrary string.
411413 *
412414 * @return bool
413415 */
414- public static function isHexidecimalInt ($ string )
416+ public static function isHexidecimalInt ($ textString )
415417 {
416- if (\is_string ($ string ) === false || $ string === '' ) {
418+ if (\is_string ($ textString ) === false || $ textString === '' ) {
417419 return false ;
418420 }
419421
420422 // Remove potential PHP 7.4 numeric literal separators.
421- $ string = \str_replace ('_ ' , '' , $ string );
423+ $ textString = \str_replace ('_ ' , '' , $ textString );
422424
423- return (\preg_match (self ::REGEX_HEX_INT , $ string ) === 1 );
425+ return (\preg_match (self ::REGEX_HEX_INT , $ textString ) === 1 );
424426 }
425427
426428 /**
@@ -430,20 +432,20 @@ public static function isHexidecimalInt($string)
430432 *
431433 * @since 1.0.0
432434 *
433- * @param string $string Arbitrary string.
435+ * @param string $textString Arbitrary string.
434436 *
435437 * @return bool
436438 */
437- public static function isBinaryInt ($ string )
439+ public static function isBinaryInt ($ textString )
438440 {
439- if (\is_string ($ string ) === false || $ string === '' ) {
441+ if (\is_string ($ textString ) === false || $ textString === '' ) {
440442 return false ;
441443 }
442444
443445 // Remove potential PHP 7.4 numeric literal separators.
444- $ string = \str_replace ('_ ' , '' , $ string );
446+ $ textString = \str_replace ('_ ' , '' , $ textString );
445447
446- return (\preg_match (self ::REGEX_BINARY_INT , $ string ) === 1 );
448+ return (\preg_match (self ::REGEX_BINARY_INT , $ textString ) === 1 );
447449 }
448450
449451 /**
@@ -453,20 +455,20 @@ public static function isBinaryInt($string)
453455 *
454456 * @since 1.0.0
455457 *
456- * @param string $string Arbitrary string.
458+ * @param string $textString Arbitrary string.
457459 *
458460 * @return bool
459461 */
460- public static function isOctalInt ($ string )
462+ public static function isOctalInt ($ textString )
461463 {
462- if (\is_string ($ string ) === false || $ string === '' ) {
464+ if (\is_string ($ textString ) === false || $ textString === '' ) {
463465 return false ;
464466 }
465467
466468 // Remove potential PHP 7.4 numeric literal separators.
467- $ string = \str_replace ('_ ' , '' , $ string );
469+ $ textString = \str_replace ('_ ' , '' , $ textString );
468470
469- return (\preg_match (self ::REGEX_OCTAL_INT , $ string ) === 1 );
471+ return (\preg_match (self ::REGEX_OCTAL_INT , $ textString ) === 1 );
470472 }
471473
472474 /**
@@ -476,19 +478,19 @@ public static function isOctalInt($string)
476478 *
477479 * @since 1.0.0
478480 *
479- * @param string $string Arbitrary string.
481+ * @param string $textString Arbitrary string.
480482 *
481483 * @return bool
482484 */
483- public static function isFloat ($ string )
485+ public static function isFloat ($ textString )
484486 {
485- if (\is_string ($ string ) === false || $ string === '' ) {
487+ if (\is_string ($ textString ) === false || $ textString === '' ) {
486488 return false ;
487489 }
488490
489491 // Remove potential PHP 7.4 numeric literal separators.
490- $ string = \str_replace ('_ ' , '' , $ string );
492+ $ textString = \str_replace ('_ ' , '' , $ textString );
491493
492- return (\preg_match (self ::REGEX_FLOAT , $ string ) === 1 );
494+ return (\preg_match (self ::REGEX_FLOAT , $ textString ) === 1 );
493495 }
494496}
0 commit comments