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

Commite923f80

Browse files
committed
typehint the port
1 parent899547b commite923f80

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ private function createExpression($container, $expression)
669669
return$this->expressions[$id] =newReference($id);
670670
}
671671

672-
privatefunctioncreateRequestMatcher($container,$path =null,$host =null,$port =null,$methods =array(),$ip =null,array$attributes =array())
672+
privatefunctioncreateRequestMatcher($container,$path =null,$host =null,int$port =null,$methods =array(),$ip =null,array$attributes =array())
673673
{
674674
if ($methods) {
675675
$methods =array_map('strtoupper', (array)$methods);

‎src/Symfony/Component/HttpFoundation/RequestMatcher.php‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespaceSymfony\Component\HttpFoundation;
1313

14-
usefunctionis_numeric;
15-
1614
/**
1715
* RequestMatcher compares a pre-defined set of checks against a Request instance.
1816
*
@@ -64,7 +62,7 @@ class RequestMatcher implements RequestMatcherInterface
6462
* @param array $attributes
6563
* @param string|string[]|null $schemes
6664
*/
67-
publicfunction__construct(string$path =null,string$host =null,$methods =null,$ips =null,array$attributes =array(),$schemes =null,$port =null)
65+
publicfunction__construct(string$path =null,string$host =null,$methods =null,$ips =null,array$attributes =array(),$schemes =null,int$port =null)
6866
{
6967
$this->matchPath($path);
7068
$this->matchHost($host);
@@ -103,11 +101,9 @@ public function matchHost($regexp)
103101
*
104102
* @param int|null $port The port number to connect to
105103
*/
106-
publicfunctionmatchPort($port)
104+
publicfunctionmatchPort(int$port):void
107105
{
108-
$portInt = (int)$port;
109-
110-
$this->port =is_numeric($port) ||$port ==$portInt ?$portInt :null;
106+
$this->port =$port;
111107
}
112108

113109
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp