Skip to content

Commit 873be39

Browse files
committed
Fix grammar error in the "AllOf" rule
1 parent 0c07060 commit 873be39

30 files changed

+76
-76
lines changed

docs/03-handling-exceptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ try {
1919
The code above generates the following output:
2020

2121
```no-highlight
22-
- All of the required rules must pass for "The Respect Panda"
22+
- All the required rules must pass for "The Respect Panda"
2323
- "The Respect Panda" must contain only letters (a-z) and digits (0-9)
2424
- "The Respect Panda" must contain only lowercase letters
2525
```
@@ -44,7 +44,7 @@ The code above generates the following output:
4444
```no-highlight
4545
Array
4646
(
47-
[__root__] => All of the required rules must pass for "The Respect Panda"
47+
[__root__] => All the required rules must pass for "The Respect Panda"
4848
[alnum] => "The Respect Panda" must contain only letters (a-z) and digits (0-9)
4949
[lowercase] => "The Respect Panda" must contain only lowercase letters
5050
)

docs/rules/AllOf.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ v::allOf(v::intVal(), v::positive())->isValid(15); // true
1919

2020
### `AllOf::TEMPLATE_NONE`
2121

22-
| Mode | Template |
23-
|------------|--------------------------------------------------|
24-
| `default` | All of the required rules must pass for {{name}} |
25-
| `inverted` | None of these rules must pass for {{name}} |
22+
| Mode | Template |
23+
|------------|-----------------------------------------------|
24+
| `default` | All the required rules must pass for {{name}} |
25+
| `inverted` | None of these rules must pass for {{name}} |
2626

2727
## Template placeholders
2828

docs/rules/Attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ v::attributes()->assert(new Person('John Doe', '[email protected]', '2020-06-23
4949

5050
v::attributes()->assert(new Person('', 'not an email', 'not a date', 'not a phone number'));
5151
// Full message:
52-
// - All of the required rules must pass for `Person { +$name="" +$email="not an email" +$birthdate="not a date" +$phone="not a phone number" }`
52+
// - All the required rules must pass for `Person { +$name="" +$email="not an email" +$birthdate="not a date" +$phone="not a phone number" }`
5353
// - name must not be empty
5454
// - email must be a valid email address
55-
// - All of the required rules must pass for birthdate
55+
// - All the required rules must pass for birthdate
5656
// - birthdate must be a valid date in the format "2005-12-30"
5757
// - For comparison with now, birthdate must be a valid datetime
5858
// - phone must be a valid telephone number or must be null

library/Rules/AllOf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
self::TEMPLATE_SOME,
2828
)]
2929
#[Template(
30-
'All of the required rules must pass for {{name}}',
30+
'All the required rules must pass for {{name}}',
3131
'None of these rules must pass for {{name}}',
3232
self::TEMPLATE_NONE,
3333
)]

tests/feature/AssertWithKeysTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
],
3838
]),
3939
<<<'FULL_MESSAGE'
40-
- All of the required rules must pass for the given data
41-
- All of the required rules must pass for mysql
40+
- All the required rules must pass for the given data
41+
- All the required rules must pass for mysql
4242
- host must be a string
4343
- user must be present
4444
- password must be present
4545
- schema must be a string
46-
- All of the required rules must pass for postgresql
46+
- All the required rules must pass for postgresql
4747
- host must be present
4848
- user must be a string
4949
- password must be a string

tests/feature/AssertWithPropertiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function (): void {
4545
->assert($object);
4646
},
4747
<<<'FULL_MESSAGE'
48-
- All of the required rules must pass for the given data
48+
- All the required rules must pass for the given data
4949
- These rules must pass for mysql
5050
- host must be a string
5151
- These rules must pass for postgresql

tests/feature/GetFullMessageShouldIncludeAllValidationMessagesInAChainTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
test('Scenario #1', expectFullMessage(
1313
fn() => Validator::stringType()->lengthBetween(2, 15)->assert(0),
1414
<<<'FULL_MESSAGE'
15-
- All of the required rules must pass for 0
15+
- All the required rules must pass for 0
1616
- 0 must be a string
1717
- 0 must be a countable value or a string
1818
FULL_MESSAGE,

tests/feature/GetMessagesShouldIncludeAllValidationMessagesInAChainTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function (): void {
2020
->assert(['username' => 'u', 'birthdate' => 'Not a date', 'password' => '']);
2121
},
2222
[
23-
'__root__' => 'All of the required rules must pass for `["username": "u", "birthdate": "Not a date", "password": ""]`',
23+
'__root__' => 'All the required rules must pass for `["username": "u", "birthdate": "Not a date", "password": ""]`',
2424
'username' => 'The length of username must be between 2 and 32',
2525
'birthdate' => 'birthdate must be a valid date/time',
2626
'password' => 'password must not be empty',

tests/feature/GetMessagesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
->key('schema', v::stringType()))
2121
->assert(['mysql' => ['host' => 42, 'schema' => 42], 'postgresql' => ['user' => 42, 'password' => 42]]),
2222
[
23-
'__root__' => 'All of the required rules must pass for `["mysql": ["host": 42, "schema": 42], "postgresql": ["user": 42, "password": 42]]`',
23+
'__root__' => 'All the required rules must pass for `["mysql": ["host": 42, "schema": 42], "postgresql": ["user": 42, "password": 42]]`',
2424
'mysql' => [
25-
'__root__' => 'All of the required rules must pass for mysql',
25+
'__root__' => 'All the required rules must pass for mysql',
2626
'host' => 'host must be a string',
2727
'user' => 'user must be present',
2828
'password' => 'password must be present',
2929
'schema' => 'schema must be a string',
3030
],
3131
'postgresql' => [
32-
'__root__' => 'All of the required rules must pass for postgresql',
32+
'__root__' => 'All the required rules must pass for postgresql',
3333
'host' => 'host must be present',
3434
'user' => 'user must be a string',
3535
'password' => 'password must be a string',

tests/feature/GetMessagesWithReplacementsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ function (): void {
4949
);
5050
},
5151
[
52-
'__root__' => 'All of the required rules must pass for `["mysql": ["host": 42, "schema": 42], "postgresql": ["user": 42, "password": 42]]`',
52+
'__root__' => 'All the required rules must pass for `["mysql": ["host": 42, "schema": 42], "postgresql": ["user": 42, "password": 42]]`',
5353
'mysql' => [
54-
'__root__' => 'All of the required rules must pass for mysql',
54+
'__root__' => 'All the required rules must pass for mysql',
5555
'host' => '`host` should be a MySQL host',
5656
'user' => 'Value should be a MySQL username',
5757
'password' => 'password must be present',
5858
'schema' => 'schema must be a string',
5959
],
6060
'postgresql' => [
61-
'__root__' => 'All of the required rules must pass for postgresql',
61+
'__root__' => 'All the required rules must pass for postgresql',
6262
'host' => 'host must be present',
6363
'user' => 'user must be a string',
6464
'password' => 'password must be a string',

0 commit comments

Comments
 (0)