Skip to content

Commit 9c12f2c

Browse files
author
Baldini
committed
correction return this static
1 parent be7d143 commit 9c12f2c

File tree

5 files changed

+77
-26
lines changed

5 files changed

+77
-26
lines changed

src/Symfony/Bridge/PhpUnit/ClockMock.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ public static function usleep($us): void
6363
}
6464
}
6565

66-
public static function microtime($asFloat = false): string
66+
/**
67+
* @return string|float
68+
*/
69+
public static function microtime($asFloat = false)
6770
{
6871
if (null === self::$now) {
6972
return \microtime($asFloat);
@@ -96,8 +99,10 @@ public static function gmdate($format, $timestamp = null): string
9699
return \gmdate($format, $timestamp);
97100
}
98101

99-
100-
public static function hrtime($asNumber = false): array|int|float
102+
/**
103+
* @return array|int|float
104+
*/
105+
public static function hrtime($asNumber = false)
101106
{
102107
$ns = (self::$now - (int) self::$now) * 1000000000;
103108

src/Symfony/Bridge/Twig/Mime/NotificationEmail.php

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ public static function asPublicEmail(Headers $headers = null, AbstractPart $body
7171
return $email;
7272
}
7373

74-
74+
/**
75+
* @return $this
76+
*/
7577
public function markAsPublic(): static
7678
{
7779
$this->context['importance'] = null;
@@ -80,7 +82,9 @@ public function markAsPublic(): static
8082
return $this;
8183
}
8284

83-
85+
/**
86+
* @return $this
87+
*/
8488
public function markdown(string $content): static
8589
{
8690
if (!class_exists(MarkdownExtension::class)) {
@@ -92,7 +96,9 @@ public function markdown(string $content): static
9296
return $this->content($content);
9397
}
9498

95-
99+
/**
100+
* @return $this
101+
*/
96102
public function content(string $content, bool $raw = false): static
97103
{
98104
$this->context['content'] = $content;
@@ -101,7 +107,9 @@ public function content(string $content, bool $raw = false): static
101107
return $this;
102108
}
103109

104-
110+
/**
111+
* @return $this
112+
*/
105113
public function action(string $text, string $url): static
106114
{
107115
$this->context['action_text'] = $text;
@@ -110,15 +118,19 @@ public function action(string $text, string $url): static
110118
return $this;
111119
}
112120

113-
121+
/**
122+
* @return $this
123+
*/
114124
public function importance(string $importance): static
115125
{
116126
$this->context['importance'] = $importance;
117127

118128
return $this;
119129
}
120130

121-
131+
/**
132+
* @return $this
133+
*/
122134
public function exception(\Throwable|FlattenException $exception): static
123135
{
124136
$exceptionAsString = $this->getExceptionAsString($exception);
@@ -134,7 +146,9 @@ public function exception(\Throwable|FlattenException $exception): static
134146
return $this;
135147
}
136148

137-
149+
/**
150+
* @return $this
151+
*/
138152
public function theme(string $theme): static
139153
{
140154
$this->theme = $theme;

src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ class TemplatedEmail extends Email
2222
private ?string $textTemplate = null;
2323
private array $context = [];
2424

25-
25+
/**
26+
* @return $this
27+
*/
2628
public function textTemplate(?string $template): static
2729
{
2830
$this->textTemplate = $template;
2931

3032
return $this;
3133
}
3234

33-
35+
/**
36+
* @return $this
37+
*/
3438
public function htmlTemplate(?string $template): static
3539
{
3640
$this->htmlTemplate = $template;
@@ -48,7 +52,9 @@ public function getHtmlTemplate(): ?string
4852
return $this->htmlTemplate;
4953
}
5054

51-
55+
/**
56+
* @return $this
57+
*/
5258
public function context(array $context): static
5359
{
5460
$this->context = $context;

src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public function attach(string $file, string $name = null, string $contentType =
6666
$this->message->addPart(new DataPart($body, $name, $contentType));
6767
}
6868

69-
69+
/**
70+
* @return $this
71+
*/
7072
public function setSubject(string $subject): static
7173
{
7274
$this->message->subject($subject);
@@ -79,7 +81,9 @@ public function getSubject(): ?string
7981
return $this->message->getSubject();
8082
}
8183

82-
84+
/**
85+
* @return $this
86+
*/
8387
public function setReturnPath(string $address): static
8488
{
8589
$this->message->returnPath($address);
@@ -92,7 +96,9 @@ public function getReturnPath(): string
9296
return $this->message->getReturnPath();
9397
}
9498

95-
99+
/**
100+
* @return $this
101+
*/
96102
public function addFrom(string $address, string $name = ''): static
97103
{
98104
$this->message->addFrom(new Address($address, $name));
@@ -108,7 +114,9 @@ public function getFrom(): array
108114
return $this->message->getFrom();
109115
}
110116

111-
117+
/**
118+
* @return $this
119+
*/
112120
public function addReplyTo(string $address): static
113121
{
114122
$this->message->addReplyTo($address);
@@ -124,7 +132,9 @@ public function getReplyTo(): array
124132
return $this->message->getReplyTo();
125133
}
126134

127-
135+
/**
136+
* @return $this
137+
*/
128138
public function addTo(string $address, string $name = ''): static
129139
{
130140
$this->message->addTo(new Address($address, $name));
@@ -140,7 +150,9 @@ public function getTo(): array
140150
return $this->message->getTo();
141151
}
142152

143-
153+
/**
154+
* @return $this
155+
*/
144156
public function addCc(string $address, string $name = ''): static
145157
{
146158
$this->message->addCc(new Address($address, $name));
@@ -156,7 +168,9 @@ public function getCc(): array
156168
return $this->message->getCc();
157169
}
158170

159-
171+
/**
172+
* @return $this
173+
*/
160174
public function addBcc(string $address, string $name = ''): static
161175
{
162176
$this->message->addBcc(new Address($address, $name));
@@ -172,7 +186,9 @@ public function getBcc(): array
172186
return $this->message->getBcc();
173187
}
174188

175-
189+
/**
190+
* @return $this
191+
*/
176192
public function setPriority(int $priority): static
177193
{
178194
$this->message->priority($priority);

src/Symfony/Component/Form/Util/OptionsResolverWrapper.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class OptionsResolverWrapper extends OptionsResolver
2424
{
2525
private array $undefined = [];
2626

27-
27+
/**
28+
* @return $this
29+
*/
2830
public function setNormalizer(string $option, \Closure $normalizer): static
2931
{
3032
try {
@@ -36,7 +38,9 @@ public function setNormalizer(string $option, \Closure $normalizer): static
3638
return $this;
3739
}
3840

39-
41+
/**
42+
* @return $this
43+
*/
4044
public function setAllowedValues(string $option, mixed $allowedValues): static
4145
{
4246
try {
@@ -48,7 +52,9 @@ public function setAllowedValues(string $option, mixed $allowedValues): static
4852
return $this;
4953
}
5054

51-
55+
/**
56+
* @return $this
57+
*/
5258
public function addAllowedValues(string $option, mixed $allowedValues): static
5359
{
5460
try {
@@ -60,7 +66,9 @@ public function addAllowedValues(string $option, mixed $allowedValues): static
6066
return $this;
6167
}
6268

63-
69+
/**
70+
* @return $this
71+
*/
6472
public function setAllowedTypes(string $option,string|array $allowedTypes): static
6573
{
6674
try {
@@ -72,7 +80,9 @@ public function setAllowedTypes(string $option,string|array $allowedTypes): stat
7280
return $this;
7381
}
7482

75-
83+
/**
84+
* @return $this
85+
*/
7686
public function addAllowedTypes(string $option,string|array $allowedTypes): static
7787
{
7888
try {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy