From: Roland Haeder Date: Tue, 12 May 2015 00:03:20 +0000 (+0200) Subject: Fixed parser errors + improved find-bad-php.sh with a lint check. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=237f389799e9faa97e735fd18096bd3451c057dd;p=hub.git Fixed parser errors + improved find-bad-php.sh with a lint check. Signed-off-by: Roland Haeder --- diff --git a/application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php b/application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php index 250bb8f9f..197a507da 100644 --- a/application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php +++ b/application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php @@ -31,7 +31,7 @@ class NoRequestNodeListAttemptedException extends FrameworkException { */ public function __construct (array $messageData, $code) { // Construct the message - $message = sprintf('[%s:%d] This node (%s) didn't except a node-list request: %s', + $message = sprintf('[%s:%d] This node (%s) did not except a node-list request: %s', $messageData[0]->__toString(), $this->getLine(), $messageData[1]->__toString(), diff --git a/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php b/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php index a0f58ff2e..11d6aa989 100644 --- a/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php +++ b/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php @@ -37,8 +37,8 @@ class PackageAnnouncementTagFilter extends BaseNodeFilter implements FilterableP XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_MODE => '', - XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '' - XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => '' + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '', + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => '', ); } diff --git a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php index 4edd9057f..6431bf626 100644 --- a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php +++ b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php @@ -48,8 +48,8 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl $this->messageToConfig = array( XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS => 'your_external_address', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => 'your_internal_address', - XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => 'your_session_id' - XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => 'your_private_key_hash' + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => 'your_session_id', + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => 'your_private_key_hash', ); // Init config-copy array diff --git a/find-bad-php.sh b/find-bad-php.sh index 1d530b3af..2fdfecf45 100755 --- a/find-bad-php.sh +++ b/find-bad-php.sh @@ -18,6 +18,13 @@ do then echo "$0: Script '${SCRIPT}' has non-typical footer." fi + + LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "No syntax errors detected in"` + + if [ -n "${LINT}" ] + then + echo "$0: ${LINT}" + fi done echo "$0: All done."