Source for file Counts.php

Documentation is available at Counts.php

  1. <?php
  2.  
  3. # Copyright (c) 2002-2005 Cunningham & Cunningham, Inc.
  4. # Released under the terms of the GNU General Public License version 2 or later.
  5. #
  6. # PHP5 translation by Luis A. Floreani <luis.floreani@gmail.com>
  7.  
  8. class PHPFIT_Counts {
  9. public $right = 0;
  10. public $wrong = 0;
  11. public $ignores = 0;
  12. public $exceptions = 0;
  13. /**
  14. * @return string
  15. */
  16. public function toString() {
  17. return $this->right . " right, " . $this->wrong . " wrong, "
  18. . $this->ignores . " ignored, " . $this->exceptions . " exceptions";
  19. }
  20. /**
  21. * @param Count source
  22. */
  23. public function tally($source) {
  24. $this->right .= $source->right;
  25. $this->wrong .= $source->wrong;
  26. $this->ignores .= $source->ignores;
  27. $this->exceptions .= $source->exceptions;
  28. }
  29. }
  30. ?>

Documentation generated on Sun, 02 Apr 2006 23:21:37 +0000 by phpDocumentor 1.3.0RC5