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
Please follow the established coding style in the library. Google Cloud PHP follows the [PSR-2](https://www.php-fig.org/psr/psr-2/) Coding Style.
112
+
This is enforced using both [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) and [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer).
112
113
113
-
You can check your code against these rules by running PHPCS with the proper ruleset, like this:
114
+
You can run both of these checks using the `style-check` composer script:
114
115
115
116
```sh
116
-
$ composer style
117
+
$ composer style-check
117
118
```
118
119
120
+
If these changes look correct, you can automatically fix the issues by running this command:
121
+
122
+
```sh
123
+
$ composer style-fix
124
+
```
125
+
126
+
### Static Analysis
127
+
128
+
Run PHPStan for static analysis with the following command.
129
+
130
+
```sh
131
+
$ composer phpstan
132
+
```
133
+
134
+
Any errors here will have to be fixed manually.
135
+
136
+
**NOTE**: PHP CS Fixer does not check for or fix line lengths or trailing whitespace, which is the primary reason we use both libraries.
137
+
119
138
## Owlbot
120
139
121
140
This repository is using OwlBot forcopying code from the generated libraryin
0 commit comments