AvailablePhoneNumbers.php
Current file: /Users/kevin/code/twilio-php/Services/Twilio/Rest/AvailablePhoneNumbers.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
0.00% 0 / 1
75.00% 3 / 4 CRAP
56.25% 9 / 16
Services_Twilio_Rest_AvailablePhoneNumbers
0.00% 0 / 1
75.00% 3 / 4 5.34
56.25% 9 / 16
 getLocal($country)
100.00% 1 / 1 1
100.00% 7 / 7
 getTollFree($country)
0.00% 0 / 1 2
0.00% 0 / 7
 getList($country, $type, array $params = array()
100.00% 1 / 1 1
100.00% 1 / 1
 getSchema()
100.00% 1 / 1 1
100.00% 1 / 1


       1                 : <?php                                                                         
       2                 :                                                                               
       3                 : class Services_Twilio_Rest_AvailablePhoneNumbers                              
       4                 :     extends Services_Twilio_ListResource                                      
       5                 : {                                                                             
       6                 :     public function getLocal($country)                                        
       7                 :     {                                                                         
       8               1 :         $curried = new Services_Twilio_PartialApplicationHelper();            
       9               1 :         $curried->set(                                                        
      10               1 :             'getList',                                                        
      11               1 :             array($this, 'getList'),                                          
      12               1 :             array($country, 'Local')                                          
      13               1 :         );                                                                    
      14               1 :         return $curried;                                                      
      15                 :     }                                                                         
      16                 :     public function getTollFree($country)                                     
      17                 :     {                                                                         
      18               0 :         $curried = new Services_Twilio_PartialApplicationHelper();            
      19               0 :         $curried->set(                                                        
      20               0 :             'getList',                                                        
      21               0 :             array($this, 'getList'),                                          
      22               0 :             array($country, 'TollFree')                                       
      23               0 :         );                                                                    
      24               0 :         return $curried;                                                      
      25                 :     }                                                                         
      26                 :     /**                                                                       
      27                 :      * Get a list of available phone numbers.                                 
      28                 :      *                                                                        
      29                 :      * @param string country The 2-digit country code you'd like to search for
      30                 :      *    numbers e.g. ('US', 'CA', 'GB')                                     
      31                 :      * @param string type The type of number ('Local' or 'TollFree')          
      32                 :      * @return object The object representation of the resource               
      33                 :      */                                                                       
      34                 :                                                                               
      35                 :     public function getList($country, $type, array $params = array())         
      36                 :     {                                                                         
      37               1 :         return $this->retrieveData("$country/$type", $params);                
      38                 :     }                                                                         
      39                 :                                                                               
      40                 :     public function getSchema()                                               
      41                 :     {                                                                         
      42                 :         // You can't page through the list of available phone numbers.        
      43               2 :         return array('list' => 'countries') + parent::getSchema();            
      44                 :     }                                                                         
      45                 : }                                                                             

Generated by PHP_CodeCoverage 1.1.2 using PHP 5.3.13 and PHPUnit 3.6.11 at Mon Jun 4 22:46:14 PDT 2012.