Commit Graph

11 Commits

Author SHA1 Message Date
oleibman ecbd702628 Phpstan and Samples
Phpstan hasn't identified any errors in Samples in a long time. But, as it turns out, one particular error is suppressed:
```
Variable $helper might not be defined.
```
This error would be generated by almost all samples, and the errors that it suppresses will become problematic if we move to Level 10. We are not yet committed to doing that, but it is pretty easy to write a script to change the samples so that error no longer happens, and there isn't really any reason to delay doing so. The results of that script constitute this PR.
2025-04-05 13:54:20 -07:00
oleibman e32447c4be Phpstan Level 9: Last 2025-03-31 21:53:47 -07:00
oleibman c84960fb69 Phpstan Level 9 - Part 2 of Many 2025-03-08 23:22:15 -08:00
oleibman 700a80346b Merge commit from fork
* Validate Post Item in Convert-Online.php

* Correct Samples - Currency, Accounting, and Downloader

* Smarter Color Formatting for Currency

* Use helper->log Rather than echo in Convert-Online

Responding to comment from @PowerKiki about use of echo for error messages. I do not believe that an exception is warranted, but other scripts use helper->log for error messages, and now so will this one.
2024-12-25 19:11:31 -08:00
oleibman 5266086781 Reorganize Samples Part 2
Further reorganization following on PR #3890.
2024-02-04 10:29:41 -08:00
oleibman 29c0162e2a Let Phpstan Run on Samples (#3808)
* Let Phpstan Run on Samples

Phpstan currently analyzes all source and test members. We already run phpcs and php-cs-fixer on samples as well. I would expect that samples are often used as templates for code in userland; it behooves us to be at least as careful with those members as for the others which are already being analyzed.  Aside from 1300+ messages `Variable $helper might not be defined.`, which will be suppressed in phpstan.neon.dist, there are really only a few changes needed for sample members, so that part of the code base was already in good shape, and is now even better. No annotations were needed.

* Scrutinizer 2 out of 3

1 false positive, now suppressed; fix other 2.

* Remove Dead Code

* Very Minor Changes

* Add infra
2023-12-06 09:40:27 -08:00
Adrien Crivelli 5029e8147e Update coding style 2023-09-13 10:26:51 +08:00
MarkBaker a69ab80f7d Build currencies list for Currency and Accounting Wizards 2023-03-28 20:37:10 +02:00
MarkBaker 32b4dfb525 Tweaks 2023-03-28 15:01:48 +02:00
MarkBaker 378f12035d PHPCS fixes 2023-03-28 06:39:40 +02:00
MarkBaker 3c82cea8f0 Examples for using some of the new NumberFormat Wizards 2023-03-28 00:08:51 +02:00