Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan false reports on Xml #5673

Closed
dereuromark opened this issue Sep 22, 2021 · 2 comments
Closed

PHPStan false reports on Xml #5673

dereuromark opened this issue Sep 22, 2021 · 2 comments

Comments

@dereuromark
Copy link
Contributor

Bug report

With update to .99

Code snippet that reproduces the problem

$xmlSubProcess->children()->process[0]['name'] = $processName;
...
$xmlElement[0] = $prefix . $this->stateMachineConfig->getSubProcessPrefixDelimiter() . $xmlElement[0];
...
$xmlElement->attributes()['name'] = $prefix . $this->stateMachineConfig->getSubProcessPrefixDelimiter() . $xmlElement->attributes()['name'];

results in

  Line   Spryker/Zed/StateMachine/Business/StateMachine/Builder.php
 ------ ------------------------------------------------------------
  176    SimpleXMLElement|null does not accept string.
  227    SimpleXMLElement does not accept string.
  248    SimpleXMLElement|null does not accept string.
 ------ ------------------------------------------------------------


### Expected output

No errors as this is valid/working PHP code
@mergeable
Copy link

mergeable bot commented Sep 22, 2021

This bug report is missing a link to reproduction on phpstan.org.

It will most likely be closed after manual review.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants