Commit: c3b4f0af3ebe97254cf8ddab6205397966fb3e02

Author: David Persson | Date: 2010-01-07 23:57:08 +0100
Updating rules to also take string casts into account.
diff --git a/extensions/phpca/Rule/NoWhitespaceWithinCastsRule.php b/extensions/phpca/Rule/NoWhitespaceWithinCastsRule.php index e677555..e252671 100644 --- a/extensions/phpca/Rule/NoWhitespaceWithinCastsRule.php +++ b/extensions/phpca/Rule/NoWhitespaceWithinCastsRule.php @@ -15,7 +15,7 @@ class NoWhitespaceWithinCastsRule extends Rule protected function doCheck() { $casts = array( - T_BOOL_CAST, T_INT_CAST, T_ARRAY_CAST, + T_BOOL_CAST, T_INT_CAST, T_ARRAY_CAST, T_STRING_CAST, T_DOUBLE_CAST, T_OBJECT_CAST, T_UNSET_CAST ); foreach ($casts as $id) { diff --git a/extensions/phpca/Rule/OneSpaceAfterCastsRule.php b/extensions/phpca/Rule/OneSpaceAfterCastsRule.php index 1b24d6f..91d4ba8 100644 --- a/extensions/phpca/Rule/OneSpaceAfterCastsRule.php +++ b/extensions/phpca/Rule/OneSpaceAfterCastsRule.php @@ -15,7 +15,7 @@ class OneSpaceAfterCastsRule extends Rule protected function doCheck() { $casts = array( - T_BOOL_CAST, T_INT_CAST, T_ARRAY_CAST, + T_BOOL_CAST, T_INT_CAST, T_ARRAY_CAST, T_STRING_CAST, T_DOUBLE_CAST, T_OBJECT_CAST, T_UNSET_CAST ); foreach ($casts as $id) {