Skip to content

Commit 5d439d4

Browse files
pgrimaudondrejmirtes
authored andcommitted
Fix typos
1 parent 6e93254 commit 5d439d4

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/Analyser/IgnoredErrorHelperResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function process(
203203
}
204204

205205
$addErrors[] = new Error(sprintf(
206-
'Ignored error pattern %s is expected to occur %d %s, but occured %d %s.',
206+
'Ignored error pattern %s is expected to occur %d %s, but occurred %d %s.',
207207
IgnoredError::stringifyPattern($unmatchedIgnoredError),
208208
$unmatchedIgnoredError['count'],
209209
$unmatchedIgnoredError['count'] === 1 ? 'time' : 'times',
@@ -225,7 +225,7 @@ public function process(
225225
) {
226226
if ($unmatchedIgnoredError['realCount'] < $unmatchedIgnoredError['count']) {
227227
$errors[] = new Error(sprintf(
228-
'Ignored error pattern %s is expected to occur %d %s, but occured only %d %s.',
228+
'Ignored error pattern %s is expected to occur %d %s, but occurred only %d %s.',
229229
IgnoredError::stringifyPattern($unmatchedIgnoredError),
230230
$unmatchedIgnoredError['count'],
231231
$unmatchedIgnoredError['count'] === 1 ? 'time' : 'times',

src/Command/ErrorFormatter/CheckstyleErrorFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function escape(string $string): string
9696
*
9797
* @param AnalysisResult $analysisResult
9898
* @return array<string, array> Array that have as key the relative path of file
99-
* and as value an array with occured errors.
99+
* and as value an array with occurred errors.
100100
*/
101101
private function groupByFile(AnalysisResult $analysisResult): array
102102
{

src/Type/TypeCombinator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,17 +487,17 @@ private static function processArrayTypes(array $arrayTypes, array $accessoryTyp
487487

488488
$keyTypesForGeneralArray = [];
489489
$valueTypesForGeneralArray = [];
490-
$generalArrayOcurred = false;
490+
$generalArrayOccurred = false;
491491
$constantKeyTypesNumbered = [];
492492

493493
/** @var int|float $nextConstantKeyTypeIndex */
494494
$nextConstantKeyTypeIndex = 1;
495495

496496
foreach ($arrayTypes as $arrayType) {
497-
if (!$arrayType instanceof ConstantArrayType || $generalArrayOcurred) {
497+
if (!$arrayType instanceof ConstantArrayType || $generalArrayOccurred) {
498498
$keyTypesForGeneralArray[] = $arrayType->getKeyType();
499499
$valueTypesForGeneralArray[] = $arrayType->getItemType();
500-
$generalArrayOcurred = true;
500+
$generalArrayOccurred = true;
501501
continue;
502502
}
503503

@@ -513,7 +513,7 @@ private static function processArrayTypes(array $arrayTypes, array $accessoryTyp
513513
$constantKeyTypesNumbered[$keyTypeValue] = $nextConstantKeyTypeIndex;
514514
$nextConstantKeyTypeIndex *= 2;
515515
if (!is_int($nextConstantKeyTypeIndex)) {
516-
$generalArrayOcurred = true;
516+
$generalArrayOccurred = true;
517517
continue;
518518
}
519519
}
@@ -526,7 +526,7 @@ private static function processArrayTypes(array $arrayTypes, array $accessoryTyp
526526
), ...$accessoryTypes);
527527
};
528528

529-
if ($generalArrayOcurred) {
529+
if ($generalArrayOccurred) {
530530
return [
531531
$createGeneralArray(),
532532
];

tests/PHPStan/Analyser/AnalyserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testIgnoreErrorByPathAndCountMoreThanExpected(bool $onlyFiles):
121121

122122
$this->assertInstanceOf(Error::class, $result[2]);
123123
$this->assertStringContainsString('Ignored error pattern #Fail\.#', $result[2]->getMessage());
124-
$this->assertStringContainsString('is expected to occur 1 time, but occured 3 times.', $result[2]->getMessage());
124+
$this->assertStringContainsString('is expected to occur 1 time, but occurred 3 times.', $result[2]->getMessage());
125125
$this->assertSame(5, $result[2]->getLine());
126126
$this->assertSamePaths(__DIR__ . '/data/two-fails.php', $result[2]->getFile());
127127
}
@@ -143,7 +143,7 @@ public function testIgnoreErrorByPathAndCountLessThanExpected(bool $onlyFiles):
143143
$this->assertCount(1, $result);
144144
$this->assertInstanceOf(Error::class, $result[0]);
145145
$this->assertStringContainsString('Ignored error pattern #Fail\.#', $result[0]->getMessage());
146-
$this->assertStringContainsString('is expected to occur 4 times, but occured only 3 times.', $result[0]->getMessage());
146+
$this->assertStringContainsString('is expected to occur 4 times, but occurred only 3 times.', $result[0]->getMessage());
147147
$this->assertSamePaths(__DIR__ . '/data/two-fails.php', $result[0]->getFile());
148148
$this->assertSame(5, $result[0]->getLine());
149149
}

0 commit comments

Comments
 (0)