Gah! Using PHPStorm refactor changes the formatting, so valid code suddenly triggers in phpcs

This commit is contained in:
MarkBaker 2020-07-05 18:32:40 +02:00
parent 6cbb622a9e
commit f3fc321177
1 changed files with 7 additions and 7 deletions

View File

@ -115,16 +115,16 @@ class PageSettings
private function setLayout(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void private function setLayout(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void
{ {
$printDefaults->orientation = (string)strtolower($pageSetupAttributes->Orientation) ?: PageSetup::ORIENTATION_PORTRAIT; $printDefaults->orientation = (string) strtolower($pageSetupAttributes->Orientation) ?: PageSetup::ORIENTATION_PORTRAIT;
$printDefaults->horizontalCentered = (bool)$pageSetupAttributes->CenterHorizontal ?: false; $printDefaults->horizontalCentered = (bool) $pageSetupAttributes->CenterHorizontal ?: false;
$printDefaults->verticalCentered = (bool)$pageSetupAttributes->CenterVertical ?: false; $printDefaults->verticalCentered = (bool) $pageSetupAttributes->CenterVertical ?: false;
} }
private function setMargins(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void private function setMargins(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void
{ {
$printDefaults->leftMargin = (float)$pageSetupAttributes->Left ?: 1.0; $printDefaults->leftMargin = (float) $pageSetupAttributes->Left ?: 1.0;
$printDefaults->rightMargin = (float)$pageSetupAttributes->Right ?: 1.0; $printDefaults->rightMargin = (float) $pageSetupAttributes->Right ?: 1.0;
$printDefaults->topMargin = (float)$pageSetupAttributes->Top ?: 1.0; $printDefaults->topMargin = (float) $pageSetupAttributes->Top ?: 1.0;
$printDefaults->bottomMargin = (float)$pageSetupAttributes->Bottom ?: 1.0; $printDefaults->bottomMargin = (float) $pageSetupAttributes->Bottom ?: 1.0;
} }
} }