mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Merge pull request #497 from pestphp/feature/style
style: apply fixes from PHP-CS-Fixer
This commit is contained in:
@ -43,7 +43,7 @@ trait Pipeable
|
||||
$this->pipe($name, function ($next, ...$arguments) use ($handler, $filter) {
|
||||
/* @phpstan-ignore-next-line */
|
||||
if ($filter($this->value, ...$arguments)) {
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
$handler->bindTo($this, get_class($this))(...$arguments);
|
||||
|
||||
return;
|
||||
|
||||
@ -307,7 +307,7 @@ final class Expectation
|
||||
private function getExpectationClosure(string $name): Closure
|
||||
{
|
||||
if (method_exists(Mixins\Expectation::class, $name)) {
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
return Closure::fromCallable([new Mixins\Expectation($this->value), $name]);
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ final class Kernel
|
||||
public static function boot(): self
|
||||
{
|
||||
foreach (self::$bootstrappers as $bootstrapper) {
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
(new $bootstrapper())->__invoke();
|
||||
}
|
||||
|
||||
|
||||
@ -283,7 +283,7 @@ final class Expectation
|
||||
{
|
||||
$this->toBeObject();
|
||||
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
Assert::assertTrue(property_exists($this->value, $name));
|
||||
|
||||
if (func_num_args() > 1) {
|
||||
@ -534,7 +534,7 @@ final class Expectation
|
||||
{
|
||||
Assert::assertIsString($this->value);
|
||||
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
Assert::assertJson($this->value);
|
||||
|
||||
return $this;
|
||||
|
||||
@ -156,11 +156,11 @@ final class DatasetsRepository
|
||||
$datasets[$index] = iterator_to_array($datasets[$index]);
|
||||
}
|
||||
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
foreach ($datasets[$index] as $key => $values) {
|
||||
$values = is_array($values) ? $values : [$values];
|
||||
$processedDataset[] = [
|
||||
'label' => self::getDatasetDescription($key, $values), //@phpstan-ignore-line
|
||||
'label' => self::getDatasetDescription($key, $values), // @phpstan-ignore-line
|
||||
'values' => $values,
|
||||
];
|
||||
}
|
||||
@ -189,7 +189,7 @@ final class DatasetsRepository
|
||||
$result = $tmp;
|
||||
}
|
||||
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ final class Container
|
||||
}
|
||||
}
|
||||
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->get($candidate);
|
||||
},
|
||||
$constructor->getParameters()
|
||||
|
||||
@ -40,7 +40,7 @@ final class HigherOrderMessageCollection
|
||||
public function chain(object $target): void
|
||||
{
|
||||
foreach ($this->messages as $message) {
|
||||
//@phpstan-ignore-next-line
|
||||
// @phpstan-ignore-next-line
|
||||
$target = $message->call($target) ?? $target;
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class Number
|
||||
public function __construct(
|
||||
public int $value
|
||||
) {
|
||||
//..
|
||||
// ..
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ class Char
|
||||
public function __construct(
|
||||
public string $value
|
||||
) {
|
||||
//..
|
||||
// ..
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class Symbol
|
||||
public function __construct(
|
||||
public string $value
|
||||
) {
|
||||
//..
|
||||
// ..
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,11 +69,11 @@ expect()->pipe('toBe', function ($next, $expected) use ($state) {
|
||||
assertInstanceOf(Char::class, $expected);
|
||||
assertEquals($this->value->value, $expected->value);
|
||||
|
||||
//returning nothing stops pipeline execution
|
||||
// returning nothing stops pipeline execution
|
||||
return;
|
||||
}
|
||||
|
||||
//calling $next(); let the pipeline to keep running
|
||||
// calling $next(); let the pipeline to keep running
|
||||
$next();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user