It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
The property Chubbyphp\Serialization\...malizerContext::$groups has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be
removed from the class and what other property to use instead.
The property Chubbyphp\Serialization\...malizerContext::$groups has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be
removed from the class and what other property to use instead.
Loading history...
53
}
54
55
/**
56
* @return ServerRequestInterface|null
57
*/
58
2
public function getRequest()
59
{
60
2
return $this->request;
61
}
62
63
/**
64
* @return array
65
*/
66
3
public function getAttributes(): array
67
{
68
3
return $this->attributes;
69
}
70
71
/**
72
* @param string $name
73
* @param mixed $default
74
*
75
* @return mixed
76
*/
77
2
public function getAttribute(string $name, $default = null)
78
{
79
2
if (isset($this->attributes[$name])) {
80
1
return $this->attributes[$name];
81
}
82
83
1
return $default;
84
}
85
86
/**
87
* @param string $name
88
* @param mixed $value
89
*
90
* @return NormalizerContextInterface
91
*/
92
1
public function withAttribute(string $name, $value): NormalizerContextInterface
If you suppress an error, we recommend checking for the error condition explicitly: