19 Commits

Author SHA1 Message Date
oleibman 365f9f1995 Compact Function List by Name Document
The entries in the "function list by name" document are very long, and almost all of them require horizontal scrolling, which is not very convenient for the end-user. This PR creates a "function list by name compact" document, in which `CATEGORY_` is stripped from all the category names and `PhpOffice\PhpSpreadsheet\Calculation\` is stripped from all the functions. I believe this eliminates the need to scroll horizontally within the document. I waffled on whether this should replace the existing document, or whether it should be an additional document. I decided there was probably some merit in keeping the old, and hardly any down-side, so, at least for now, we will generate both documents, and they will link to each other.

No changes to source code.
2025-05-23 08:32:52 -07:00
oleibman 6cec624f6a Scrutinizer 2025-04-06 20:12:01 -07:00
oleibman 1da177e0d3 Make Files Executable 2025-04-06 18:27:55 -07:00
oleibman f1a61c4c6b Phpstan Tweaks
Phpstan level 10 reports an enormous number of errors. So does the excluded missingType.iterableValue. I do not plan to introduce either any time soon. But I will submit piecemeal changes from time to time. Changes will be mostly limited to phpdoc type declarations.
2025-04-06 18:14:59 -07:00
oleibman 3eedf9e2f0 Better Typing in Test Members
Change "mixed" declarations to more accurate types in test members; in particular, change those that would be flagged if we were to run Phpstan at level 9 (we currently run level 8). I may or may not follow up with source code (over 700 level-9 problems remain for src), but, as with strict typing, there is no reason to avoid the effort for test members.

It was necessary to update some doc blocks in src to accommodate this change. However, no executable code is touched.
2024-01-05 01:43:50 -08:00
Adrien Crivelli 83f71298ad Also forbid PHPDoc without a variable name 2024-01-04 12:34:47 +08:00
oleibman 0cd725d000 Automate Function-by-Name and Function-by-Category Docs (#3818)
* Automate Function-by-Name and Function-by-Category Docs

Examining whether it is possible to analyze the 2 Php scripts in the bin directory even though they lack a .php extension, I found that the docs generated by `generate-document` had not been updated in over a year even though support for a number of functions (e.g. ARRAYTOTEXT) had long ago been implemented. The files generated by the other script `generate-locales` are automatically generated as part of the unit test suite, and I can't see any reason not to do the same for `generate-document`.

It isn't totally clear that the 2 scripts in bin are needed any more now that each has an equivalent in the unit test suite. For now, I'm keeping them, and allowing them to be analyzed by phpcs, php-cs-fixer, and phpstan.

* Reflection Not Required

Remove it from bin scripts and DocumentGeneratorTest.

* Better Html/Css Display for Function Lists

* Redesign Features Cross Reference Doc

It was inaccurate, and pretty much impossible to read in entirety. This version should be easier to read, and to correct. That's important, because there are almost certainly new inaccuracies in this version.

* Add Html to Features Cross-Reference Readers
2023-12-11 07:38:13 -08:00
Adrien Crivelli bb6ae9ce7d Prevent adding PHPDoc types instead of native types
PHPDoc types can sometimes be entirely expressed as PHP native types. It
is better because it avoids code duplication and enables type runtime
check.

This will help us slowly migrate away from PHPDoc typing to PHP native typing.
2023-09-13 10:06:58 +08:00
Adrien Crivelli 6cf20b0a10 pre-commit for php-cs-fixer 3 2021-11-17 23:15:32 +09:00
MarkBaker e0e5a81d69 Move documentation builder to infra so that it isn't included in non --dev composer downloads
Unit test for locale builder
Add new function stubs (as dummy) to Calculation list of functions
2021-05-28 22:35:37 +02:00
MarkBaker f89bfc9e02 Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02:00
MarkBaker e83f862d0b Initial work on auto-building locale files for Exce functions 2021-05-20 20:41:09 +02:00
Adrien Crivelli 5f413b8a58 Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
Adrien Crivelli 588ca6beb3 Replace migration tool with RectorPHP
Fixes #1445
2020-05-02 12:34:50 +09:00
池下克彦 fe83f070aa improve testability 2020-02-24 23:24:47 +09:00
池下克彦 e11202168f bin/generate-document generates function-list-by-* 2020-02-21 14:56:43 +09:00
Zharikov Viktor 07455d24f6 Make global usage of use instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
Adrien Crivelli a23f681332 Add pre-commit git hook to check code style
The hook automatically fixes most code style mistakes
and should be installed once with:

```sh
ln -s ../../bin/pre-commit .git/hooks/pre-commit
```
2017-01-05 01:30:44 +09:00
Adrien Crivelli 4b011b427f Forgot to commit the migration tool command line 2016-12-13 23:48:24 +09:00