plugin-php
plugin-php copied to clipboard
ugly retif with only false expr and call
Prettier 1.14.3
PHP Plugin 0.7.0
Input:
$var = $this->getFromLocalArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?: $key;
$var = $this->getFromLocalOnlyArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?: $key;
return $this->getFromLocalArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?: $key;
Output:
$var =
$this->getFromLocalArray($attribute, $lowerRule, $this->fallbackMessages) ?:
$key;
$var =
$this->getFromLocalOnlyArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?:
$key;
return $this->getFromLocalArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?:
$key;
Expected behavior:
$var =
$this->getFromLocalArray($attribute, $lowerRule, $this->fallbackMessages) ?:
$key;
$var =
$this->getFromLocalOnlyArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?: $key;
return $this->getFromLocalArray(
$attribute,
$lowerRule,
$this->fallbackMessages
) ?: $key;
Same problem:
$this->recaller = @unserialize($recaller, [
'allowed_classes' => false
]) ?:
$recaller;