Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

PHP Fatal error: Cannot redeclare class CodeIgniter_Sniffs_Strings_VariableUsageSniff #12

Closed
titosemi opened this issue Nov 21, 2011 · 2 comments

Comments

@titosemi
Copy link

Hi,

first of all, i want to thank you for this. I think it's a really good idea to have this rules so we all can follow the Codeigniter's coding styles.

I'm getting this error:
PHP Fatal error: Cannot redeclare class CodeIgniter_Sniffs_Strings_VariableUsageSniff in CodeSniffer/Standards/codeigniter/Sniffs/Strings/VariableUsageSniff.php on line 30 when using the rules within Netbeans

Any idea what could be the problem?

@jimCresswell
Copy link

Hi,

Have you tried changing the name of your class to match the case of your directory structure? I.e. changing the class name to codeigniter_Sniffs_Strings_VariableUsageSniff with a lower case c and i in codeigniter.

Cheers,

Jim

@dmp1ce
Copy link

dmp1ce commented Oct 8, 2012

I had a similar problem when setting up the Symfony2 code standards. For me the problem was that I symlinked a folder into the /usr/share/php/PHP/CodeSniffer/Standards directory wrong. The original directory was called something like "Symfony2-Code-Standards" but the symlink was called "Symfony2". Renaming the "Symfony2-Code-Standards" directory to "Symfony2" fixed my problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants