Skip to content

Commit ec0c2d6

Browse files
Narrow existing return types on private/internal/final/test methods
1 parent dfa7a4d commit ec0c2d6

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

Mime/WrappedTemplatedEmail.php

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ public function attach(string $file, string $name = null, string $contentType =
5757
}
5858
}
5959

60-
/**
61-
* @return $this
62-
*/
63-
public function setSubject(string $subject): self
60+
public function setSubject(string $subject): static
6461
{
6562
$this->message->subject($subject);
6663

@@ -72,10 +69,7 @@ public function getSubject(): ?string
7269
return $this->message->getSubject();
7370
}
7471

75-
/**
76-
* @return $this
77-
*/
78-
public function setReturnPath(string $address): self
72+
public function setReturnPath(string $address): static
7973
{
8074
$this->message->returnPath($address);
8175

@@ -87,10 +81,7 @@ public function getReturnPath(): string
8781
return $this->message->getReturnPath();
8882
}
8983

90-
/**
91-
* @return $this
92-
*/
93-
public function addFrom(string $address, string $name = ''): self
84+
public function addFrom(string $address, string $name = ''): static
9485
{
9586
$this->message->addFrom(new Address($address, $name));
9687

@@ -105,10 +96,7 @@ public function getFrom(): array
10596
return $this->message->getFrom();
10697
}
10798

108-
/**
109-
* @return $this
110-
*/
111-
public function addReplyTo(string $address): self
99+
public function addReplyTo(string $address): static
112100
{
113101
$this->message->addReplyTo($address);
114102

@@ -123,10 +111,7 @@ public function getReplyTo(): array
123111
return $this->message->getReplyTo();
124112
}
125113

126-
/**
127-
* @return $this
128-
*/
129-
public function addTo(string $address, string $name = ''): self
114+
public function addTo(string $address, string $name = ''): static
130115
{
131116
$this->message->addTo(new Address($address, $name));
132117

@@ -141,10 +126,7 @@ public function getTo(): array
141126
return $this->message->getTo();
142127
}
143128

144-
/**
145-
* @return $this
146-
*/
147-
public function addCc(string $address, string $name = ''): self
129+
public function addCc(string $address, string $name = ''): static
148130
{
149131
$this->message->addCc(new Address($address, $name));
150132

@@ -159,10 +141,7 @@ public function getCc(): array
159141
return $this->message->getCc();
160142
}
161143

162-
/**
163-
* @return $this
164-
*/
165-
public function addBcc(string $address, string $name = ''): self
144+
public function addBcc(string $address, string $name = ''): static
166145
{
167146
$this->message->addBcc(new Address($address, $name));
168147

@@ -177,10 +156,7 @@ public function getBcc(): array
177156
return $this->message->getBcc();
178157
}
179158

180-
/**
181-
* @return $this
182-
*/
183-
public function setPriority(int $priority): self
159+
public function setPriority(int $priority): static
184160
{
185161
$this->message->priority($priority);
186162

0 commit comments

Comments
 (0)