Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit077a238

Browse files
[Security] add return types
1 parent61cf95e commit077a238

File tree

79 files changed

+139
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+139
-235
lines changed

‎src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ public function __construct(iterable $expressions, ExpressionLanguage $expressio
2929
$this->expressionLanguage =$expressionLanguage;
3030
}
3131

32-
publicfunctionisOptional()
32+
publicfunctionisOptional():bool
3333
{
3434
returntrue;
3535
}
3636

3737
/**
3838
* @return string[]
3939
*/
40-
publicfunctionwarmUp(string$cacheDir)
40+
publicfunctionwarmUp(string$cacheDir):array
4141
{
4242
foreach ($this->expressionsas$expression) {
4343
$this->expressionLanguage->parse($expression, ['token','user','object','subject','role_names','request','trust_resolver']);

‎src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php‎

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -230,20 +230,16 @@ public function getUser(): string
230230

231231
/**
232232
* Gets the roles of the user.
233-
*
234-
* @return array|Data
235233
*/
236-
publicfunctiongetRoles()
234+
publicfunctiongetRoles():array|Data
237235
{
238236
return$this->data['roles'];
239237
}
240238

241239
/**
242240
* Gets the inherited roles of the user.
243-
*
244-
* @return array|Data
245241
*/
246-
publicfunctiongetInheritedRoles()
242+
publicfunctiongetInheritedRoles():array|Data
247243
{
248244
return$this->data['inherited_roles'];
249245
}
@@ -282,10 +278,8 @@ public function getImpersonationExitPath(): ?string
282278

283279
/**
284280
* Get the class name of the security token.
285-
*
286-
* @return string|Data|null
287281
*/
288-
publicfunctiongetTokenClass()
282+
publicfunctiongetTokenClass():string|Data|null
289283
{
290284
return$this->data['token_class'];
291285
}
@@ -305,7 +299,7 @@ public function getLogoutUrl(): ?string
305299
*
306300
* @return string[]|Data
307301
*/
308-
publicfunctiongetVoters()
302+
publicfunctiongetVoters():array|Data
309303
{
310304
return$this->data['voters'];
311305
}
@@ -317,28 +311,21 @@ public function getVoterStrategy(): string
317311

318312
/**
319313
* Returns the log of the security decisions made by the access decision manager.
320-
*
321-
* @return array|Data
322314
*/
323-
publicfunctiongetAccessDecisionLog()
315+
publicfunctiongetAccessDecisionLog():array|Data
324316
{
325317
return$this->data['access_decision_log'];
326318
}
327319

328320
/**
329321
* Returns the configuration of the current firewall context.
330-
*
331-
* @return array|Data|null
332322
*/
333-
publicfunctiongetFirewall()
323+
publicfunctiongetFirewall():array|Data|null
334324
{
335325
return$this->data['firewall'];
336326
}
337327

338-
/**
339-
* @return array|Data
340-
*/
341-
publicfunctiongetListeners()
328+
publicfunctiongetListeners():array|Data
342329
{
343330
return$this->data['listeners'];
344331
}

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ public function __construct(array $factories, array $userProviderFactories)
4242

4343
/**
4444
* Generates the configuration tree builder.
45-
*
46-
* @return TreeBuilder
4745
*/
48-
publicfunctiongetConfigTreeBuilder()
46+
publicfunctiongetConfigTreeBuilder():TreeBuilder
4947
{
5048
$tb =newTreeBuilder('security');
5149
$rootNode =$tb->getRootNode();

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface
4848
'failure_path_parameter' =>'_failure_path',
4949
];
5050

51-
finalpublicfunctionaddOption(string$name,mixed$default =null)
51+
finalpublicfunctionaddOption(string$name,mixed$default =null):void
5252
{
5353
$this->options[$name] =$default;
5454
}

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ public function getPriority(): int;
2727
/**
2828
* Defines the configuration key used to reference the provider
2929
* in the firewall configuration.
30-
*
31-
* @return string
3230
*/
33-
publicfunctiongetKey();
31+
publicfunctiongetKey():string;
3432

3533
publicfunctionaddConfiguration(NodeDefinition$builder);
3634

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
useSymfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface;
1616
useSymfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FirewallListenerFactoryInterface;
1717
useSymfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface;
18+
useSymfony\Component\Config\Definition\ConfigurationInterface;
1819
useSymfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1920
useSymfony\Component\Config\FileLocator;
2021
useSymfony\Component\Console\Application;
@@ -849,17 +850,17 @@ public function addUserProviderFactory(UserProviderFactoryInterface $factory)
849850
/**
850851
* {@inheritdoc}
851852
*/
852-
publicfunctiongetXsdValidationBasePath()
853+
publicfunctiongetXsdValidationBasePath():string|false
853854
{
854855
return__DIR__.'/../Resources/config/schema';
855856
}
856857

857-
publicfunctiongetNamespace()
858+
publicfunctiongetNamespace():string
858859
{
859860
return'http://symfony.com/schema/dic/security';
860861
}
861862

862-
publicfunctiongetConfiguration(array$config,ContainerBuilder$container)
863+
publicfunctiongetConfiguration(array$config,ContainerBuilder$container): ?ConfigurationInterface
863864
{
864865
// first assemble the factories
865866
returnnewMainConfiguration($this->getSortedFactories(),$this->userProviderFactories);

‎src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function onKernelFinishRequest(FinishRequestEvent $event)
5959
/**
6060
* {@inheritdoc}
6161
*/
62-
publicstaticfunctiongetSubscribedEvents()
62+
publicstaticfunctiongetSubscribedEvents():array
6363
{
6464
return [
6565
KernelEvents::REQUEST => [

‎src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(ContainerInterface $container, iterable $map)
3333
$this->map =$map;
3434
}
3535

36-
publicfunctiongetListeners(Request$request)
36+
publicfunctiongetListeners(Request$request):array
3737
{
3838
$context =$this->getFirewallContext($request);
3939

@@ -44,10 +44,7 @@ public function getListeners(Request $request)
4444
return [$context->getListeners(),$context->getExceptionListener(),$context->getLogoutListener()];
4545
}
4646

47-
/**
48-
* @return FirewallConfig|null
49-
*/
50-
publicfunctiongetFirewallConfig(Request$request)
47+
publicfunctiongetFirewallConfig(Request$request): ?FirewallConfig
5148
{
5249
$context =$this->getFirewallContext($request);
5350

‎src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function isAuthenticated(TokenInterface $token = null): bool
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
publicfunctionisRememberMe(TokenInterface$token =null)
33+
publicfunctionisRememberMe(TokenInterface$token =null):bool
3434
{
3535
if (null ===$token) {
3636
returnfalse;
@@ -42,7 +42,7 @@ public function isRememberMe(TokenInterface $token = null)
4242
/**
4343
* {@inheritdoc}
4444
*/
45-
publicfunctionisFullFledged(TokenInterface$token =null)
45+
publicfunctionisFullFledged(TokenInterface$token =null):bool
4646
{
4747
if (null ===$token ||$tokeninstanceof NullToken) {
4848
returnfalse;

‎src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* Interface for resolving the authentication status of a given token.
1818
*
1919
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
20-
*
21-
* @method bool isAuthenticated(TokenInterface $token = null)
2220
*/
2321
interface AuthenticationTrustResolverInterface
2422
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp