From 3517f60b21b5929f2d49cbd5ce19875e56183e89 Mon Sep 17 00:00:00 2001 From: SideCI Date: Mon, 2 Apr 2018 13:13:47 -0700 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 00000000..305fc150 --- /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 00000000..b9887c52 --- /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 00000000..e135d58a --- /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); + } +}