0

Does anyone know if there's a good instruction guide for implementing the new php standards for CI2 or CI3? Running a simple VPS with Ubuntu 14.04 LTS server - CI3 for the secure section CI2 for the general website and registration processes. After building on Yii and Laravel the past two months it came to my attention that certain parts in CI classes dont use the same notation. example: // importing a constant (PHP 5.6+) use const My\Full\CONSTANT;

If there is a bright minded developer out there who can give me a head start in finding more about this I would be grateful.

Kind regards

3
  • 1
    Their documentation specifies the coding standards. Commented Jan 16, 2015 at 10:36
  • 1
    you can find guide here and more here Commented Jan 16, 2015 at 10:59
  • 1
    Why did you switch from Laravel to CI? Just recently I jumped from Kohana (codeigniter derivative that i really loved compared to codeigniter) to Laravel and I actually loved that. Commented Jan 16, 2015 at 12:13

2 Answers 2

1

I would suggest the use of an automated standards check, using a tool like CodeSniffer.

Codesniffer is flexible enough to create sniffs for your own standard. I have not used CI for a long while, but there are older versions of sniffs for codeigniter. You could seek out later versions.

https://github.com/thomas-ernest/CodeIgniter-for-PHP_CodeSniffer

Sign up to request clarification or add additional context in comments.

1 Comment

Nice input - this got me going!
0

Thanks for all the answers. I work different projects and this specific job was requested to be completed in codeigniter. Therefore the switch and the discovery that the 5.6 calls, classes and references are not being used. I will look into the documents deeper.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.