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; } $this->info($this->git->gitPull()); } protected function initialiseGit() { if (! ($this->git instanceof Git)) { $this->git = new Git(); } } }