public function MethodNode::setVisibility in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php \Prophecy\Doubler\Generator\Node\MethodNode::setVisibility()
Parameters
string $visibility:
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Generator/ Node/ MethodNode.php, line 53
Class
- MethodNode
- Method node.
Namespace
Prophecy\Doubler\Generator\NodeCode
public function setVisibility($visibility) {
$visibility = strtolower($visibility);
if (!in_array($visibility, array(
'public',
'private',
'protected',
))) {
throw new InvalidArgumentException(sprintf('`%s` method visibility is not supported.', $visibility));
}
$this->visibility = $visibility;
}