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); + } +}