Skip to content

Commit

Permalink
Convert spaces to tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
blankse committed Nov 28, 2022
1 parent bd268c5 commit 37d1f35
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions stubs/ImagickPixel.stub
Expand Up @@ -2,8 +2,8 @@

class ImagickPixel
{
/**
* @return ($normalized is 0 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>} : ($normalized is 1 ? array{r: float, g: float, b: float, a: float} : ($normalized is 2 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 255>} : array{})))
*/
public function getColor(int $normalized = 0): array;
/**
* @return ($normalized is 0 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>} : ($normalized is 1 ? array{r: float, g: float, b: float, a: float} : ($normalized is 2 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 255>} : array{})))
*/
public function getColor(int $normalized = 0): array;
}
12 changes: 6 additions & 6 deletions tests/PHPStan/Analyser/data/imagick-pixel.php
Expand Up @@ -5,11 +5,11 @@
use function PHPStan\Testing\assertType;

function (): void {
$imagickPixel = new \ImagickPixel('rgb(0, 0, 0)');
$imagickPixel = new \ImagickPixel('rgb(0, 0, 0)');

assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>}', $imagickPixel->getColor());
assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>}', $imagickPixel->getColor(0));
assertType('array{r: float, g: float, b: float, a: float}', $imagickPixel->getColor(1));
assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 255>}', $imagickPixel->getColor(2));
assertType('array{}', $imagickPixel->getColor(3));
assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>}', $imagickPixel->getColor());
assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>}', $imagickPixel->getColor(0));
assertType('array{r: float, g: float, b: float, a: float}', $imagickPixel->getColor(1));
assertType('array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 255>}', $imagickPixel->getColor(2));
assertType('array{}', $imagickPixel->getColor(3));
};
16 changes: 8 additions & 8 deletions tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php
Expand Up @@ -2675,13 +2675,13 @@ public function testBug5623(): void
$this->analyse([__DIR__ . '/data/bug-5623.php'], []);
}

public function testImagickPixel(): void
{
$this->checkThisOnly = false;
$this->checkNullables = false;
$this->checkUnionTypes = true;
$this->checkExplicitMixed = false;
$this->analyse([__DIR__ . '/data/imagick-pixel.php'], []);
}
public function testImagickPixel(): void
{
$this->checkThisOnly = false;
$this->checkNullables = false;
$this->checkUnionTypes = true;
$this->checkExplicitMixed = false;
$this->analyse([__DIR__ . '/data/imagick-pixel.php'], []);
}

}
14 changes: 7 additions & 7 deletions tests/PHPStan/Rules/Methods/data/imagick-pixel.php
Expand Up @@ -6,11 +6,11 @@

class HelloWorld
{
public function sayHello(ImagickPixel $pixel): void
{
$pixel->getColor();
$pixel->getColor(0);
$pixel->getColor(1);
$pixel->getColor(2);
}
public function sayHello(ImagickPixel $pixel): void
{
$pixel->getColor();
$pixel->getColor(0);
$pixel->getColor(1);
$pixel->getColor(2);
}
}

0 comments on commit 37d1f35

Please sign in to comment.