function canPiston() { $errors = array(); if (!SVN::available()) { $errors[] = "Subversion is not available."; } if (!Piston::available()) { $errors[] = "Piston is not available."; } if (!SVN::isSVNRepo() && !GIT::isGITRepo()) { $errors[] = "Piston only works on svn working copies and git repositories."; } return $errors; }