# Bug Report <!-- First, thank you for reporting a bug. That takes time and we appreciate that! --> | Subject | Details | | :------------- | :--------------------| | Rector version | last dev-main | | Installed as | composer dependency | ## Minimal PHP Code Causing Issue See https://getrector.com/demo/bd26b2bd-3af0-4b7a-b00b-01ea302d2556 ```php <?php $f = true AND false; var_dump($f); ``` ### Responsible rules * `LogicalToBooleanRector` ## Expected Behavior when assign exists, it should be parenthesized, see https://3v4l.org/8ZRSK vs https://3v4l.org/dAONQ <!-- How should Rector change the code? Or should Rector skip it? -->