Bug Report #4359
FILE_SECURITY should use "OR" instead of "or"
|Assignee:||Woody Gilk||% Done:||
FILE_SECURITY const (class Kohana_Core) should follow Kohana's conventions and coding style.
const FILE_SECURITY = '<?php defined(\'SYSPATH\') OR die(\'No direct script access.\');';
const FILE_SECURITY = '<?php defined(\'SYSPATH\') or die(\'No direct script access.\');';
Updated by Kemal Delalic about 2 years ago
This is correct, although lowercase looks way nicer - current convention makes you feel like screaming.
Maybe a bug should be filed instead, to change this convention to lowercase? :)
Updated by Willian Veiga about 2 years ago
Kemal Delalić, I understand your point of view.
I like uppercase style. What about NULL, TRUE, FALSE, AND ... ?
Updated by Dmitry T. about 2 years ago
NULL, TRUE and FALSE are sort of constants. But AND and OR are pure operators therefore I agree with Kimal and think they should be lowercase
Updated by Kemal Delalic almost 2 years ago
As Dmitry pointed out, those are constants and they should be written all-caps anyways.
We don't write `foreach`, `echo` and other language constructs uppercase, so why would we be screaming AND or OR? This is pretty much the only annoying thing about Kohanas' conventions :)
Updated by Willian Veiga almost 2 years ago
Ok, Now I agree with you. We should update Kohana's conventions.
Updated by Woody Gilk almost 2 years ago
- Status changed from New to Assigned
- Assignee set to Woody Gilk
- Target version set to v3.2.1