public function getMergedBranches($ref = 'HEAD', $remote = false, $dir = null, $mustRun = false)
    {
        $args = ['branch', '--list', '--no-column', '--no-color', '--merged', $ref];
        if ($remote) {
            $args[] = '--remote';
        }
        $mergedBranches = $this->execute($args, $dir, $mustRun);
        $array = array_map(
            function ($element) {
                return trim($element, ' *');
            },
            explode("\n", $mergedBranches)
        );

        return $array;
    }
public function getMergedBranches($ref = 'HEAD', $remote = false, $dir = null, $mustRun = false)
    {
        $args = ['branch', '--list', '--no-column', '--no-color', '--merged', $ref];
        if ($remote) {
            $args[] = '--remote';
        }
        $mergedBranches = $this->execute($args, $dir, $mustRun);
        $array = array_map(
            function ($element) {
                return trim($element, ' *');
            },
            explode("\n", $mergedBranches)
        );

        return $array;
    }
public function getMergedBranches ( $ ref = 'HEAD' , $ remote = false , $ dir = null , $ mustRun = false ) { $ args = [ 'branch' , '--list' , '--no-column' , '--no-color' , '--merged' , $ ref ] ; if ( $ remote ) { $ args [ ] = '--remote' ; } $ mergedBranches = $ this -> execute ( $ args , $ dir , $ mustRun ) ; $ array = array_map ( function ( $ element ) { return trim ( $ element , ' *' ) ; } , explode ( "\n" , $ mergedBranches ) ) ; return $ array ; }
Get a list of branches merged with a specific ref.

@param string $ref
@param bool   $remote
@param null   $dir
@param bool   $mustRun

@return string[]
Get a list of branches merged with a specific ref .