PHP Classes

After tests

Recommend this page to a friend!

      PHP SVG to Image Converter  >  All threads  >  After tests  >  (Un) Subscribe thread alerts  
Subject:After tests
Summary:Perfectible
Messages:2
Author:keran
Date:2020-02-02 03:25:50
 

  1. After tests   Reply   Report abuse  
Picture of keran keran - 2020-02-02 03:25:50
Salut / Hi

Quelques améliorations seraient bienvenues avant de concourir car en l'état, bien qu'intéressante, cette classe n'est pas utilisable même avec php 5.

Les shorts tags, ce n'est plus possible pour être portable.
split est obsolète est ce remplace parfaitement par explode même en version 5. Et c'est portable.
Le code est bourré de notice et warning... E_ALL aide à les éliminer.
Pourquoi ne pas écrire plusieurs constructeurs avec des paramètres différents plutôt que ces méthodes statiques?
La variable debug gagnerait à être privé et en get/set. Comme les protected.
Et çà, c'est faux car la méthode n'existe pas : Log::decode($imageSize)

Testé avec 5.6 et 7.3.

Some improvements would be welcome before competing because as it stands, although interesting, this class is not usable even with php 5.

Tag shorts are no longer possible to be portable.
split is obsolete and is perfectly replaced by explode even in version 5. And it's portable.
The code is full of instructions and warning ... E_ALL helps to eliminate them.
Why not write several constructors with different parameters rather than these static methods?
The debug variable would benefit from being private and in get / set. Like the protected.
And this is false because the method does not exist: Log :: decode ($ imageSize)

Tested with 5.6 and 7.3.



  2. Re: After tests   Reply   Report abuse  
Picture of Chouchen Chouchen - 2020-02-03 16:57:47 - In reply to message 1 from keran
Hi and thanks for all the feedbacks.

I didn't upload this class to phpclasses, it had been selected but, anyway, I wanted to get to it again.

So, for the moment, I cleaned it a little and made the tests work.

I took all your (good) advice, and I thank you for that!

I was thinking about totally get ride of the Log and debug stuff. It's useless for the library and I can use XDebug or other tools in development. What do you think ?

Regards