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
Root cause: Psalm's strict binary operands mode (psalm.dev/058) forbids mixing int and float in arithmetic without explicit casts.
Changes made:
1. degToSex / degToSec — Changed return type from float|int to float, added $angle = (float) $angle; at the top, and replaced all int literals in arithmetic with float literals (60 → 60.0, 100 → 100.0, etc.) and added (float) casts on $deg and $min before arithmetic.
2. fromMN95ToWGSLatitude / fromMN95ToWGSLongitude — Cast float|int params with (float) $east / (float) $north, and changed integer constants to float literals (2600000 → 2600000.0, 1000000 → 1000000.0, 100 / 36 → 100.0 / 36.0).
3. fromMN03ToWGSLatitude / fromMN03ToWGSLongitude — Changed integer constants to float literals (600000 → 600000.0, 200000 → 200000.0, 1000000 → 1000000.0, 100 / 36 → 100.0 / 36.0).
4. All four WGSToMN* methods — Changed / 10000 → / 10000.0 in the auxiliary value calculations (the subtraction operands were already float literals, so once degToSec returns float, those lines are clean).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,22 @@ Pull requests for bugs are more than welcome - please explain the bug you're try
13
13
14
14
## Developing
15
15
16
+
## 🧪 Running tests
17
+
18
+
Run the test suite without code coverage (no Xdebug required):
19
+
20
+
```bash
21
+
./vendor/bin/phpunit --no-coverage
22
+
```
23
+
24
+
Run the test suite with code coverage (requires [Xdebug](https://xdebug.org/) or [PCOV](https://github.com/krakjoe/pcov)):
25
+
26
+
```bash
27
+
XDEBUG_MODE=coverage ./vendor/bin/phpunit
28
+
```
29
+
30
+
> **Note:** Running `./vendor/bin/phpunit` without `--no-coverage` and without a coverage driver will fail with _"No code coverage driver available"_. Use `--no-coverage` for day-to-day local development.
31
+
16
32
## 🚔 Check Symfony 4 coding standards & best practices
17
33
18
34
You need to run composer before using [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
0 commit comments