protected function Twig_NodeVisitor_SafeAnalysis::intersectSafe in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/NodeVisitor/SafeAnalysis.php \Twig_NodeVisitor_SafeAnalysis::intersectSafe()
1 call to Twig_NodeVisitor_SafeAnalysis::intersectSafe()
- Twig_NodeVisitor_SafeAnalysis::leaveNode in vendor/
Twig/ NodeVisitor/ SafeAnalysis.php - Called after child nodes are visited.
File
- vendor/
Twig/ NodeVisitor/ SafeAnalysis.php, line 115
Class
Code
protected function intersectSafe(array $a = null, array $b = null) {
if (null === $a || null === $b) {
return array();
}
if (in_array('all', $a)) {
return $b;
}
if (in_array('all', $b)) {
return $a;
}
return array_intersect($a, $b);
}