Skip to content

Commit a1234ff

Browse files
committed
Fix typo
1 parent 3553e1a commit a1234ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Rule/Model/DisallowEntityArrayAccessRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function processNode(Node $node, Scope $scope): array
5454

5555
return [
5656
RuleErrorBuilder::message(sprintf(
57-
'Array access to entity to %s is not allowed, access as object instead',
57+
'Array access to entity %s is not allowed, access as object instead',
5858
$reflection->getName(),
5959
))
6060
->identifier('cake.entity.arrayAccess')

tests/TestCase/Rule/Model/DisallowEntityArrayAccessRuleTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,27 @@ public function testRule(): void
3838
// each error consists of the asserted error message, and the asserted error file line
3939
$this->analyse([__DIR__ . '/Fake/FailingEntityUseLogic.php'], [
4040
[
41-
'Array access to entity to App\Model\Entity\Note is not allowed, access as object instead',
41+
'Array access to entity App\Model\Entity\Note is not allowed, access as object instead',
4242
24, // asserted error line
4343
],
4444
[
45-
'Array access to entity to App\Model\Entity\Note is not allowed, access as object instead',
45+
'Array access to entity App\Model\Entity\Note is not allowed, access as object instead',
4646
25, // asserted error line
4747
],
4848
[
49-
'Array access to entity to App\Model\Entity\Note is not allowed, access as object instead',
49+
'Array access to entity App\Model\Entity\Note is not allowed, access as object instead',
5050
27, // asserted error line
5151
],
5252
[
53-
'Array access to entity to Cake\Datasource\EntityInterface is not allowed, access as object instead',
53+
'Array access to entity Cake\Datasource\EntityInterface is not allowed, access as object instead',
5454
36,
5555
],
5656
[
57-
'Array access to entity to App\Model\Entity\User is not allowed, access as object instead',
57+
'Array access to entity App\Model\Entity\User is not allowed, access as object instead',
5858
38, // asserted error line
5959
],
6060
[
61-
'Array access to entity to App\Model\Entity\Note is not allowed, access as object instead',
61+
'Array access to entity App\Model\Entity\Note is not allowed, access as object instead',
6262
44, // asserted error line
6363
],
6464
]);

0 commit comments

Comments
 (0)