Skip to content

Commit 2b880c3

Browse files
author
lenlorijn
authored
Merge pull request #2 from mediact/feature/PD-653
2.0.0 Upgrade to 3.0 version of PHPCS
2 parents 029ccda + d0fdb1d commit 2b880c3

File tree

14 files changed

+165
-510
lines changed

14 files changed

+165
-510
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22
=====================
33

4-
Copyright © `2017` `MediaCT`
4+
Copyright © `MediaCT`
55

66
Permission is hereby granted, free of charge, to any person
77
obtaining a copy of this software and associated documentation

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# MediaCT Coding Standard
44

5-
This is the MediaCT coding standard, a set of tools for standardizing PHP development code style.
5+
This is the MediaCT coding standard. It contains rule sets for PHPCS and PHPMD.
66

77
## Installation
88

@@ -19,19 +19,18 @@ First configure PHPStorm to use the right phpcs command.
1919

2020
Go to __Settings > Languages & Frameworks > PHP > Code Sniffer__. Choose
2121
"Local" for the path and fill in the full path to
22-
`~/.composer/vendor/bin/phpcs`
22+
`~/.config/composer/vendor/bin/phpcs`
2323

2424
Then go to __Settings > Editor > Inspections__ and search for PHP Code Sniffer
2525
Validation. Select Custom and the add the path to
26-
`~/.composer/vendor/mediact/coding-standard/src/MediaCT`
26+
`~/.config/composer/vendor/mediact/coding-standard/src/MediaCT`
2727

2828
## Using the coding standard in a project
2929

3030
To use the standard in a project the standard needs to be required in composer.
3131

3232
```shell
3333
$ cd <project_directory>
34-
$ composer config repositories.mediact composer https://composer.mediact.nl
3534
$ composer require mediact/coding-standard --dev
3635
```
3736

@@ -64,6 +63,6 @@ not block a pull request.
6463
To configure phpcs to show also these messages execute the following command.
6564

6665
```shell
67-
$ ~/.composer/vendor/bin/phpcs \
66+
$ ~/.config/composer/vendor/bin/phpcs \
6867
--config-set severity 1
6968
```

composer.json

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
{
2-
"name": "mediact/coding-standard",
3-
"description": "MediaCT PHP Coding Standard",
4-
"type": "phpcs-sniffs",
5-
"license": "MIT",
6-
"authors": [
7-
{
8-
"name": "MediaCT",
9-
"email": "[email protected]"
2+
"name": "mediact/coding-standard",
3+
"description": "MediaCT PHP Coding Standard",
4+
"type": "phpcs-sniffs",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "MediaCT",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"require": {
13+
"php": "^5.4.0 || ^7.0",
14+
"squizlabs/php_codesniffer": "^3.0",
15+
"phpmd/phpmd": "^2.0"
16+
},
17+
"autoload": {
18+
"psr-4": {
19+
"Mediact\\CodingStandard\\": "src/"
20+
}
1021
}
11-
],
12-
"require": {
13-
"php": "^5.4.0 || ^7.0",
14-
"mediact/coding-standard-phpstorm": "^1.0",
15-
"squizlabs/php_codesniffer": "2.*",
16-
"phpmd/phpmd": "@stable",
17-
"phpstan/phpstan": "^0.6.4"
18-
},
19-
"autoload": {
20-
"psr-0": {
21-
"MediactCommon": "src/MediactCommon",
22-
"MediactMagento1": "src/MediactMagento1",
23-
"MediaCT": "src/MediaCT",
24-
"MediactPhpUnit": "src/MediactPhpUnit"
25-
}
26-
}
2722
}

0 commit comments

Comments
 (0)