diff --git a/src/PhpSpreadsheet/Reader/Gnumeric/PageSetup.php b/src/PhpSpreadsheet/Reader/Gnumeric/PageSetup.php index dbe30061..0fe73005 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric/PageSetup.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric/PageSetup.php @@ -19,7 +19,7 @@ class PageSetup */ private $gnm; - public function __construct(Spreadsheet $spreadsheet, $gnm) + public function __construct(Spreadsheet $spreadsheet, string $gnm) { $this->spreadsheet = $spreadsheet; $this->gnm = $gnm; diff --git a/src/PhpSpreadsheet/Worksheet/PageMargins.php b/src/PhpSpreadsheet/Worksheet/PageMargins.php index d59c6afd..a8297933 100644 --- a/src/PhpSpreadsheet/Worksheet/PageMargins.php +++ b/src/PhpSpreadsheet/Worksheet/PageMargins.php @@ -212,32 +212,32 @@ class PageMargins } } - public static function fromCentimeters($value): float + public static function fromCentimeters(float $value): float { return $value / 2.54; } - public static function toCentimeters($value): float + public static function toCentimeters(float $value): float { return $value * 2.54; } - public static function fromMillimeters($value): float + public static function fromMillimeters(float $value): float { return $value / 25.4; } - public static function toMillimeters($value): float + public static function toMillimeters(float $value): float { return $value * 25.4; } - public static function fromPoints($value): float + public static function fromPoints(float $value): float { return $value / 72; } - public static function toPoints($value): float + public static function toPoints(float $value): float { return $value * 72; } diff --git a/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php index 4eb9d5bd..9a8c87a7 100644 --- a/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php @@ -68,7 +68,7 @@ class PageSetupTest extends TestCase } } - public function pageSetupAssertions() + public function pageSetupAssertions(): array { return [ 'Sheet1' => [ @@ -103,7 +103,7 @@ class PageSetupTest extends TestCase ]; } - public function pageMarginAssertions() + public function pageMarginAssertions(): array { return [ 'Sheet1' => [ diff --git a/tests/PhpSpreadsheetTests/Reader/Ods/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Ods/PageSetupTest.php index a8e681d4..0e06fb43 100644 --- a/tests/PhpSpreadsheetTests/Reader/Ods/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Ods/PageSetupTest.php @@ -70,7 +70,7 @@ class PageSetupTest extends TestCase } } - public function pageSetupAssertions() + public function pageSetupAssertions(): array { return [ 'Sheet1' => [ @@ -105,7 +105,7 @@ class PageSetupTest extends TestCase ]; } - public function pageMarginAssertions() + public function pageMarginAssertions(): array { return [ 'Sheet1' => [ diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/PageSetupTest.php index a5282405..be704f30 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xls/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xls/PageSetupTest.php @@ -70,7 +70,7 @@ class PageSetupTest extends TestCase } } - public function pageSetupAssertions() + public function pageSetupAssertions(): array { return [ 'Sheet1' => [ @@ -105,7 +105,7 @@ class PageSetupTest extends TestCase ]; } - public function pageMarginAssertions() + public function pageMarginAssertions(): array { return [ 'Sheet1' => [ diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetupTest.php index 3efb581a..5dc16a89 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetupTest.php @@ -70,7 +70,7 @@ class PageSetupTest extends TestCase } } - public function pageSetupAssertions() + public function pageSetupAssertions(): array { return [ 'Sheet1' => [ @@ -105,7 +105,7 @@ class PageSetupTest extends TestCase ]; } - public function pageMarginAssertions() + public function pageMarginAssertions(): array { return [ 'Sheet1' => [ diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php index d6313281..685421d8 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php @@ -70,7 +70,7 @@ class PageSetupTest extends TestCase } } - public function pageSetupAssertions() + public function pageSetupAssertions(): array { return [ 'Sheet1' => [ @@ -105,7 +105,7 @@ class PageSetupTest extends TestCase ]; } - public function pageMarginAssertions() + public function pageMarginAssertions(): array { return [ 'Sheet1' => [ diff --git a/tests/PhpSpreadsheetTests/Worksheet/PageMarginsTest.php b/tests/PhpSpreadsheetTests/Worksheet/PageMarginsTest.php index b9713707..0006a033 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/PageMarginsTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/PageMarginsTest.php @@ -61,7 +61,7 @@ class PageMarginsTest extends TestCase self::assertSame($expectedResult, $actualResult); } - public function providerPointsAndInches() + public function providerPointsAndInches(): array { return [ [36, 0.5], @@ -71,7 +71,7 @@ class PageMarginsTest extends TestCase ]; } - public function providerCentimetersAndInches() + public function providerCentimetersAndInches(): array { return [ [1.27, 0.5],