cvs: doc-editor / error_type.php /php ToolsError.php

From: Date: Sun, 19 Apr 2009 14:23:31 +0000
Subject: cvs: doc-editor / error_type.php /php ToolsError.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3803@lists.php.net to get a copy of this message
yannick Sun Apr 19 14:23:31 2009 UTC Modified files: /doc-editor/php ToolsError.php /doc-editor error_type.php Log: - Add a new check : nbAbbrevTag http://cvs.php.net/viewvc.cgi/doc-editor/php/ToolsError.php?r1=1.4&r2=1.5&diff_format=u Index: doc-editor/php/ToolsError.php diff -u doc-editor/php/ToolsError.php:1.4 doc-editor/php/ToolsError.php:1.5 --- doc-editor/php/ToolsError.php:1.4 Sun Apr 19 14:15:56 2009 +++ doc-editor/php/ToolsError.php Sun Apr 19 14:23:31 2009 @@ -319,6 +319,7 @@ $this->classsynopsis(); $this->methodsynopsis(); $this->nbAcronymTag(); + $this->nbAbbrevTag(); $this->nbCautionTag(); $this->nbCdataTag(); $this->nbChapterTag(); @@ -1359,6 +1360,37 @@ } /** + * Check Nb <abbrev> tag + * Add an entry into the error's stack if an error is found + * + */ + function nbAbbrevTag() + { + + $reg = '/<abbrev>/s'; + + $en_abbrev = 0; + $match = array(); + if (preg_match_all($reg, $this->en_content, $match)) { + $en_abbrev = count($match[0]); + } + + $lang_abbrev = 0; + $match = array(); + if (preg_match_all($reg, $this->lang_content, $match)) { + $lang_abbrev = count($match[0]); + } + + if ($en_abbrev != $lang_abbrev ) { + $this->addError(array( + "value_en" => $en_abbrev, + "value_lang" => $lang_abbrev, + "type" => "nbAbbrevTag" + )); + } + } + + /** * Check Nb <acronym> tag * Add an entry into the error's stack if an error is found * http://cvs.php.net/viewvc.cgi/doc-editor/error_type.php?r1=1.7&r2=1.8&diff_format=u Index: doc-editor/error_type.php diff -u doc-editor/error_type.php:1.7 doc-editor/error_type.php:1.8 --- doc-editor/error_type.php:1.7 Sun Apr 19 14:15:56 2009 +++ doc-editor/error_type.php Sun Apr 19 14:23:31 2009 @@ -166,6 +166,9 @@ $error['nbLiteralTag']['head'] = 'Literal tag'; $error['nbLiteralTag']['desc'] = 'Throw if the number of <b>literal</b> tags is different from english version.'; +$error['nbAbbrevTag']['head'] = 'Abbrev tag'; +$error['nbAbbrevTag']['desc'] = 'Throw if the number of <b>abbrev</b> tags is different from english version.'; + $error['errorRoleMethodsynopsis']['head'] = 'Methodsynopsis tag'; $error['errorRoleMethodsynopsis']['desc'] = 'Throw if the value of the attribut <b>role</b> is different from english version.'; $error['errorOptionalMethodsynopsis']['head'] = 'Methodsynopsis tag';

« previous php.doc.cvs (#3803) next »