The Artima Developer Community
Sponsored Link

PHP Buzz Forum
Copy & Paste Detection in PHPUnit 3.2

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sebastian Bergmann

Posts: 313
Nickname: sbergmann
Registered: Sep, 2004

Sebastian Bergmann is the developer of PHPUnit.
Copy & Paste Detection in PHPUnit 3.2 Posted: Aug 22, 2007 2:05 AM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Sebastian Bergmann.
Original Post: Copy & Paste Detection in PHPUnit 3.2
Feed Title: Sebastian Bergmann on PHP
Feed URL: http://sebastian-bergmann.de/rss.php?category=6&version=2.0
Feed Description: Sebastian Bergmann is a long-time contributor to various PHP projects, including PHP itself. He is currently working for eZ Systems AS on the Workflow Engine component for the eZ Platform. As the developer of PHPUnit, he also helps with testing the eZ Components. In his free time he likes to hack on Open Source software and to take photographs, preferably while travelling the world.
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Sebastian Bergmann
Latest Posts From Sebastian Bergmann on PHP

Advertisement
Version 3.2 of PHPUnit is shaping up nicely. In this blog posting I want to highlight another aspect of PHPUnit's new Project Mess Detector feature set. Duplicate code can be hard to find, especially in a large project. Johann-Peter Hartmann of MAYFLOWER GmbH recently implemented Copy & Paste Detection for PHPUnit's growing set of features that extends its usage scenarios beyond "just unit testing" to a one-stop solution for quality assurance in PHP-based projects. Here is an example of how PHPUnit 3.2 will report code duplication: __toString(), $this->drawnGradients, true ) ) { $gradient = $this->dom->createElement( 'linearGradient' ); $gradient->setAttribute( 'id', 'Definition_' . $color->__toString() ); $this->defs->appendChild( $gradient ); // Start of linear gradient $stop = $this->dom->createElement( 'stop' ); $stop->setAttribute( 'offset', 0 ); $stop->setAttribute( 'style', sprintf( 'stop-color: #%02x%02x%02x; stop-opacity: %.2F;', $color->startColor->red, $color->startColor->green, ]]>

Read: Copy & Paste Detection in PHPUnit 3.2

Topic: PHP Community T-Shirts Previous Topic   Next Topic Topic: Microsoft Moves Too Slowly

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use