44
55use Utopia \VCS \Adapter ;
66use Utopia \Cache \Cache ;
7- use Exception ;
87
98abstract class Git extends Adapter
109{
@@ -35,20 +34,18 @@ public function getType(): string
3534 {
3635 return self ::TYPE_GIT ;
3736 }
37+
3838 /**
39- * Create a file in a repository
40- *
41- * @param string $owner Owner of the repository
42- * @param string $repositoryName Name of the repository
43- * @param string $filepath Path where file should be created
44- * @param string $content Content of the file
45- * @param string $message Commit message
46- * @return array<mixed> Response from API
47- */
48- public function createFile (string $ owner , string $ repositoryName , string $ filepath , string $ content , string $ message = 'Add file ' ): array
49- {
50- throw new Exception ("Not implemented " );
51- }
39+ * Create a file in a repository
40+ *
41+ * @param string $owner Owner of the repository
42+ * @param string $repositoryName Name of the repository
43+ * @param string $filepath Path where file should be created
44+ * @param string $content Content of the file
45+ * @param string $message Commit message
46+ * @return array<mixed> Response from API
47+ */
48+ abstract public function createFile (string $ owner , string $ repositoryName , string $ filepath , string $ content , string $ message = 'Add file ' ): array ;
5249
5350 /**
5451 * Create a branch in a repository
@@ -59,8 +56,5 @@ public function createFile(string $owner, string $repositoryName, string $filepa
5956 * @param string $oldBranchName Name of the branch to branch from
6057 * @return array<mixed> Response from API
6158 */
62- public function createBranch (string $ owner , string $ repositoryName , string $ newBranchName , string $ oldBranchName ): array
63- {
64- throw new Exception ("Not implemented " );
65- }
59+ abstract public function createBranch (string $ owner , string $ repositoryName , string $ newBranchName , string $ oldBranchName ): array ;
6660}
0 commit comments