diff --git a/PHPCSUtils/Tokens/Collections.php b/PHPCSUtils/Tokens/Collections.php index 93e1ddaf..6ce5d449 100644 --- a/PHPCSUtils/Tokens/Collections.php +++ b/PHPCSUtils/Tokens/Collections.php @@ -476,7 +476,7 @@ class Collections * * @since 1.0.0-alpha1 * - * @deprecated 1.0.0-alpha4 Use the {@see Collections::textStingStartTokens()} method instead. + * @deprecated 1.0.0-alpha4 Use the {@see Collections::textStringStartTokens()} method instead. * * @var array => */ @@ -1408,7 +1408,7 @@ public static function shortListTokensBC() * * @return array => */ - public static function textStingStartTokens() + public static function textStringStartTokens() { return self::$textStingStartTokens; } diff --git a/PHPCSUtils/Utils/TextStrings.php b/PHPCSUtils/Utils/TextStrings.php index 9cb06870..b8341b6d 100644 --- a/PHPCSUtils/Utils/TextStrings.php +++ b/PHPCSUtils/Utils/TextStrings.php @@ -59,7 +59,7 @@ public static function getCompleteTextString(File $phpcsFile, $stackPtr, $stripQ $tokens = $phpcsFile->getTokens(); // Must be the start of a text string token. - if (isset($tokens[$stackPtr], Collections::textStingStartTokens()[$tokens[$stackPtr]['code']]) === false) { + if (isset($tokens[$stackPtr], Collections::textStringStartTokens()[$tokens[$stackPtr]['code']]) === false) { throw new RuntimeException( '$stackPtr must be of type T_START_HEREDOC, T_START_NOWDOC, T_CONSTANT_ENCAPSED_STRING' . ' or T_DOUBLE_QUOTED_STRING' diff --git a/Tests/Tokens/Collections/TextStingStartTokensTest.php b/Tests/Tokens/Collections/TextStringStartTokensTest.php similarity index 75% rename from Tests/Tokens/Collections/TextStingStartTokensTest.php rename to Tests/Tokens/Collections/TextStringStartTokensTest.php index 1207fdac..3ca27e5f 100644 --- a/Tests/Tokens/Collections/TextStingStartTokensTest.php +++ b/Tests/Tokens/Collections/TextStringStartTokensTest.php @@ -16,13 +16,13 @@ /** * Test class. * - * @covers \PHPCSUtils\Tokens\Collections::textStingStartTokens + * @covers \PHPCSUtils\Tokens\Collections::textStringStartTokens * * @group collections * * @since 1.0.0 */ -class TextStingStartTokensTest extends TestCase +class TextStringStartTokensTest extends TestCase { /** @@ -30,8 +30,8 @@ class TextStingStartTokensTest extends TestCase * * @return void */ - public function testTextStingStartTokens() + public function testTextStringStartTokens() { - $this->assertSame(Collections::$textStingStartTokens, Collections::textStingStartTokens()); + $this->assertSame(Collections::$textStingStartTokens, Collections::textStringStartTokens()); } }