1
0
mirror of https://github.com/php/phd.git synced 2026-03-24 15:12:18 +01:00

10 Commits

Author SHA1 Message Date
Louis-Arnaud
7366bc9f2a refactor: replace trigger_error(E_USER_ERROR) with exceptions (PHP 8.4 compatibility) (#218)
Co-authored-by: lacatoire <louis-arnaud.catoire@external.drivalia.com>
2026-01-09 02:09:58 +00:00
haszi
e6e6847d7b Refactor Options Parser and default Options Handler (#110)
* Refactor Options Parser and default Options Handler

Refactor default Options Handler to accept dependencies through its constructor.
Refactor default Options Handler to return an array of options instead of directly setting options in Config and declare array return types.
Refactor method in Options Parser to return an array of options and declare its return type as array.
Inject all necessary dependencies in render.php.
Refactor two methods in default Options Handler by using match expressions.

* Minor refactor of files used in tests

Inlcude Config with require_once instead of require in Autloader.
Define __INSTALLDIR__ only if it is not defined yet in render.php.
Include Autoloader and functions.php with require_once instead of require.
Remove unnecessary __PHPDIR__ constant, correct path for __INSTALLDIR__ and use that constant in setup.php.

* Remove var_dump from Options Parser

* Fix inconsistent option flags in default Option Handler

* Add default Options Handler tests

---------

Co-authored-by: haszi <haszika80@gmail.com>
2024-03-17 18:29:43 +00:00
haszi
efea0458c0 Refactor Options Handler, Interface and Parser (#107)
Co-authored-by: haszi <haszika80@gmail.com>
2024-03-07 14:29:57 +00:00
haszi
bdbd0e68ad Declare dynamic properties and removenonexistent variable (#93)
Declare all previously dynamic properties as far up the class hierarchy as needed and remove all declarations further down the inheritance tree.
Remove one nonexistent variable.

Co-authored-by: haszi <haszika80@gmail.com>
2024-02-09 21:41:14 +00:00
haszi
e5b8bf35a9 Remove file ending comment blocks (#92)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-08 12:46:21 +00:00
Peter Kokot
3564283891 Sync final newlines
This patch adds some missing newlines and trims multiple redundant
newlines into a single newline.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-02 06:23:33 +02:00
Sobak
aecae4e2c3 Eliminate $ comments 2015-03-09 06:20:39 +01:00
Richard Quadling
fbabb053b5 Ignore values to parameters. 2013-01-15 09:13:38 +00:00
Moacir de Oliveira
dc61fff7da Fix Bug #54217 Warn about nonexisting parameters
Signed-off-by: Moacir de Oliveira <moacir@php.net>
2012-04-06 12:43:26 -04:00
Moacir de Oliveira Miranda Júnior
e832bd9782 adding support for package options 2010-09-09 02:37:28 +00:00