Skip to content

Commit

Permalink
formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidanio committed Jul 25, 2024
1 parent 70d2fff commit cb86578
Show file tree
Hide file tree
Showing 139 changed files with 384 additions and 384 deletions.
2 changes: 1 addition & 1 deletion example/custom/custom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func TestAssignmentAsExpression(t *testing.T) {
addCheckers(test.Config())

test.AddFile(`<?php
declare(strict_types=1);
declare(strict_types = 1);
// PHPDoc annotations are not required for NoVerify in simple cases.
function something() {
$a = "test";
Expand Down
2 changes: 1 addition & 1 deletion src/linter/quickfix.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (g *QuickFixGenerator) CreateDeclareStrictTypes(root *ir.Root) quickfix.Tex
return quickfix.TextEdit{
StartPos: root.Position.StartPos,
EndPos: root.Position.StartPos,
Replacement: "declare(strict_types=1);\n",
Replacement: "declare(strict_types = 1);\n",
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/linter/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func addBuiltinCheckers(reg *CheckersRegistry) {
Default: true,
Quickfix: true,
Comment: "Report strict_types value is not 1 in declare section.",
Before: `declare(strict_types=0);`,
After: `declare(strict_types=1);`,
Before: `declare(strict_types = 0);`,
After: `declare(strict_types = 1);`,
},

{
Expand All @@ -40,7 +40,7 @@ func addBuiltinCheckers(reg *CheckersRegistry) {
Quickfix: true,
Comment: "Report declare(strict_types=1) has not been set.",
Before: ` `,
After: `declare(strict_types=1);`,
After: `declare(strict_types = 1);`,
},

{
Expand Down
14 changes: 7 additions & 7 deletions src/tests/checkers/anon_class_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func TestSimpleAnonClass(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
function f() {
$a = new class {
/** */
Expand All @@ -22,7 +22,7 @@ function f() {

func TestAnonClassAsInterface(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
interface IFace {}
function f(IFace $if) {}
Expand All @@ -34,7 +34,7 @@ f(new class implements IFace {});
func TestAnonClassFromDocumentation(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`<?php
declare(strict_types=1);
declare(strict_types = 1);
class Outer {
private $prop = 1;
protected $prop2 = 2;
Expand Down Expand Up @@ -69,7 +69,7 @@ echo (new Outer)->func2()->func3();

func TestAnonClassWithConstructor(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
function f() {
$a = new class(100, "s") {
/** */
Expand All @@ -88,7 +88,7 @@ function f() {

func TestAnonClassWithExtends(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
class Boo {
/** */
public function b() {}
Expand All @@ -108,7 +108,7 @@ function f() {

func TestAnonClassWithImplements(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
interface IBoo {
/** */
public function b() {}
Expand All @@ -127,7 +127,7 @@ function f() {

func TestAnonClassWithSeveralImplements(t *testing.T) {
linttest.SimpleNegativeTest(t, `<?php
declare(strict_types=1);
declare(strict_types = 1);
interface IBoo {
/** */
Expand Down
4 changes: 2 additions & 2 deletions src/tests/checkers/arrow_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func TestArrowFunction(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`<?php
declare(strict_types=1);
declare(strict_types = 1);
class Boo {
/** @return int */
public function b() { }
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestUnusedInArrowFunction(t *testing.T) {
`stubs/phpstorm-stubs/standard/standard_9.php`,
}
test.AddFile(`<?php
declare(strict_types=1);
declare(strict_types = 1);
function f() {
$a1 = [];
Expand Down
Loading

0 comments on commit cb86578

Please sign in to comment.