Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Added: support for PHP_CodeSniffer 1.3.0 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
wimg committed Aug 16, 2010
1 parent 0187255 commit 2dfd90f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 22 deletions.
8 changes: 4 additions & 4 deletions PHP53CompatCodingStandard.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53 PHP_CodeSniffer Coding Standard.
* PHP53Compat PHP_CodeSniffer Coding Standard.
*
* PHP version 5.3
*
Expand All @@ -17,11 +17,11 @@
}

if (version_compare(PHP_VERSION, '5.3.0', '<')) {
throw new PHP_CodeSniffer_Exception('PHP 5.3 is required to use the PHP53 codesniffer standard');
throw new PHP_CodeSniffer_Exception('PHP 5.3 is required to use the PHP53Compat codesniffer standard');
}

/**
* PHP53 PHP_CodeSniffer Coding Standard.
* PHP53Compat PHP_CodeSniffer Coding Standard.
*
* @category PHP
* @package PHP53Compat
Expand All @@ -31,7 +31,7 @@
* @version 1.0
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
class PHP_CodeSniffer_Standards_PHP53_PHP53CodingStandard extends PHP_CodeSniffer_Standards_CodingStandard
class PHP_CodeSniffer_Standards_PHP53Compat_PHP53CompatCodingStandard extends PHP_CodeSniffer_Standards_CodingStandard
{


Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/DeprecatedFunctionsSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_DeprecatedFunctionsSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedFunctionsSniff.
*
* PHP version 5.3
*
Expand All @@ -11,15 +11,15 @@
*/

/**
* PHP53_Sniffs_PHP_DeprecatedFunctionsSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedFunctionsSniff.
*
* @category PHP
* @package PHP53Compat
* @author Wim Godden <wim.godden@cu.be>
* @version 1.0.0
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_DeprecatedFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff
class PHP53Compat_Sniffs_PHP_DeprecatedFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff
{

/**
Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/DeprecatedIniDirectivesSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_DeprecatedIniDirectivesSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedIniDirectivesSniff.
*
* PHP version 5.3
*
Expand All @@ -11,7 +11,7 @@
*/

/**
* PHP53_Sniffs_PHP_DeprecatedIniDirectivesSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedIniDirectivesSniff.
*
* Discourages the use of ini directives through ini_set or
* in php.ini (searches only for the current running one, so it should be run on a php.ini
Expand All @@ -22,7 +22,7 @@
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_DeprecatedIniDirectivesSniff implements PHP_CodeSniffer_Sniff
class PHP53Compat_Sniffs_PHP_DeprecatedIniDirectivesSniff implements PHP_CodeSniffer_Sniff
{
/**
* Variable keeps status of php.ini check
Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/DeprecatedNewReferenceSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_DeprecatedNewReferenceSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedNewReferenceSniff.
*
* PHP version 5.3
*
Expand All @@ -11,7 +11,7 @@
*/

/**
* PHP53_Sniffs_PHP_DeprecatedNewReferenceSniff.
* PHP53Compat_Sniffs_PHP_DeprecatedNewReferenceSniff.
*
* Discourages the use of assigning the return value of new by reference
*
Expand All @@ -22,7 +22,7 @@
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_DeprecatedNewReferenceSniff implements PHP_CodeSniffer_Sniff
class PHP53Compat_Sniffs_PHP_DeprecatedNewReferenceSniff implements PHP_CodeSniffer_Sniff
{

/**
Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/ForbiddenNamesSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_ForbiddenNamesSniff.
* PHP53Compat_Sniffs_PHP_ForbiddenNamesSniff.
*
* PHP version 5.3
*
Expand All @@ -11,7 +11,7 @@
*/

/**
* PHP53_Sniffs_PHP_ForbiddenNamesSniff.
* PHP53Compat_Sniffs_PHP_ForbiddenNamesSniff.
*
* Prohibits the use of reserved keywords as class, function, namespace or constant names
*
Expand All @@ -22,7 +22,7 @@
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_ForbiddenNamesSniff implements PHP_CodeSniffer_Sniff
class PHP53Compat_Sniffs_PHP_ForbiddenNamesSniff implements PHP_CodeSniffer_Sniff
{

/**
Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/NonStaticMagicMethodsSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_NonStaticMagicMethodsSniff.
* PHP53Compat_Sniffs_PHP_NonStaticMagicMethodsSniff.
*
* PHP version 5.3
*
Expand All @@ -11,7 +11,7 @@
*/

/**
* PHP53_Sniffs_PHP_NonStaticMagicMethodsSniff.
* PHP53Compat_Sniffs_PHP_NonStaticMagicMethodsSniff.
*
* Prohibits the use of static magic methods as well as protected or private magic methods
*
Expand All @@ -20,7 +20,7 @@
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_NonStaticMagicMethodsSniff implements PHP_CodeSniffer_Sniff
class PHP53Compat_Sniffs_PHP_NonStaticMagicMethodsSniff implements PHP_CodeSniffer_Sniff
{

/**
Expand Down
6 changes: 3 additions & 3 deletions Sniffs/PHP/RemovedExtensionsSniff.php
@@ -1,6 +1,6 @@
<?php
/**
* PHP53_Sniffs_PHP_RemovedExtensionsSniff.
* PHP53Compat_Sniffs_PHP_RemovedExtensionsSniff.
*
* PHP version 5.3
*
Expand All @@ -11,7 +11,7 @@
*/

/**
* PHP53_Sniffs_PHP_RemovedExtensionsSniff.
* PHP53Compat_Sniffs_PHP_RemovedExtensionsSniff.
*
* Discourages the use of removed extensions. Suggests alternative extensions if available
*
Expand All @@ -20,7 +20,7 @@
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2010 Cu.be Solutions bvba
*/
class PHP53_Sniffs_PHP_RemovedExtensionsSniff implements PHP_CodeSniffer_Sniff
class PHP53Compat_Sniffs_PHP_RemovedExtensionsSniff implements PHP_CodeSniffer_Sniff
{

/**
Expand Down
5 changes: 5 additions & 0 deletions ruleset.xml
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<ruleset name="PHP53Compat_CodeSniffer">
<description>The PHP53Compat_CodeSniffer rules check PHP 5.3 compatibility of your code.</description>

</ruleset>

0 comments on commit 2dfd90f

Please sign in to comment.