Skip to content

Commit

Permalink
Merge pull request #635 from TomHAnderson/hotfix/coverage-3
Browse files Browse the repository at this point in the history
phpcs assets pass 1
  • Loading branch information
TomHAnderson authored Oct 28, 2024
2 parents 1eca26b + 97be3ee commit ca71af5
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 15 deletions.
1 change: 0 additions & 1 deletion tests/Assets/Auth/Passwords/UserMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ public function getEmailForPasswordReset()
*/
public function sendPasswordResetNotification($token)
{
// TODO: Implement sendPasswordResetNotification() method.
}
}
2 changes: 1 addition & 1 deletion tests/Assets/Extensions/ExtensionMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ExtensionMock implements Extension
public function addSubscribers(EventManager $manager, EntityManagerInterface $em): void
{
// Confirm it gets called
(new ExtensionManagerTest)->assertTrue(true);
(new ExtensionManagerTest())->assertTrue(true);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion tests/Assets/FakeEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace LaravelDoctrineTest\ORM\Assets;

class FakeEventManager extends \Doctrine\Common\EventManager
use Doctrine\Common\EventManager;

class FakeEventManager extends EventManager
{
}
7 changes: 5 additions & 2 deletions tests/Assets/FilterStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

namespace LaravelDoctrineTest\ORM\Assets;

class FilterStub extends \Doctrine\ORM\Query\Filter\SQLFilter
use Doctrine\ORM\Query\Filter\SQLFilter;
use Doctrine\ORM\Mapping\ClassMetadata;

class FilterStub extends SQLFilter
{
public function addFilterConstraint(\Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string
public function addFilterConstraint(ClassMetadata $targetEntity, string $targetTableAlias): string
{
return '';
}
Expand Down
4 changes: 3 additions & 1 deletion tests/Assets/Middleware/BindableEntityWithInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace LaravelDoctrineTest\ORM\Assets\Middleware;

class BindableEntityWithInterface implements \LaravelDoctrine\ORM\Contracts\UrlRoutable
use LaravelDoctrine\ORM\Contracts\UrlRoutable;

class BindableEntityWithInterface implements UrlRoutable
{
public $id;

Expand Down
7 changes: 5 additions & 2 deletions tests/Assets/Notifications/NotificationDatabaseStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

namespace LaravelDoctrineTest\ORM\Assets\Notifications;

class NotificationDatabaseStub extends \Illuminate\Notifications\Notification
use Illuminate\Notifications\Notification as IlluminateNotification;
use LaravelDoctrine\ORM\Notifications\Notification;

class NotificationDatabaseStub extends IlluminateNotification
{
public function toDatabase()
{
return (new \LaravelDoctrine\ORM\Notifications\Notification());
return new Notification();
}
}
4 changes: 3 additions & 1 deletion tests/Assets/Notifications/NotificationInvalidStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace LaravelDoctrineTest\ORM\Assets\Notifications;

class NotificationInvalidStub extends \Illuminate\Notifications\Notification
use Illuminate\Notifications\Notification as IlluminateNotification;

class NotificationInvalidStub extends IlluminateNotification
{
}
7 changes: 5 additions & 2 deletions tests/Assets/Notifications/NotificationStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

namespace LaravelDoctrineTest\ORM\Assets\Notifications;

class NotificationStub extends \Illuminate\Notifications\Notification
use Illuminate\Notifications\Notification as IlluminateNotification;
use LaravelDoctrine\ORM\Notifications\Notification;

class NotificationStub extends IlluminateNotification
{
public function toEntity()
{
return (new \LaravelDoctrine\ORM\Notifications\Notification());
return new Notification();
}
}
4 changes: 2 additions & 2 deletions tests/Assets/Testing/AncestorHydrateableClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class AncestorHydrateableClass
{
private $name;
private string $name = '';

public function getName()
public function getName(): string
{
return $this->name;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Assets/Testing/ChildHydrateableClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class ChildHydrateableClass extends AncestorHydrateableClass
{
private $description;
private string $description = '';

public function getDescription()
public function getDescription(): string
{
return $this->description;
}
Expand Down
9 changes: 9 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ class TestCase extends PHPUnitTestCase
protected function setUp(): void
{
$this->application = new Application();

parent::setUp();
}

protected function tearDown(): void
{
unset($this->application);

parent::tearDown();
}

public function getApplication(): Application
{
return $this->application;
}
}

0 comments on commit ca71af5

Please sign in to comment.