initialiseGit(); if (! \in_array($this->git->getBranch(), $this->git->getBranchesMain(), false)) { $this->error('Not on the stable or dev branch! Refusing to update repository'); return; } $wasRunning = false; if ((new Tmux())->isRunning() === true) { $wasRunning = true; $this->call('tmux-ui:stop', ['type' => 'true']); } $this->info($this->git->gitPull()); if ($wasRunning === true) { $this->call('tmux-ui:start'); } } protected function initialiseGit() { if (! ($this->git instanceof Git)) { $this->git = new Git(); } } }