svn: /web/php-rmtools/trunk/client/include/ MakeLogParser.php

From: Date: Mon, 29 Aug 2011 09:53:25 +0000
Subject: svn: /web/php-rmtools/trunk/client/include/ MakeLogParser.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-12069@lists.php.net to get a copy of this message
pajoye Mon, 29 Aug 2011 09:53:25 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315682 Log: - method to get the diff between two build/analyzer logs Changed paths: U web/php-rmtools/trunk/client/include/MakeLogParser.php Modified: web/php-rmtools/trunk/client/include/MakeLogParser.php =================================================================== --- web/php-rmtools/trunk/client/include/MakeLogParser.php 2011-08-29 09:52:50 UTC (rev 315681) +++ web/php-rmtools/trunk/client/include/MakeLogParser.php 2011-08-29 09:53:25 UTC (rev 315682) @@ -5,6 +5,7 @@ class MakeLogParser { public $log; public $stats; + public $diff = NULL; function toHtml($title) { @@ -31,4 +32,25 @@ return NULL; } } + + function diff($prev) { + $result = array(); + + foreach ($cur as $k => $v) { + if (array_key_exists($k, $prev)) { + if (is_array($v)) { + $tmp_ar = log_diff($v, $prev[$k]); + if (count($tmp_ar)) { $result[$k] = $tmp_ar; } + } else { + if ($v != $prev[$k]) { + $result[$k] = $v; + } + } + } else { + $result[$k] = $v; + } + } + + return $result; + } }

« previous php.webmaster (#12069) next »