mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-28 15:00:50 +00:00
Fixed typo "lenght" (#5096)
* Fixed typo in docs "lenght" to "length" * Fixed typo in class constant "lenght" to "length" * Changed "lenght" instead of "length", fixing bug in class_exists using incorrect classname
This commit is contained in:
parent
ff0134b5ca
commit
39a6b79f30
|
@ -1185,7 +1185,7 @@ Change isset on property object to `property_exists()`
|
|||
|
||||
### JoinStringConcatRector
|
||||
|
||||
Joins concat of 2 strings, unless the lenght is too long
|
||||
Joins concat of 2 strings, unless the length is too long
|
||||
|
||||
- class: `Rector\CodeQuality\Rector\Concat\JoinStringConcatRector`
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ final class JoinStringConcatRector extends AbstractRector
|
|||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
return new RuleDefinition(
|
||||
'Joins concat of 2 strings, unless the lenght is too long',
|
||||
'Joins concat of 2 strings, unless the length is too long',
|
||||
[
|
||||
new CodeSample(
|
||||
<<<'CODE_SAMPLE'
|
||||
|
|
|
@ -23,7 +23,7 @@ final class SimplifyIfElseToTernaryRector extends AbstractRector
|
|||
/**
|
||||
* @var int
|
||||
*/
|
||||
private const LINE_LENGHT_LIMIT = 120;
|
||||
private const LINE_LENGTH_LIMIT = 120;
|
||||
|
||||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
|
@ -169,6 +169,6 @@ CODE_SAMPLE
|
|||
|
||||
private function isNodeTooLong(Assign $assign): bool
|
||||
{
|
||||
return Strings::length($this->print($assign)) > self::LINE_LENGHT_LIMIT;
|
||||
return Strings::length($this->print($assign)) > self::LINE_LENGTH_LIMIT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Symfony\Component\Validator\Constraints;
|
||||
|
||||
if (class_exists('Symfony\Component\Validator\Constraints\Lenght')) {
|
||||
if (class_exists('Symfony\Component\Validator\Constraints\Length')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user