diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationGroup.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationGroup.php index ea62be416418..f2b0323135dd 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationGroup.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationGroup.php @@ -30,7 +30,7 @@ final class DeprecationGroup */ public function addNoticeFromObject($message, $class, $method) { - $this->deprecationNotice($message)->addObjectOccurence($class, $method); + $this->deprecationNotice($message)->addObjectOccurrence($class, $method); $this->addNotice(); } @@ -39,7 +39,7 @@ public function addNoticeFromObject($message, $class, $method) */ public function addNoticeFromProceduralCode($message) { - $this->deprecationNotice($message)->addProceduralOccurence(); + $this->deprecationNotice($message)->addProceduralOccurrence(); $this->addNotice(); } diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationNotice.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationNotice.php index d76073c8c43e..854bbd4d2633 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationNotice.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/DeprecationNotice.php @@ -23,7 +23,7 @@ final class DeprecationNotice */ private $countsByCaller = []; - public function addObjectOccurence($class, $method) + public function addObjectOccurrence($class, $method) { if (!isset($this->countsByCaller["$class::$method"])) { $this->countsByCaller["$class::$method"] = 0; @@ -32,7 +32,7 @@ public function addObjectOccurence($class, $method) ++$this->count; } - public function addProceduralOccurence() + public function addProceduralOccurrence() { ++$this->count; } diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationNoticeTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationNoticeTest.php index 7fa500aa077b..c0a88c443b4d 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationNoticeTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationNoticeTest.php @@ -10,9 +10,9 @@ final class DeprecationNoticeTest extends TestCase public function testItGroupsByCaller() { $notice = new DeprecationNotice(); - $notice->addObjectOccurence('MyAction', '__invoke'); - $notice->addObjectOccurence('MyAction', '__invoke'); - $notice->addObjectOccurence('MyOtherAction', '__invoke'); + $notice->addObjectOccurrence('MyAction', '__invoke'); + $notice->addObjectOccurrence('MyAction', '__invoke'); + $notice->addObjectOccurrence('MyOtherAction', '__invoke'); $countsByCaller = $notice->getCountsByCaller(); @@ -23,13 +23,13 @@ public function testItGroupsByCaller() $this->assertSame(1, $countsByCaller['MyOtherAction::__invoke']); } - public function testItCountsBothTypesOfOccurences() + public function testItCountsBothTypesOfOccurrences() { $notice = new DeprecationNotice(); - $notice->addObjectOccurence('MyAction', '__invoke'); + $notice->addObjectOccurrence('MyAction', '__invoke'); $this->assertSame(1, $notice->count()); - $notice->addProceduralOccurence(); + $notice->addProceduralOccurrence(); $this->assertSame(2, $notice->count()); } }