{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2573","repository_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2573/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2573/comments","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2573/events","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2573","id":211391083,"number":2573,"title":"Binary operator fixer.","user":{"login":"SpacePossum","id":10462973,"avatar_url":"https://avatars1.githubusercontent.com/u/10462973?v=4","gravatar_id":"","url":"https://api.github.com/users/SpacePossum","html_url":"https://github.com/SpacePossum","followers_url":"https://api.github.com/users/SpacePossum/followers","following_url":"https://api.github.com/users/SpacePossum/following{/other_user}","gists_url":"https://api.github.com/users/SpacePossum/gists{/gist_id}","starred_url":"https://api.github.com/users/SpacePossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpacePossum/subscriptions","organizations_url":"https://api.github.com/users/SpacePossum/orgs","repos_url":"https://api.github.com/users/SpacePossum/repos","events_url":"https://api.github.com/users/SpacePossum/events{/privacy}","received_events_url":"https://api.github.com/users/SpacePossum/received_events","type":"User","site_admin":false},"labels":[{"id":5114728,"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/bug","name":"bug","color":"fc2929","default":true},{"id":132262556,"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/feature","name":"feature","color":"009800","default":false},{"id":148214610,"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/refactoring","name":"refactoring","color":"88CCFF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-03-02T13:29:49Z","updated_at":"2017-08-19T22:00:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/2573","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2573","diff_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2573.diff","patch_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2573.patch"},"body":"closes\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1055\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2355\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2411\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2559\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2811\r\n\r\npossibly replaces (need to check)\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1566\r\nhttps://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2555\r\n\r\nFixing examples.\r\n\r\nDefault:\r\n```diff\r\n--- Original\r\n+++ New\r\n@@ @@\r\n<?php\r\n-    $a= 1  + $b^ $d !==  $e or   $f;\r\n+    $a = 1 + $b ^ $d !== $e or $f;\r\n```\r\n\r\nFixing with configuration: `['=' => 'align', 'xor' => NULL]`.\r\n```diff\r\n--- Original\r\n+++ New\r\n@@ @@\r\n <?php\r\n $aa=  1;\r\n-$b=2;\r\n+$b =2;\r\n\r\n$c = $d    xor    $e;\r\n-$f    -=  1;\r\n+$f -= 1;\r\n```\r\n\r\nFixing with configuration: `['+=' => 'align_single_space']`.\r\n```diff\r\n--- Original\r\n+++ New\r\n@@ @@\r\n <?php\r\n-$a = $b+=$c;\r\n-$d = $ee+=$f;\r\n+$a = $b  += $c;\r\n+$d = $ee += $f;\r\n```\r\n\r\nFixing with configuration: `['===' => 'align_single_space_minimal']`.\r\n```diff\r\n--- Original\r\n+++ New\r\n@@ @@\r\n <?php\r\n-$a = $b===$c;\r\n-$d = $f   ===  $g;\r\n-$h = $i===  $j;\r\n+$a = $b === $c;\r\n+$d = $f === $g;\r\n+$h = $i === $j;\r\n```\r\n\r\n```\r\nFixing examples:\r\n * Example #1. Fixing with the default configuration.\r\n   ---------- begin diff ----------\r\n   --- Original\r\n   +++ New\r\n   @@ @@\r\n    <?php\r\n   -    $a= 1  + $b^ $d !==  $e or   $f;\r\n   +    $a = 1 + $b ^ $d !== $e or $f;\r\n   ----------- end diff -----------\r\n\r\n * Example #2. Fixing with configuration: ['=' => 'align', 'xor' => null].\r\n   ---------- begin diff ----------\r\n   --- Original\r\n   +++ New\r\n   @@ @@\r\n    <?php\r\n    $aa=  1;\r\n   -$b=2;\r\n   +$b =2;\r\n\r\n    $c = $d    xor    $e;\r\n   -$f    -=  1;\r\n   +$f -= 1;\r\n   ----------- end diff -----------\r\n\r\n * Example #3. Fixing with configuration: ['+=' => 'align_single_space'].\r\n   ---------- begin diff ----------\r\n   --- Original\r\n   +++ New\r\n   @@ @@\r\n    <?php\r\n   -$a = $b +=$c;\r\n   -$d = $ee+=$f;\r\n   +$a = $b  += $c;\r\n   +$d = $ee += $f;\r\n\r\n   -$g = $b     +=$c;\r\n   -$h = $ee+=$f;\r\n   +$g = $b     += $c;\r\n   +$h = $ee    += $f;\r\n   ----------- end diff -----------\r\n\r\n * Example #4. Fixing with configuration: ['===' => 'align_single_space_minimal'].\r\n   ---------- begin diff ----------\r\n   --- Original\r\n   +++ New\r\n   @@ @@\r\n    <?php\r\n   -$a = $b===$c;\r\n   -$d = $f   ===  $g;\r\n   -$h = $i===  $j;\r\n   +$a = $b === $c;\r\n   +$d = $f === $g;\r\n   +$h = $i === $j;\r\n   ----------- end diff -----------\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments/323550110","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2573#issuecomment-323550110","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2573","id":323550110,"user":{"login":"keradus","id":2716794,"avatar_url":"https://avatars1.githubusercontent.com/u/2716794?v=4","gravatar_id":"","url":"https://api.github.com/users/keradus","html_url":"https://github.com/keradus","followers_url":"https://api.github.com/users/keradus/followers","following_url":"https://api.github.com/users/keradus/following{/other_user}","gists_url":"https://api.github.com/users/keradus/gists{/gist_id}","starred_url":"https://api.github.com/users/keradus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keradus/subscriptions","organizations_url":"https://api.github.com/users/keradus/orgs","repos_url":"https://api.github.com/users/keradus/repos","events_url":"https://api.github.com/users/keradus/events{/privacy}","received_events_url":"https://api.github.com/users/keradus/received_events","type":"User","site_admin":false},"created_at":"2017-08-19T22:00:33Z","updated_at":"2017-08-19T22:00:33Z","body":"sadly, there is no place in readme for providing examples, but we do it when you execute `php-cs-fixer describe rule_name`"}}
{"actor":{"display_login":"keradus"}}