Skip to content

Commit

Permalink
::className() -> ::class, added misc github files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jan 24, 2018
1 parent 72e0852 commit 2a8dfdd
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Expand Up @@ -6,4 +6,5 @@
README.md export-ignore
releases.json export-ignore
CHANGELOG.md export-ignore
LICENSE export-ignore
LICENSE export-ignore
/.github export-ignore
3 changes: 3 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
# Code of Conduct

Don't be a twat.
32 changes: 32 additions & 0 deletions .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!
17 changes: 17 additions & 0 deletions .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:
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,7 @@
Fixes # .

Changes proposed in this pull request:

-
-
-
14 changes: 7 additions & 7 deletions src/Seo.php
Expand Up @@ -70,36 +70,36 @@ public function init ()
// User Permissions
if ($craft->getEdition() !== \Craft::Personal) {
Event::on(
UserPermissions::className(),
UserPermissions::class,
UserPermissions::EVENT_REGISTER_PERMISSIONS,
[$this, 'onRegisterPermissions']
);
}

// 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']
);
Expand All @@ -111,7 +111,7 @@ public function init ()
&& !$craft->request->isLivePreview
) {
Event::on(
ErrorHandler::className(),
ErrorHandler::class,
ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION,
[$this, 'onBeforeHandleException']
);
Expand All @@ -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']
);
Expand Down

0 comments on commit 2a8dfdd

Please sign in to comment.