From 11f746a2c7a753da6d4b5d7dad865fa81f0533ba Mon Sep 17 00:00:00 2001 From: Pierre Grimaud Date: Fri, 27 Mar 2020 20:13:16 +0100 Subject: [PATCH] [Typo] Rename occurence to occurrence --- .../DeprecationErrorHandler/DeprecationGroup.php | 4 ++-- .../DeprecationErrorHandler/DeprecationNotice.php | 4 ++-- .../DeprecationNoticeTest.php | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) 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()); } }