src/ZenifyCodingStandard/Sniffs/WhiteSpace/OperatorSpacingSniff.php 2 locations
|
@@ 159-161 (lines=3) @@
|
| 156 |
|
private function isShortTernaryOperator() |
| 157 |
|
{ |
| 158 |
|
// *?*: |
| 159 |
|
if ($this->token['code'] === T_INLINE_THEN && $this->tokens[$this->position + 1]['code'] === T_INLINE_ELSE) { |
| 160 |
|
return TRUE; |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
// ?*:* |
| 164 |
|
if ($this->tokens[$this->position - 1]['code'] === T_INLINE_THEN && $this->token['code'] === T_INLINE_ELSE) { |
|
@@ 164-166 (lines=3) @@
|
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
// ?*:* |
| 164 |
|
if ($this->tokens[$this->position - 1]['code'] === T_INLINE_THEN && $this->token['code'] === T_INLINE_ELSE) { |
| 165 |
|
return TRUE; |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
return FALSE; |
| 169 |
|
} |