Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public function __serialize(){
* Return the stringified attribute
*
* @return string
*
* @psalm-taint-source input
*/
public function __toString() {
return implode(", ", $this->values);
Expand All @@ -76,6 +78,8 @@ public function __toString() {
* Return the stringified attribute
*
* @return string
*
* @psalm-taint-source input
*/
public function toString(): string {
return $this->__toString();
Expand All @@ -85,6 +89,8 @@ public function toString(): string {
* Convert instance to array
*
* @return array
*
* @psalm-taint-source input
*/
public function toArray(): array {
return $this->__serialize();
Expand Down Expand Up @@ -137,6 +143,8 @@ public function contains(mixed $value): bool {
*
* @param int|string $key
* @return mixed
*
* @psalm-taint-source input
*/
public function get(int|string $key = 0): mixed {
return $this->values[$key] ?? null;
Expand Down Expand Up @@ -245,6 +253,8 @@ public function getName(): string {
* Get all values
*
* @return array
*
* @psalm-taint-source input
*/
public function all(): array {
reset($this->values);
Expand All @@ -255,6 +265,8 @@ public function all(): array {
* Get the first value if possible
*
* @return mixed|null
*
* @psalm-taint-source input
*/
public function first(): mixed {
return reset($this->values);
Expand All @@ -264,6 +276,8 @@ public function first(): mixed {
* Get the last value if possible
*
* @return mixed|null
*
* @psalm-taint-source input
*/
public function last(): mixed {
return end($this->values);
Expand Down
8 changes: 8 additions & 0 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ public function __get($name) {
* @throws RuntimeException
* @throws ResponseException
* @throws MessageSizeFetchingException
*
* @psalm-taint-source input
*/
public function get($name): mixed {
if (isset($this->attributes[$name]) && $this->attributes[$name] !== null) {
Expand Down Expand Up @@ -511,6 +513,8 @@ public function hasTextBody(): bool {
* Get the Message text body
*
* @return string
*
* @psalm-taint-source input
*/
public function getTextBody(): string {
if (!isset($this->bodies['text'])) {
Expand All @@ -533,6 +537,8 @@ public function hasHTMLBody(): bool {
* Get the Message html body
*
* @return string
*
* @psalm-taint-source input
*/
public function getHTMLBody(): string {
if (!isset($this->bodies['html'])) {
Expand Down Expand Up @@ -1288,6 +1294,8 @@ public function hasAttachments(): bool {
* Get the raw body
*
* @return string
*
* @psalm-taint-source input
*/
public function getRawBody(): string {
if ($this->raw_body === "") {
Expand Down