for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JiraRestApi\Issue;
trait VisibilityTrait {
/**
*
* @param Visibility $type
* @param null $value
$value
null
* @return $this
*/
public function setVisibility($type, $value = null)
{
if (is_null($this->visibility)) {
$this->visibility = new Visibility();
visibility
}
if (is_array($type)) {
is_array($type)
false
$this->visibility->setType($type['type']);
$this->visibility->setValue($type['value']);
} elseif ($type instanceof Visibility) {
$type
JiraRestApi\Issue\Visibility
$this->visibility = $type;
} else {
$this->visibility->setType($type);
$this->visibility->setValue($value);
return $this;