Missing typing

This commit is contained in:
Adrien Crivelli 2020-07-19 12:21:40 +09:00 committed by GitHub
parent 47eb3e9f12
commit c3fa31de13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 19 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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' => [

View File

@ -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],