Skip to content

Commit

Permalink
cs-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Mar 12, 2019
1 parent 52bb63b commit ebb3f4f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/Video/Info/AspectRatio.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@ class AspectRatio
{
public const DEFAULT_PROPORTION_SEPARATOR = ':';

/**
* @var float
*/
/** @var float */
private $x;

/**
* @var float
*/
/** @var float */
private $y;

/**
* @var string
*/
/** @var string */
private $separator;

public function __construct(float $x, float $y, string $separator = self::DEFAULT_PROPORTION_SEPARATOR)
Expand Down Expand Up @@ -69,7 +63,7 @@ public static function createFromString(string $proportions, string $separator =
return new self((float) $x, (float) $y);
}

public function getString(string $separator = self::DEFAULT_PROPORTION_SEPARATOR, int $maxDecimals = null): string
public function getString(string $separator = self::DEFAULT_PROPORTION_SEPARATOR, ?int $maxDecimals = null): string
{
return sprintf(
'%s%s%s',
Expand All @@ -84,7 +78,7 @@ public function __toString(): string
return $this->getString(self::DEFAULT_PROPORTION_SEPARATOR);
}

private function getFloatAsString(float $number, int $maxDecimals = null): string
private function getFloatAsString(float $number, ?int $maxDecimals = null): string
{
$n = (string) $number;

Expand Down

0 comments on commit ebb3f4f

Please sign in to comment.