Skip to content

Commit

Permalink
Improve code climate
Browse files Browse the repository at this point in the history
  • Loading branch information
jkphl committed Apr 14, 2018
1 parent 21da4e2 commit e064c4a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Respimgcss/Infrastructure/SourceSizeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,7 @@ protected function findImageCandidateForSourceSize(
return $this->findImageCandidateForMinImageWidth(
$sourceSize,
$imageCandidates,
round(
max(
$sourceSize->getValue()->getValue($minWidth),
$sourceSize->getValue()->getValue($maxWidth)
) * $density
)
max($sourceSize->getValue()->getValue($minWidth), $sourceSize->getValue()->getValue($maxWidth)) * $density
);
}

Expand Down Expand Up @@ -246,14 +241,14 @@ protected function createImageCandidateMatch(
*
* @param SourceSize $sourceSize Matching source size
* @param ImageCandidateSetInterface $imageCandidates Image candidates
* @param int $minImageWidth Minimum image width
* @param float $minImageWidth Minimum image width
*
* @return SourceSizeImageCandidateMatch|null Image candidate
*/
protected function findImageCandidateForMinImageWidth(
SourceSize $sourceSize,
ImageCandidateSetInterface $imageCandidates,
int $minImageWidth
float $minImageWidth
): ?SourceSizeImageCandidateMatch {
// Run through all image candidates
/** @var ImageCandidateInterface $imageCandidate */
Expand Down

0 comments on commit e064c4a

Please sign in to comment.