]> git.mxchange.org Git - hub.git/commitdiff
Fixed parser errors + improved find-bad-php.sh with a lint check.
authorRoland Haeder <roland@mxchange.org>
Tue, 12 May 2015 00:03:20 +0000 (02:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 12 May 2015 00:03:20 +0000 (02:03 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php
application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php
application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php
find-bad-php.sh

index 250bb8f9fb527d7245e73a17809556ef17fb2a34..197a507da2d750d8a597022b3035159291594d62 100644 (file)
@@ -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(),
index a0f58ff2ef3503d7013cf590dad302da7be09d50..11d6aa989e59182c5b40788ed9b37c5f19492597 100644 (file)
@@ -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 => '',
                );
        }
 
index 4edd9057fd25b8b153c9c7d075808f7940f870ab..6431bf626f3e5bf1042fe8305d3e75c4b0d94d60 100644 (file)
@@ -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
index 1d530b3afdb199af2c8c3022ed18cbcf1f723ae5..2fdfecf45b9391673b127911bf8eae0335154842 100755 (executable)
@@ -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."