Gitlab\Model\Branch::protect PHP Method

protect() public method

public protect ( boolean $devPush = false, boolean $devMerge = false ) : Branch
$devPush boolean
$devMerge boolean
return Branch
    public function protect($devPush = false, $devMerge = false)
    {
        $data = $this->api('repositories')->protectBranch($this->project->id, $this->name, $devPush, $devMerge);
        return static::fromArray($this->getClient(), $this->project, $data);
    }

Usage Example

Beispiel #1
0
 /**
  * @param string $branch_name
  * @return Branch
  */
 public function protectBranch($branch_name)
 {
     $branch = new Branch($this, $branch_name);
     $branch->setClient($this->getClient());
     return $branch->protect();
 }
All Usage Examples Of Gitlab\Model\Branch::protect