Skip to content

Commit 5656530

Browse files
committed
docs(inline): use an existing assertion in the partial application example
Assert has no static greaterThan(), and the call put the threshold first, PHPUnit-style; same(?, 2.5) exists and keeps the actual value first. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3e98ef1 commit 5656530

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs/plugins/inline.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function createUser(string $email): User
9393
In PHP 8.6 this becomes even more elegant with [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
9494

9595
```php
96-
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
96+
#[TestInline([10, 4], Assert::same(?, 2.5))]
9797
public function divide(int $a, int $b): float
9898
{
9999
return $a / $b;

‎ru/docs/plugins/inline.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function createUser(string $email): User
8989
В PHP 8.6 это станет ещё элегантнее благодаря [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
9090

9191
```php
92-
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
92+
#[TestInline([10, 4], Assert::same(?, 2.5))]
9393
public function divide(int $a, int $b): float
9494
{
9595
return $a / $b;

0 commit comments

Comments
 (0)