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

Commitaf7ff7e

Browse files
Add return type unions to private/internal/final/test methods
1 parent439ce7b commitaf7ff7e

File tree

59 files changed

+78
-143
lines changed

Some content is hidden

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

59 files changed

+78
-143
lines changed

‎src/Symfony/Bridge/Twig/Extension/CodeExtension.php‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,7 @@ public function formatFile(string $file, int $line, string $text = null): string
169169
return$text;
170170
}
171171

172-
/**
173-
* Returns the link for a given file/line pair.
174-
*
175-
* @return string|false A link or false
176-
*/
177-
publicfunctiongetFileLink(string$file,int$line)
172+
publicfunctiongetFileLink(string$file,int$line):string|false
178173
{
179174
if ($fmt =$this->fileLinkFormat) {
180175
return\is_string($fmt) ?strtr($fmt, ['%f' =>$file,'%l' =>$line]) :$fmt->format($file,$line);

‎src/Symfony/Bridge/Twig/Extension/FormExtension.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ public function getFieldName(FormView $view): string
103103
return$view->vars['full_name'];
104104
}
105105

106-
/**
107-
* @return string|array
108-
*/
109-
publicfunctiongetFieldValue(FormView$view)
106+
publicfunctiongetFieldValue(FormView$view):string|array
110107
{
111108
return$view->vars['value'];
112109
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getNamespace(): string
124124
return'';
125125
}
126126

127-
publicfunctiongetXsdValidationBasePath()
127+
publicfunctiongetXsdValidationBasePath():string|false
128128
{
129129
returnfalse;
130130
}

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function getUsername(): string
190190
return$this->username;
191191
}
192192

193-
publicfunctiongetUserIdentifier()
193+
publicfunctiongetUserIdentifier():string
194194
{
195195
return$this->username;
196196
}

‎src/Symfony/Component/BrowserKit/Response.php‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ public function __toString(): string
5454
return$headers."\n".$this->content;
5555
}
5656

57-
/**
58-
* Gets the response content.
59-
*
60-
* @return string The response content
61-
*/
6257
publicfunctiongetContent():string
6358
{
6459
return$this->content;
@@ -69,22 +64,15 @@ public function getStatusCode(): int
6964
return$this->status;
7065
}
7166

72-
/**
73-
* Gets the response headers.
74-
*
75-
* @return array The response headers
76-
*/
7767
publicfunctiongetHeaders():array
7868
{
7969
return$this->headers;
8070
}
8171

8272
/**
83-
* Gets a response header.
84-
*
8573
* @return string|array|null The first header value if $first is true, an array of values otherwise
8674
*/
87-
publicfunctiongetHeader(string$header,bool$first =true)
75+
publicfunctiongetHeader(string$header,bool$first =true):string|array|null
8876
{
8977
$normalizedHeader =str_replace('-','_',strtolower($header));
9078
foreach ($this->headersas$key =>$value) {

‎src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ArrayCache extends CacheProvider
88
{
99
private$data = [];
1010

11-
protectedfunctiondoFetch($id)
11+
protectedfunctiondoFetch($id):mixed
1212
{
1313
return$this->doContains($id) ?$this->data[$id][0] :false;
1414
}

‎src/Symfony/Component/Console/Helper/QuestionHelper.php‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,8 @@ private function isInteractiveInput($inputStream): bool
496496
*
497497
* @param resource $inputStream The handler resource
498498
* @param Question $question The question being asked
499-
*
500-
* @return string|false The input received, false in case input could not be read
501499
*/
502-
privatefunctionreadInput($inputStream,Question$question)
500+
privatefunctionreadInput($inputStream,Question$question):string|false
503501
{
504502
if (!$question->isMultiline()) {
505503
$cp =$this->setIOCodepage();
@@ -539,10 +537,8 @@ private function setIOCodepage(): int
539537

540538
/**
541539
* Sets console I/O to the specified code page and converts the user input.
542-
*
543-
* @return string|false
544540
*/
545-
privatefunctionresetIOCodepage(int$cp,string|false$input)
541+
privatefunctionresetIOCodepage(int$cp,string|false$input):string|false
546542
{
547543
if (0 !==$cp) {
548544
sapi_windows_cp_set($cp);

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/AcmeExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function load(array $configs, ContainerBuilder $configuration)
1212
return$configuration;
1313
}
1414

15-
publicfunctiongetXsdValidationBasePath()
15+
publicfunctiongetXsdValidationBasePath():string|false
1616
{
1717
returnfalse;
1818
}

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function load(array $configs, ContainerBuilder $configuration)
2525
return$configuration;
2626
}
2727

28-
publicfunctiongetXsdValidationBasePath()
28+
publicfunctiongetXsdValidationBasePath():string|false
2929
{
3030
returnfalse;
3131
}

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class ProjectWithXsdExtensionextends ProjectExtension
44
{
5-
publicfunctiongetXsdValidationBasePath()
5+
publicfunctiongetXsdValidationBasePath():string|false
66
{
77
return__DIR__.'/schema';
88
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp