Skip to content

Commit

Permalink
fix: styleci
Browse files Browse the repository at this point in the history
  • Loading branch information
CamKem committed Sep 9, 2024
1 parent 868bac0 commit 5812d03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1002,18 +1002,18 @@ protected function parseStringParameters($parameters)
}

/**
* Parse the ratio values to floats.
*
* @param string $ratio
* @return float
*/
* Parse the ratio values to floats.
*
* @param string $ratio
* @return float
*/
private function parseRatio($ratio)
{
if (str_contains($ratio, '/')) {
[$numerator, $denominator] = array_replace(
[1, 1], array_filter(sscanf($ratio, '%f/%d'))
);
return (float) ($numerator / $denominator);
return (float) ($numerator / $denominator);
}

return (float) $ratio;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Rules/Dimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function minHeight($value)
*/
public function maxWidth($value)
{
$this->maxWidth =$value;
$this->maxWidth = $value;

return $this;
}
Expand Down
2 changes: 0 additions & 2 deletions tests/Validation/ValidationDimensionsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

class ValidationDimensionsRuleTest extends TestCase
{

public function testWidth()
{
$rule = Dimensions::defaults()->width(100);
Expand Down Expand Up @@ -124,7 +123,6 @@ public function testMinHeight()
);
}


public function testMaxHeight()
{
$rule = Dimensions::defaults()->maxHeight(100);
Expand Down

0 comments on commit 5812d03

Please sign in to comment.