Skip to content

Commit

Permalink
replace specific php7 code
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Nov 14, 2018
1 parent 9447e66 commit 1c15d24
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -97,7 +97,7 @@ public function getParameter($parameter)
{
$params = $this->getParameters();

return $params[$parameter] ?? null;
return isset($params[$parameter]) ? $params[$parameter] : null;
}

/**
Expand Down
Expand Up @@ -493,7 +493,7 @@ public function getPriority()
'%[1-5]'
);

return $priority ?? 3;
return isset($priority) ? $priority : 3;
}

/**
Expand Down
Expand Up @@ -293,7 +293,7 @@ public function getChildren()
public function setChildren(array $children, $compoundLevel = null)
{
// TODO: Try to refactor this logic
$compoundLevel = $compoundLevel ?? $this->getCompoundLevel($children);
$compoundLevel = isset($compoundLevel) ? $compoundLevel : $this->getCompoundLevel($children);
$immediateChildren = array();
$grandchildren = array();
$newContentType = $this->userContentType;
Expand Down
Expand Up @@ -159,7 +159,7 @@ public function getReplacementsFor($address)
return $this->replacements->getReplacementsFor($address);
}

return $this->replacements[$address] ?? null;
return isset($this->replacements[$address]) ? $this->replacements[$address] : null;
}

/**
Expand Down
Expand Up @@ -208,7 +208,7 @@ public function setSourceIp($source)
*/
public function getSourceIp()
{
return $this->params['sourceIp'] ?? null;
return isset($this->params['sourceIp']) ? $this->params['sourceIp'] : null;
}

/**
Expand Down

0 comments on commit 1c15d24

Please sign in to comment.