-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #637 from TomHAnderson/hotfix/tests-phpcs
Hotfix/tests phpcs
- Loading branch information
Showing
33 changed files
with
147 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets; | ||
|
||
class AnotherListenerStub | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Auth\Passwords; | ||
|
||
use Illuminate\Contracts\Auth\CanResetPassword; | ||
|
@@ -8,20 +10,18 @@ class UserMock implements CanResetPassword | |
{ | ||
/** | ||
* Get the e-mail address where password reset links are sent. | ||
* @return string | ||
*/ | ||
public function getEmailForPasswordReset() | ||
public function getEmailForPasswordReset(): string | ||
{ | ||
return '[email protected]'; | ||
} | ||
|
||
/** | ||
* Send the password reset notification. | ||
* | ||
* @param string $token | ||
* @return void | ||
*/ | ||
public function sendPasswordResetNotification($token) | ||
// phpcs:disable | ||
public function sendPasswordResetNotification($token): void | ||
{ | ||
} | ||
// phpcs:enable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Configuration; | ||
|
||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Doctrine\DBAL\Types\Type; | ||
|
||
class TypeMock extends Type | ||
{ | ||
/** @param string[] $column */ | ||
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function getName() | ||
public function getName(): void | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Configuration; | ||
|
||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Doctrine\DBAL\Types\Type; | ||
|
||
class TypeMock2 extends Type | ||
{ | ||
/** @param string[] $column */ | ||
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function getName() | ||
public function getName(): void | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Entity; | ||
|
||
class Foo | ||
{ | ||
private $id; | ||
private int $id; | ||
|
||
private $name; | ||
private string $name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Entity; | ||
|
||
use Doctrine\Common\Collections\Collection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Theory; | ||
|
||
#[ORM\Entity(repositoryClass: "LaravelDoctrineTest\ORM\Assets\Repository\ScientistRepository")] | ||
#[ORM\Entity(repositoryClass: 'LaravelDoctrineTest\ORM\Assets\Repository\ScientistRepository')] | ||
class Scientist | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: "integer")] | ||
#[ORM\GeneratedValue(strategy: "AUTO")] | ||
private $id; | ||
#[ORM\Column(type: 'integer')] | ||
#[ORM\GeneratedValue(strategy: 'AUTO')] | ||
private int $id; | ||
|
||
#[ORM\Column(type: "string", nullable: true)] | ||
private $firstName; | ||
#[ORM\Column(type: 'string', nullable: true)] | ||
private string $firstName; | ||
|
||
#[ORM\Column(type: "string", nullable: false)] | ||
private $lastName; | ||
#[ORM\Column(type: 'string', nullable: false)] | ||
private string $lastName; | ||
|
||
#[ORM\OneToMany(targetEntity: \Theory::class, mappedBy: "scientist")] | ||
private $theories; | ||
/** @var Collection|Theory[] */ | ||
#[ORM\OneToMany(targetEntity: Theory::class, mappedBy: 'scientist')] | ||
private Collection $theories; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
use Scientist; | ||
|
||
#[ORM\Entity(repositoryClass: "LaravelDoctrineTest\ORM\Assets\Repository\TheoryRepository")] | ||
#[ORM\Entity(repositoryClass: 'LaravelDoctrineTest\ORM\Assets\Repository\TheoryRepository')] | ||
class Theory | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: "integer")] | ||
#[ORM\GeneratedValue(strategy: "AUTO")] | ||
private $id; | ||
#[ORM\Column(type: 'integer')] | ||
#[ORM\GeneratedValue(strategy: 'AUTO')] | ||
private int $id; | ||
|
||
#[ORM\Column(type: "string", nullable: false)] | ||
private $title; | ||
#[ORM\Column(type: 'string', nullable: false)] | ||
private string $title; | ||
|
||
#[ORM\ManyToOne(targetEntity: \Scientist::class, inversedBy: "theories")] | ||
#[ORM\JoinColumn(name: "scientist_id", referencedColumnName: "id", nullable: false)] | ||
private $scientist; | ||
#[ORM\ManyToOne(targetEntity: Scientist::class, inversedBy: 'theories')] | ||
#[ORM\JoinColumn(name: 'scientist_id', referencedColumnName: 'id', nullable: false)] | ||
private Scientist $scientist; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets; | ||
|
||
use Doctrine\DBAL\Connection; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets; | ||
|
||
use Doctrine\Common\EventManager; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets; | ||
|
||
class ListenerStub | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.