Skip to content

Conversation

@arshidkv12
Copy link
Contributor

$result = trim(strtoupper("Hello World"));
$result = strtoupper(Hello World) |> trim(...);


public function getNodeTypes(): array
{
return [Assign::class, FuncCall::class];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use StmtsAwareInterface, loop and break/skip when extra vars is used or in the middle per example at https://amitmerchant.com/everything-that-is-coming-in-php-85/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

if (! $node->expr instanceof FuncCall) {
return null;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip $node->firstClassCallable()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. vendor/bin/phpstan analyse --ansi not working.

vendor/bin/phpstan analyse --ansi                                                                  
Note: Using configuration file /Users/arshid/Downloads/rector-src/phpstan.neon.

In Resolver.php line 482:
                                                                                                                                                      
  Service 'rules.0' (type of Symplify\PHPStanRules\Rules\NoDynamicNameRule): Service of type Symplify\PHPStanRules\TypeAnalyzer\CallableTypeAnalyzer  
   required by $callableTypeAnalyzer in NoDynamicNameRule::__construct() not found. Did you add it to configuration file?                             
                                  

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce, you may have vendor/ issue, probably remove and run composer update:

rm -rf vendor
composer update

@TomasVotruba
Copy link
Member

Is there any blocker to move this forward? I'd like to give it a go

@arshidkv12
Copy link
Contributor Author

Thank you for checking. There are no blockers on my side—please proceed.

@TomasVotruba
Copy link
Member

@arshidkv12 Awesome... could you rebase on latest dev-main?

@arshidkv12
Copy link
Contributor Author

@arshidkv12 Awesome... could you rebase on latest dev-main?

Ok

@samsonasik
Copy link
Member

@arshidkv12 please use StmtsAwareInterface to loop and apply like my suggestion above #7201 (review)

@arshidkv12
Copy link
Contributor Author

@arshidkv12 please use StmtsAwareInterface to loop and apply like my suggestion above #7201 (review)

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants