Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PHPCSUtils/Tokens/Collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <int|string> => <int|string>
*/
Expand Down Expand Up @@ -1408,7 +1408,7 @@ public static function shortListTokensBC()
*
* @return array <int|string> => <int|string>
*/
public static function textStingStartTokens()
public static function textStringStartTokens()
{
return self::$textStingStartTokens;
}
Expand Down
2 changes: 1 addition & 1 deletion PHPCSUtils/Utils/TextStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
/**
* 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
{

/**
* Test the method.
*
* @return void
*/
public function testTextStingStartTokens()
public function testTextStringStartTokens()
{
$this->assertSame(Collections::$textStingStartTokens, Collections::textStingStartTokens());
$this->assertSame(Collections::$textStingStartTokens, Collections::textStringStartTokens());
}
}