All Unit tests
Current file: C:\code\midiparser\src\Midi\Event\NoteOnEvent.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 2 / 2
100.00%100.00%
100.00% 3 / 3
 
Midi\NoteOnEvent
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 2 / 2
100.00%100.00%
100.00% 3 / 3
 public function getParamDescription()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1
 public function getType()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1


       1                 : <?php                                                                                              
       2                 :                                                                                                    
       3                 :     /**                                                                                            
       4                 :      * \Midi\Event\NoteOnEvent                                                                     
       5                 :      *                                                                                             
       6                 :      * @package    Midi                                                                            
       7                 :      * @subpackage Event                                                                           
       8                 :      * @copyright  © 2009 Tommy Montgomery <http://phpmidiparser.com/>                             
       9                 :      * @since      1.0                                                                             
      10                 :      */                                                                                            
      11                 :                                                                                                    
      12                 :     namespace Midi\Event;                                                                          
      13                 :                                                                                                    
      14                 :     /**                                                                                            
      15                 :      * Represents a note on channel event                                                          
      16                 :      *                                                                                             
      17                 :      * Turns a note for a channel on. To achieve polyphony, use                                    
      18                 :      * a delta time of zero with consecutive note on events.                                       
      19                 :      *                                                                                             
      20                 :      * This event can be used in lieu of a note off event by repeating                             
      21                 :      * the same note on the same channel with a velocity of zero.                                  
      22                 :      *                                                                                             
      23                 :      * @package    Midi                                                                            
      24                 :      * @subpackage Event                                                                           
      25                 :      * @since      1.0                                                                             
      26                 :      */                                                                                            
      27               1 :     class NoteOnEvent extends ChannelEvent {                                                       
      28                 :                                                                                                    
      29                 :         /**                                                                                        
      30                 :          * @since 1.0                                                                              
      31                 :          * @uses  Note::getNoteName()                                                              
      32                 :          *                                                                                         
      33                 :          * @return string                                                                          
      34                 :          */                                                                                        
      35                 :         public function getParamDescription() {                                                    
      36               1 :             return \Midi\Util\Note::getNoteName($this->param1) . ' with velocity ' . $this->param2;
      37                 :         }                                                                                          
      38                 :                                                                                                    
      39                 :         /**                                                                                        
      40                 :          * @since 1.0                                                                              
      41                 :          * @uses  EventType::NOTE_ON                                                               
      42                 :          *                                                                                         
      43                 :          * @return int                                                                             
      44                 :          */                                                                                        
      45                 :         public function getType() {                                                                
      46               1 :             return EventType::NOTE_ON;                                                             
      47                 :         }                                                                                          
      48                 :                                                                                                    
      49                 :     }                                                                                              
      50                 :                                                                                                    

Generated by PHPUnit 3.4.1 and Xdebug 2.0.5 using PHP 5.3.0 at Sun Oct 25 23:35:09 PDT 2009.