|
23 | 23 | use PhpParser\Node\Expr\Ternary; |
24 | 24 | use PhpParser\Node\Expr\Yield_; |
25 | 25 | use PhpParser\Node\InterpolatedStringPart; |
26 | | -use PhpParser\Node\Scalar\Float_; |
27 | | -use PhpParser\Node\Scalar\Int_; |
28 | 26 | use PhpParser\Node\Scalar\InterpolatedString; |
29 | 27 | use PhpParser\Node\Scalar\String_; |
30 | 28 | use PhpParser\Node\Stmt\Declare_; |
@@ -297,18 +295,6 @@ protected function pArray( |
297 | 295 | return Strings::replace($content, self::EXTRA_SPACE_BEFORE_NOP_REGEX); |
298 | 296 | } |
299 | 297 |
|
300 | | - /** |
301 | | - * Emulates 1_000 in PHP 7.3- version |
302 | | - */ |
303 | | - protected function pScalar_Float(Float_ $float): string |
304 | | - { |
305 | | - if ($this->shouldPrintNewRawValue($float)) { |
306 | | - return (string) $float->getAttribute(AttributeKey::RAW_VALUE); |
307 | | - } |
308 | | - |
309 | | - return parent::pScalar_Float($float); |
310 | | - } |
311 | | - |
312 | 298 | /** |
313 | 299 | * Do not add "()" on Expressions |
314 | 300 | * @see https://github.com/rectorphp/rector/pull/401#discussion_r181487199 |
@@ -405,19 +391,6 @@ protected function pScalar_InterpolatedString(InterpolatedString $interpolatedSt |
405 | 391 | return $content; |
406 | 392 | } |
407 | 393 |
|
408 | | - /** |
409 | | - * Invoke re-print even if only raw value was changed. |
410 | | - * That allows PHPStan to use int strict types, while changing the value with literal "_" |
411 | | - */ |
412 | | - protected function pScalar_Int(Int_ $int): string |
413 | | - { |
414 | | - if ($this->shouldPrintNewRawValue($int)) { |
415 | | - return (string) $int->getAttribute(AttributeKey::RAW_VALUE); |
416 | | - } |
417 | | - |
418 | | - return parent::pScalar_Int($int); |
419 | | - } |
420 | | - |
421 | 394 | protected function pExpr_MethodCall(MethodCall $methodCall): string |
422 | 395 | { |
423 | 396 | if (! $methodCall->var instanceof CallLike) { |
@@ -568,11 +541,6 @@ private function getIndentCharacter(): string |
568 | 541 | return SimpleParameterProvider::provideStringParameter(Option::INDENT_CHAR, ' '); |
569 | 542 | } |
570 | 543 |
|
571 | | - private function shouldPrintNewRawValue(Int_|Float_ $lNumber): bool |
572 | | - { |
573 | | - return $lNumber->getAttribute(AttributeKey::REPRINT_RAW_VALUE) === true; |
574 | | - } |
575 | | - |
576 | 544 | /** |
577 | 545 | * @param Node[] $stmts |
578 | 546 | * @return Node[]|mixed[] |
|
0 commit comments