From 2a8dfddbd668373ebcc24a092b36ad6658c3051b Mon Sep 17 00:00:00 2001 From: Tam Date: Wed, 24 Jan 2018 18:03:28 +0000 Subject: [PATCH] `::className()` -> `::class`, added misc github files --- .gitattributes | 3 ++- .github/CODE_OF_CONDUCT.md | 3 +++ .github/CONTRIBUTING.md | 32 ++++++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 17 +++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 7 +++++++ src/Seo.php | 14 +++++++------- 6 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.gitattributes b/.gitattributes index 6c8e126..45b7fd4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,4 +6,5 @@ README.md export-ignore releases.json export-ignore CHANGELOG.md export-ignore -LICENSE export-ignore \ No newline at end of file +LICENSE export-ignore +/.github export-ignore \ No newline at end of file diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b2e2ec6 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +# Code of Conduct + +Don't be a twat. \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..c2109e1 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing + +### New Features + +You can request new features by submitting an issue with `[FR]` prefix in the title. + +### Bugs + +If you find a bug, submit an issue and I promise I will get around to it. Eventually. +Make sure you search around to see if the same (or similar) issue exists before +submitting a new one. + +Know how to fix a bug and have too much spare time on your hands? Submit a Pull Request! +Check out the code conventions below before hand. + +## Code Conventions + +In addition to [Crafts Guidelines](https://github.com/craftcms/docs/blob/v3/en/coding-guidelines.md): + +- Use tabs (4 spaces) +- Try to keep within the 80 characters line length +- If function arguments or array values can't fit on one line, break each value onto it's own line +- Comment as much as possible + +#### JavaScript + +In addition to the above: + +- Write valid ES6 +- Use double quotes `"` + +Don't follow my example, try to stick to the above guidelines! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8f68699 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,17 @@ +### Description + + + +### Steps to reproduce + +1. +2. + + +### Additional info + +- Craft version: +- SEO version: +- PHP version: +- Database driver & version: +- Other Plugins: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..18021ec --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Fixes # . + +Changes proposed in this pull request: + +- +- +- \ No newline at end of file diff --git a/src/Seo.php b/src/Seo.php index ee78100..3ad80f0 100644 --- a/src/Seo.php +++ b/src/Seo.php @@ -70,7 +70,7 @@ public function init () // User Permissions if ($craft->getEdition() !== \Craft::Personal) { Event::on( - UserPermissions::className(), + UserPermissions::class, UserPermissions::EVENT_REGISTER_PERMISSIONS, [$this, 'onRegisterPermissions'] ); @@ -78,28 +78,28 @@ public function init () // CP URLs Event::on( - UrlManager::className(), + UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, [$this, 'onRegisterCPUrlRules'] ); // Site URLs Event::on( - UrlManager::className(), + UrlManager::class, UrlManager::EVENT_REGISTER_SITE_URL_RULES, [$this, 'onRegisterSiteUrlRules'] ); // Field type Event::on( - Fields::className(), + Fields::class, Fields::EVENT_REGISTER_FIELD_TYPES, [$this, 'onRegisterFieldTypes'] ); // Variable Event::on( - CraftVariable::className(), + CraftVariable::class, CraftVariable::EVENT_INIT, [$this, 'onRegisterVariable'] ); @@ -111,7 +111,7 @@ public function init () && !$craft->request->isLivePreview ) { Event::on( - ErrorHandler::className(), + ErrorHandler::class, ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION, [$this, 'onBeforeHandleException'] ); @@ -128,7 +128,7 @@ public function init () /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */ if (class_exists(\markhuot\CraftQL\CraftQL::class)) { Event::on( - SeoField::className(), + SeoField::class, 'craftQlGetFieldSchema', [new GetCraftQLSchema, 'handle'] );