From f84c5d9e6e8cc1ada57a54727be0857ac263fb36 Mon Sep 17 00:00:00 2001 From: SideCI Date: Wed, 8 Nov 2017 23:12:21 +0530 Subject: [PATCH] SideCI Demo --- sideci.yml | 8 ++++++ sideci_demo/phpmd.xml | 14 +++++++++++ sideci_demo/phpmd_demo.php | 51 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 sideci.yml create mode 100644 sideci_demo/phpmd.xml create mode 100644 sideci_demo/phpmd_demo.php diff --git a/sideci.yml b/sideci.yml new file mode 100644 index 0000000..305fc15 --- /dev/null +++ b/sideci.yml @@ -0,0 +1,8 @@ +linter: + rubocop: + root_dir: 'sideci_demo' + + phpmd: + root_dir: 'sideci_demo' + options: + rule: 'phpmd.xml' diff --git a/sideci_demo/phpmd.xml b/sideci_demo/phpmd.xml new file mode 100644 index 0000000..b9887c5 --- /dev/null +++ b/sideci_demo/phpmd.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/sideci_demo/phpmd_demo.php b/sideci_demo/phpmd_demo.php new file mode 100644 index 0000000..e135d58 --- /dev/null +++ b/sideci_demo/phpmd_demo.php @@ -0,0 +1,51 @@ +owner = $owner; + $this->name = $name; + $this->public = $visibility === PublicVisibility; + $this->client = new Client($_SERVER['API_TOKEN']); + } + + /** + * @return string + */ + public function getFullName(): string + { + return $this->owner . $this->name; + } + + /** + * @return bool + */ + public function getPublic(): bool + { + return $this->public; + } + + /** + * @param string $title + * @param string $description + */ + public function createIssue(string $title, string $description) + { + $this->client->createIssue($this->getFullName, $title, $description); + } +}