le bac à sable de

frian

lang : en

thème :

navigation

phpclasscheck / pagesize bssa / bssa skels

phpclasscheck

Un script perl qui vérifie si les paramètres des méthodes et les propriétés des classes PHP ont été définis.

à propos

version : 0.1

publié : 6 mars 2014

langage : Perl

Licence : GPL

téléchargement : tgz / zip

description

ce qu'il fait

exemple

liste les méthodes et les propriétés des fichiers .php dans le dossier dummy

phpclasscheck.pl tests/dummy/

class ClassParameterNotDeclared (methods)
  protected function doThis($iterations)                      
  protected function doThat($duration)                        
class ClassParameterNotDeclared (properties)
  this                        
  that                        
class ClassPropertyNotDeclared (methods)
  public    function doThis($param)                           
  public    function doThat($param)                           
  public    function doThisAndThat($param)                    
class ClassPropertyNotDeclared (properties)
  this                        
  that                        
  thisandthat 
    

exemple

liste les méthodes uniquement

phpclasscheck.pl -m tests/dummy/

class ClassParameterNotDeclared (methods)
  protected function doThis($iterations)                      
  protected function doThat($duration)                        
class ClassPropertyNotDeclared (methods)
  public    function doThis($param)                           
  public    function doThat($param)                           
  public    function doThisAndThat($param)
    

exemple

vérifir les propriétés uniquement

phpclasscheck.pl -cp ClassParamterNotDeclared.php

class ClassParameterNotDeclared (properties) \o/
    

exemple

vérifie les propriétés en mode bavard

phpclasscheck.pl -cpv ClassParamterNotDeclared.php

found property this   declared as protected $this   on line 6
found property that   declared as protected $that   on line 7
    

exemple

vérifie en mode bavard

phpclasscheck.pl -cv tests/dummy/

class ClassParameterNotDeclared (methods)
  parameter $iterations  declared as iterations              line 9
  parameter $duration    NOT DECLARED, used on line 15
  found 1 error
class ClassParameterNotDeclared (properties)
  property this          declared as protected $this         line 6
  property that          declared as protected $that         line 7
class ClassPropertyNotDeclared (methods)
  parameter $param       declared as param                   line 6
class ClassPropertyNotDeclared (properties)
  property this          NOT DECLARED, used on line 12
  property that          declared as protected $that         line 8
  property thisandthat   declared as protected $thisandthat  line 9
  found 1 error
    

about

version : 0.1

released : 3 mars 2014

language : Perl

License : GPL