Commit Graph

7 Commits

Author SHA1 Message Date
Alexandre Alapetite
314077a457 PHPStan prepare exceptions (#6037)
Take advantage of
https://phpstan.org/blog/bring-your-exceptions-under-control

Minimum changes to pass `tooWideThrowType` and `implicitThrows`.

Revert some mistakes from:
https://github.com/FreshRSS/FreshRSS/pull/5504
Preparation needed before new PRs of the same type:
https://github.com/FreshRSS/FreshRSS/pull/5962

Fix several wrong PHPDocs and catches:

> Method ... has ...Exception in PHPDoc @throws tag but it's not thrown.

> Dead catch - ...Exception is never thrown in the try block.
2024-01-15 10:36:30 +01:00
Luc SANCHEZ
30c7a61a9b Use strict_types (#5830)
* Little's optimisations and booleans in conditions

* Apply strict type

* Apply strict type

* Apply strict type

* Fix multiple bugs with PHP 8.2 and 8.3

* Many declares missing, more errors fixed

* Apply strict type

* Another approach

* Stronger typing for Minz_Session

* Fix case of SQLite

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-16 22:43:00 +01:00
Luc SANCHEZ
4a02352ccc applies several small optimizations (#5511)
declare(strict_types=1);
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-10-30 20:40:13 +01:00
Alexandre Alapetite
214a5cc9a4 PHP 5.2 compatiblity
Namespaces are not needed so far.

aacd1ffd40 (commitcomment-11503581)
2015-06-03 20:21:32 +02:00
Alexis Degrugillier
aacd1ffd40 Refactor exceptions
I removed unnecessary constructors and unnecessary inheritance
2015-03-04 23:32:20 -05:00
Marien Fressinaud
b5dee73ea0 Coding style
Remove spaces before parenthesis bis

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 18:51:08 +02:00
Alexandre Alapetite
878e96202e Grosse refactorisation pour permettre le chargement automatique des classes
C'est parti de changements pour
https://github.com/marienfressinaud/FreshRSS/issues/255 et finalement
j'ai continué la refactorisation...

Ajout de préfixes FreshRSS_ et Minz_ sur le modèle de SimplePie_.
Toutes les classes sont maintenant en chargement automatique (devrait
améliorer les performances en évitant de charger plein de classes
inutilisées, et faciliter la maintenance).
Suppression de set_include_path().
Si souhaité, certaines classes de Minz pourraient être déplacées dans un
sous-répertoire, par exemple les exceptions.

Tests et relecture nécessaires.
2013-12-15 03:30:24 +01:00