Re: [PEPr] Comment on Configuration::Config_Lite

From: Date: Wed, 05 Jan 2011 19:33:26 +0000
Subject: Re: [PEPr] Comment on Configuration::Config_Lite
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53941@lists.php.net to get a copy of this message
Hej, On Wed, Jan 5, 2011 at 9:28 AM, Christian Weiske <cweiske@php.net> wrote: > - I'd get rid of hasSection() and make the $key in has() optional, same for > remove/removeSection hasSection() is clean code and describes itself. It also results in less complex and smaller functions, makes documentation of ugly code unnecessary, allthough for those who analyze codemetrics. > - you may not register your own autoloader. Why? I have this Code from the PEAR `PHP_CodeSniffer' package by Greg Sherwood and Marc McIntyre. There should be no collision with other autoloaders, registered with spl_autoload_register. > all pear packages do. throwing an exception when a file is included is also > not a good idea. The Exception was thrown if _not_ included, also from the `PHP_CodeSniffer' package, but i removed it. I don't like to throw an Exception, when they hide a clearer Error Message and catching isn't possible. > - rename AllTests.php -> Config_ListeTest.php. > throwing an exception when a file is included is also > not a good idea. ok, i (re)moved that. > - docblocks should be more verbose, i.e. get(): "get" as description > - Exceptions in Exception subfolder: Config_Lite_Exception_Runtime > - rename AllTests.php -> Config_ListeTest.php. AllTests in PEAR is to > PHP Notice: Please no longer include "PHPUnit/Framework.php". > -> you need to use dirname(__FILE__) to get the correct > - tests/test.cfg is changed during the unit tests, > Temporary config files should be stored in sys_get_temp_dir() fixed in master branch, the Test keeps test.cfg untouched, now :) > - run phpcs on the code ╭─[~/gitrepos/config_lite/config_lite/Config]─[pce@agamemnon] ╰─[:(] % phpcs -n --standard=PEAR Lite.php ╭─[~/gitrepos/config_lite/config_lite/Config]─[pce@agamemnon] ╰─[:)] % -- best Regards, Patrick http://pear.php.net/pepr/pepr-proposal-show.php?id=645

« previous php.pear.dev (#53941) next »