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:
Floris Luiten 2021-01-05 21:06:16 +01:00 committed by GitHub
parent ff0134b5ca
commit 39a6b79f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -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`

View File

@ -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'

View File

@ -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;
}
}

View File

@ -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;
}