diff --git a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php index ecd5787..609ac1e 100644 --- a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php +++ b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php @@ -15,6 +15,7 @@ namespace VDM\Joomla\Gitea\Abstraction; use VDM\Joomla\Gitea\Utilities\Http; use VDM\Joomla\Gitea\Utilities\Uri; use VDM\Joomla\Gitea\Utilities\Response; +use VDM\Joomla\Interfaces\Git\ApiInterface; /** @@ -22,7 +23,7 @@ use VDM\Joomla\Gitea\Utilities\Response; * * @since 3.2.0 */ -abstract class Api +abstract class Api implements ApiInterface { /** * The Http class diff --git a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/settings.json b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/settings.json index 9a88be5..513ea94 100644 --- a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/settings.json +++ b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/settings.json @@ -3,7 +3,9 @@ "add_licensing_template": "2", "extends": "", "guid": "3d7af7a2-dabe-4111-b5fd-c5bfa8755469", - "implements": null, + "implements": [ + "17ed2fec-49d6-4731-92c3-f9cd78fb6273" + ], "load_selection": null, "name": "Api", "power_version": "1.0.0", diff --git a/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.php b/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.php index 3ba26d3..f16c849 100644 --- a/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.php +++ b/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Gitea\Repository; +use VDM\Joomla\Interfaces\Git\Repository\ContentsInterface; use VDM\Joomla\Gitea\Abstraction\Api; @@ -20,7 +21,7 @@ use VDM\Joomla\Gitea\Abstraction\Api; * * @since 3.2.0 */ -class Contents extends Api +class Contents extends Api implements ContentsInterface { /** * Get a file from a repository. @@ -345,20 +346,20 @@ class Contents extends Api /** * Delete a file in a repository. * - * @param string $owner The owner name. - * @param string $repo The repository name. - * @param string $filepath The file path. - * @param string $message The commit message. - * @param string $branch The branch name (optional). - * @param string $sha The blob SHA of the file. - * @param string $authorName The author name (optional). - * @param string $authorEmail The author email (optional). - * @param string $committerName The committer name (optional). - * @param string $committerEmail The committer email (optional). - * @param string $authorDate The author date (optional). - * @param string $committerDate The committer date (optional). - * @param string $newBranch The new branch name (optional). - * @param bool $signoff Add a Signed-off-by trailer (optional). + * @param string $owner The owner name. + * @param string $repo The repository name. + * @param string $filepath The file path. + * @param string $message The commit message. + * @param string $sha The blob SHA of the file. + * @param string|null $branch The branch name (optional). + * @param string|null $authorName The author name (optional). + * @param string|null $authorEmail The author email (optional). + * @param string|null $committerName The committer name (optional). + * @param string|null $committerEmail The committer email (optional). + * @param string|null $authorDate The author date (optional). + * @param string|null $committerDate The committer date (optional). + * @param string|null $newBranch The new branch name (optional). + * @param bool|null $signoff Add a Signed-off-by trailer (optional). * * @return object|null * @since 3.2.0 @@ -449,7 +450,7 @@ class Contents extends Api // Send the delete request. return $this->response->get( $this->http->delete( - $this->uri->get($path), + $this->uri->get($path), [], null, json_encode($data) ) ); @@ -458,10 +459,10 @@ class Contents extends Api /** * Get the EditorConfig definitions of a file in a repository. * - * @param string $owner The owner name. - * @param string $repo The repository name. - * @param string $filepath The file path. - * @param string $ref The name of the commit/branch/tag. + * @param string $owner The owner name. + * @param string $repo The repository name. + * @param string $filepath The file path. + * @param string|null $ref The name of the commit/branch/tag. * * @return string|null * @since 3.2.0 diff --git a/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.power b/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.power index abbfadb..e3e90f3 100644 --- a/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.power +++ b/src/8d1baef6-fcad-49a9-848f-428009cdb989/code.power @@ -321,20 +321,20 @@ /** * Delete a file in a repository. * - * @param string $owner The owner name. - * @param string $repo The repository name. - * @param string $filepath The file path. - * @param string $message The commit message. - * @param string $branch The branch name (optional). - * @param string $sha The blob SHA of the file. - * @param string $authorName The author name (optional). - * @param string $authorEmail The author email (optional). - * @param string $committerName The committer name (optional). - * @param string $committerEmail The committer email (optional). - * @param string $authorDate The author date (optional). - * @param string $committerDate The committer date (optional). - * @param string $newBranch The new branch name (optional). - * @param bool $signoff Add a Signed-off-by trailer (optional). + * @param string $owner The owner name. + * @param string $repo The repository name. + * @param string $filepath The file path. + * @param string $message The commit message. + * @param string $sha The blob SHA of the file. + * @param string|null $branch The branch name (optional). + * @param string|null $authorName The author name (optional). + * @param string|null $authorEmail The author email (optional). + * @param string|null $committerName The committer name (optional). + * @param string|null $committerEmail The committer email (optional). + * @param string|null $authorDate The author date (optional). + * @param string|null $committerDate The committer date (optional). + * @param string|null $newBranch The new branch name (optional). + * @param bool|null $signoff Add a Signed-off-by trailer (optional). * * @return object|null * @since 3.2.0 @@ -425,7 +425,7 @@ // Send the delete request. return $this->response->get( $this->http->delete( - $this->uri->get($path), + $this->uri->get($path), [], null, json_encode($data) ) ); @@ -434,10 +434,10 @@ /** * Get the EditorConfig definitions of a file in a repository. * - * @param string $owner The owner name. - * @param string $repo The repository name. - * @param string $filepath The file path. - * @param string $ref The name of the commit/branch/tag. + * @param string $owner The owner name. + * @param string $repo The repository name. + * @param string $filepath The file path. + * @param string|null $ref The name of the commit/branch/tag. * * @return string|null * @since 3.2.0 diff --git a/src/8d1baef6-fcad-49a9-848f-428009cdb989/settings.json b/src/8d1baef6-fcad-49a9-848f-428009cdb989/settings.json index 46884f7..269df7b 100644 --- a/src/8d1baef6-fcad-49a9-848f-428009cdb989/settings.json +++ b/src/8d1baef6-fcad-49a9-848f-428009cdb989/settings.json @@ -3,7 +3,9 @@ "add_licensing_template": "2", "extends": "3d7af7a2-dabe-4111-b5fd-c5bfa8755469", "guid": "8d1baef6-fcad-49a9-848f-428009cdb989", - "implements": null, + "implements": [ + "d1de5d5b-bf29-4031-8094-76c4f6c75900" + ], "load_selection": null, "name": "Contents", "power_version": "1.0.0", diff --git a/src/ce40b3d2-226c-4a64-b116-c19455822be1/code.php b/src/ce40b3d2-226c-4a64-b116-c19455822be1/code.php index 3529cac..c58ea2c 100644 --- a/src/ce40b3d2-226c-4a64-b116-c19455822be1/code.php +++ b/src/ce40b3d2-226c-4a64-b116-c19455822be1/code.php @@ -13,7 +13,9 @@ namespace VDM\Joomla\Gitea\Utilities; use Joomla\CMS\Http\Http as JoomlaHttp; -use Joomla\Registry\Registry; +use Joomla\CMS\Uri\Uri; +use Joomla\Registry\Registry; + /** diff --git a/src/ce40b3d2-226c-4a64-b116-c19455822be1/settings.json b/src/ce40b3d2-226c-4a64-b116-c19455822be1/settings.json index 1bc4680..2b7d045 100644 --- a/src/ce40b3d2-226c-4a64-b116-c19455822be1/settings.json +++ b/src/ce40b3d2-226c-4a64-b116-c19455822be1/settings.json @@ -15,6 +15,6 @@ "description": "The Gitea Http\r\n\r\n@since 3.2.0", "extends_custom": "JoomlaHttp", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", - "head": "use Joomla\\CMS\\Http\\Http as JoomlaHttp;\r\nuse Joomla\\Registry\\Registry;", + "head": "use Joomla\\CMS\\Http\\Http as JoomlaHttp;\r\nuse Joomla\\CMS\\Uri\\Uri;\r\nuse Joomla\\Registry\\Registry;\r\n", "composer": "" } \ No newline at end of file