Arbit - project tracking

PHP Depend

#118: Calculation of the Number Of Overwritten Methods is wrong

Issue revisions

  • new by Manuel Pichler at 2010-F-24 6:02
  • new by Manuel Pichler at 2010-F-24 6:04
  • assigned by Manuel Pichler at 2010-F-24 6:04
  • assigned by Manuel Pichler at 2010-F-24 6:05
  • closed by Manuel Pichler at 2010-F-28 12:55
Type bug bug
State closed closed
Priority medium medium
Resolution fixed fixed
Assigned to Manuel Pichler
Scheduled for 0.9.11
Affected versions 0.9.10
Affected components Metrics
Last change Sunday 28 February 2010 12:55:20 UTC by Manuel Pichler

Short description

The calculation of the Number Of Overwritten Methods is wrong. The current implementation also counts methods that implement an abstract method as overwritten.

Environment

  • PHP 5.3.1

  • PHP_Depend release 0.9.10

Steps to reproduce

<?php
abstract class Foo {
    abstract function baz();
}

class Bar extends Foo {
    function baz() {}
}

~ $ pdepend --summary-xml=/tmp/sum.xml /tmp/noom.php

...

Expected behavior

<?xml version="1.0" encoding="UTF-8"?>
<metrics generated="2010-02-24T06:57:55" ...>
    <!-- ... -->
    <package name="+global" ...>
        <class name="Bar" noom="0" ...>
            <file name="/tmp/noom.php"/>
            <method name="baz" />
        </class>
    </package>
</metrics>



Actual behavior

<?xml version="1.0" encoding="UTF-8"?>
<metrics generated="2010-02-24T06:57:55" ...>
    <!-- ... -->
    <package name="+global" ...>
        <class name="Bar" noom="1" ...>
            <file name="/tmp/noom.php"/>
            <method name="baz" />
        </class>
    </package>
</metrics>

  • Manuel Pichler at Wednesday 24 February 2010 06:04:35 UTC

    Scheduled for release 0.9.11

  • Manuel Pichler at Wednesday 24 February 2010 06:05:56 UTC

    Priority adjusted and some minor text formattings.

  • Manuel Pichler at Sunday 28 February 2010 12:55:20 UTC

    Fixed in svn revision #1112