replace specific php7 code

This commit is contained in:
Frédéric FRANCE 2018-11-14 22:05:21 +01:00
parent 9447e66da1
commit 1c15d249b3
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
5 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
{ {
$params = $this->getParameters(); $params = $this->getParameters();
return $params[$parameter] ?? null; return isset($params[$parameter]) ? $params[$parameter] : null;
} }
/** /**

View File

@ -493,7 +493,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
'%[1-5]' '%[1-5]'
); );
return $priority ?? 3; return isset($priority) ? $priority : 3;
} }
/** /**

View File

@ -293,7 +293,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
public function setChildren(array $children, $compoundLevel = null) public function setChildren(array $children, $compoundLevel = null)
{ {
// TODO: Try to refactor this logic // TODO: Try to refactor this logic
$compoundLevel = $compoundLevel ?? $this->getCompoundLevel($children); $compoundLevel = isset($compoundLevel) ? $compoundLevel : $this->getCompoundLevel($children);
$immediateChildren = array(); $immediateChildren = array();
$grandchildren = array(); $grandchildren = array();
$newContentType = $this->userContentType; $newContentType = $this->userContentType;

View File

@ -159,7 +159,7 @@ class Swift_Plugins_DecoratorPlugin implements Swift_Events_SendListener, Swift_
return $this->replacements->getReplacementsFor($address); return $this->replacements->getReplacementsFor($address);
} }
return $this->replacements[$address] ?? null; return isset($this->replacements[$address]) ? $this->replacements[$address] : null;
} }
/** /**

View File

@ -208,7 +208,7 @@ class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTranspo
*/ */
public function getSourceIp() public function getSourceIp()
{ {
return $this->params['sourceIp'] ?? null; return isset($this->params['sourceIp']) ? $this->params['sourceIp'] : null;
} }
/** /**