Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jul 19, 2023
1 parent 61a9be9 commit 30b8571
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Modernize/ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Modernize" namespace="PHPCSExtra\Modernize" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

<description>A collection of sniffs to detect code modernization opportunties.</description>
<description>A collection of sniffs to detect code modernization opportunities.</description>
</ruleset>
4 changes: 2 additions & 2 deletions Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
]]>
</standard>
<code_comparison>
<code title="Valid: Using 'self' in a final OO constuct.">
<code title="Valid: Using 'self' in a final OO construct.">
<![CDATA[
final class Foo
{
Expand All @@ -27,7 +27,7 @@ final class Foo
}
]]>
</code>
<code title="Invalid: Using 'static' in a final OO constuct.">
<code title="Invalid: Using 'static' in a final OO construct.">
<![CDATA[
$anon = new class {
public function myMethod(
Expand Down
8 changes: 4 additions & 4 deletions Universal/Tests/CodeAnalysis/StaticInFinalClassUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ trait UseContextUnknown {
}
}

final class ClosuresAreNotTargettedByThisSniff {
final class ClosuresAreNotTargetedByThisSniff {
public static $className = 'Bar';
public function foobar() {
$closure = static function(): static {
// Returns new instance of Closure, not of ClosuresAreNotTargettedByThisSniff.
// Returns new instance of Closure, not of ClosuresAreNotTargetedByThisSniff.
// Still unnecessary, but not the target of this sniff.
// Should possibly get its own sniff.
return new static();
Expand Down Expand Up @@ -97,7 +97,7 @@ class ValidUseOfStaticInConcrete extends Foo
}

interface NeverFinal {
public function typedMethod(): static|ArrrayAccess;
public function typedMethod(): static|ArrayAccess;
}


Expand Down Expand Up @@ -156,7 +156,7 @@ class NonFinalClassWithNesting {
}

enum FinalByDesign {
public function typedMethod(): static|ArrrayAccess {
public function typedMethod(): static|ArrayAccess {
$var = static::functionCall();
$var = static::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ trait UseContextUnknown {
}
}

final class ClosuresAreNotTargettedByThisSniff {
final class ClosuresAreNotTargetedByThisSniff {
public static $className = 'Bar';
public function foobar() {
$closure = static function(): static {
// Returns new instance of Closure, not of ClosuresAreNotTargettedByThisSniff.
// Returns new instance of Closure, not of ClosuresAreNotTargetedByThisSniff.
// Still unnecessary, but not the target of this sniff.
// Should possibly get its own sniff.
return new static();
Expand Down Expand Up @@ -97,7 +97,7 @@ class ValidUseOfStaticInConcrete extends Foo
}

interface NeverFinal {
public function typedMethod(): static|ArrrayAccess;
public function typedMethod(): static|ArrayAccess;
}


Expand Down Expand Up @@ -156,7 +156,7 @@ class NonFinalClassWithNesting {
}

enum FinalByDesign {
public function typedMethod(): self|ArrrayAccess {
public function typedMethod(): self|ArrayAccess {
$var = self::functionCall();
$var = self::class;

Expand Down

0 comments on commit 30b8571

Please sign in to comment.