+ // Check parameter count and references
+ $badParameterCount = $badParameterReference = array();
+ foreach ( $potentialHooks as $hook => $args ) {
+ if ( !isset( $documentedHooks[$hook] ) ) {
+ // Not documented, but that will also be in $todo
+ continue;
+ }
+ $argsDoc = $documentedHooks[$hook];
+ if ( $args === 'unknown' || $argsDoc === 'unknown' ) {
+ // Could not get parameter information
+ continue;
+ }
+ if ( count( $argsDoc ) !== count( $args ) ) {
+ $badParameterCount[] = $hook . ': Doc: ' . count( $argsDoc ) . ' vs. Code: ' . count( $args );
+ } else {
+ // Check if & is equal
+ foreach ( $argsDoc as $index => $argDoc ) {
+ $arg = $args[$index];
+ if ( ( $arg[0] === '&' ) !== ( $argDoc[0] === '&' ) ) {
+ $badParameterReference[] = $hook . ': References different: Doc: ' . $argDoc .
+ ' vs. Code: ' . $arg;
+ }
+ }
+ }
+ }
+