[PEPr] Comment on Web Services::Services_Upcoming

From: Date: Sat, 09 Jul 2005 06:50:17 +0000
Subject: [PEPr] Comment on Web Services::Services_Upcoming
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38508@lists.php.net to get a copy of this message
Alan Knowles (http://pear.php.net/user/alan_k) has commented on the proposal for Web Services::Services_Upcoming. Comment: Still quite a few CS issues in the 1.1.3 a) it should not be a 1.* release - this indicates stable.. b) method names are using under_scores - see CS docs. c) line breaks after ) on function line, before { d) check the manual for if / else layout/line breaks etc. e) why are you triggering an error - you should only be returning it.. (unless you want to include a simple a debuger.) f) dont mix tabs and spaces. g) SERVICES_UPCOMING_TEST is used but not defined, which will cause a compiler warning.. - you could use if (defined(..)) Non CS - if you return from a first IF, then there is no point in an else... * always reduce indentation by returning early from function if possible ( re: _apiCall() if ($data = $this->cache->get($url)) { } else { ... far better as ... $data = $this->cache->get($url) if (!$data) { return; } ... one less indentation.. - see func_get_args (for venue add.. and others.) - actually accepting an assoc. array would be far more sensible that having 8+ arguments. - Listing possible PEAR error returns is not really that usefull, what would be helpful to document the correct expected return values.. which is missing.! Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=244 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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