Skip to content

Commit

Permalink
Added return type to the AbstractFacade method.
Browse files Browse the repository at this point in the history
  • Loading branch information
feuzeu committed Sep 27, 2024
1 parent 7ac8710 commit 57e4df1
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MyFacade extends AbstractFacade
/**
* @inheritDoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return MyService::class;
}
Expand Down Expand Up @@ -114,7 +114,7 @@ class View extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return \Twig\Environment::class;
}
Expand Down Expand Up @@ -172,7 +172,7 @@ class TaggedServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return TaggedService::class;
}
Expand Down Expand Up @@ -218,7 +218,7 @@ class MyFacade extends AbstractFacade
/**
* @inheritDoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return MyService::class;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"source": "https://github.com/lagdo/symfony-facades"
},
"require": {
"php": ">=7.4.0",
"psr/container": ">=1.0.0",
"symfony/framework-bundle": "5.*|6.*|7.*"
},
"require-dev": {
"php": ">=7.0.0",
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^5.4",
"symfony/test-pack": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class AbstractFacade
*
* @return string
*/
abstract protected static function getServiceIdentifier();
abstract protected static function getServiceIdentifier(): string;

/**
* Get the service instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class Log extends AbstractFacade
/**
* @inheritDoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return LoggerInterface::class;
}
Expand Down
2 changes: 1 addition & 1 deletion src/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final class View extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return Environment::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Facades/Instance/PrivateServiceFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PrivateServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return PrivateServiceInterface::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Facades/Instance/PublicServiceFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PublicServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return PublicServiceInterface::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Facades/PrivateServiceFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PrivateServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return PrivateServiceInterface::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Facades/PublicServiceFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PublicServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return PublicServiceInterface::class;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Facades/TaggedServiceFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TaggedServiceFacade extends AbstractFacade
/**
* @inheritdoc
*/
protected static function getServiceIdentifier()
protected static function getServiceIdentifier(): string
{
return TaggedService::class;
}
Expand Down

0 comments on commit 57e4df1

Please sign in to comment.