You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ efforts. Here are a few general guidelines to follow:
11
11
will need to write new test cases; if you're updating existing code, you will
12
12
need to make sure the methods you're updating are still completely covered.
13
13
14
-
3. Please abide by PSR code styling.
14
+
3. Please abide by [PSR-2 code styling](#ensuring-psr-2-coding-style-compliance).
15
15
16
16
4. Explaining your pull requests is appreciated. Unless you're fixing a
17
17
minor typographical error, create a description which explains your changes
@@ -44,3 +44,11 @@ phpunit
44
44
* Methods that create a new resource, say `Foo`, should be named `createFoo`. For example, [`createEntity`](/lib/OpenCloud/CloudMonitoring/Service.php#L105).
45
45
46
46
* When validating arguments to a method, please throw `\InvalidArgumentException` when an invalid argument is found. For example, see [here](/lib/OpenCloud/LoadBalancer/Resource/LoadBalancer.php#L212-L215).
47
+
48
+
## Ensuring PSR-2 coding style compliance
49
+
50
+
The code in this library is compliant with the [PSR-2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). To ensure that any code you contribute is also PSR-2 compliant, please run the following command from the base directory of this project _before_ submitting your contribution:
51
+
52
+
$ vendor/bin/php-cs-fixer fix --level psr2 .
53
+
54
+
Running this command will _change_ your code to become PSR-2 compliant. You will need to _commit_ these changes and make them part of your pull request.
0 commit comments