Skip to content

Commit

Permalink
Merge pull request #106 from WordPress/instanceof-and-other-operators
Browse files Browse the repository at this point in the history
Instanceof and other operators
  • Loading branch information
jrfnl authored Aug 26, 2022
2 parents 75cc59f + 920b270 commit d521191
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wordpress-coding-standards/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Where possible, dynamic values in tag names should also be as succinct and to th

### Space Usage

Always put spaces after commas, and on both sides of logical, comparison, string and assignment operators.
Always put spaces after commas, and on both sides of logical, arithmetic, comparison, string and assignment operators.

```php
SOME_CONST === 23;
Expand All @@ -152,6 +152,8 @@ foo() && bar();
array( 1, 2, 3 );
$baz . '-5';
$term .= 'X';
if( $object instanceof Post_Type_Interface ) { [...] };
$result = 2 ** 3; // 8.
```

Put spaces on both sides of the opening and closing parentheses of control structure blocks.
Expand Down

0 comments on commit d521191

Please sign in to comment.