Bug Report #4359

FILE_SECURITY should use "OR" instead of "or"

Added by Willian Veiga almost 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:12/09/2011
Priority:LowDue date:
Assignee:Woody Gilk% Done:

100%

Category:Core
Target version:v3.2.1
Resolution:fixed Points:1

Description

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.\');';

instead of:

const FILE_SECURITY = '<?php defined(\'SYSPATH\') or die(\'No direct script access.\');';

Thank you.

Associated revisions

Revision 57c45661
Added by Woody Gilk almost 3 years ago

Fixed missed CS "OR" value in Kohana::FILE_SECURITY, fixes #4359

History

#1 Updated by Kemal Delalic almost 3 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? :)

#2 Updated by Willian Veiga almost 3 years ago

Kemal Delalić, I understand your point of view.

I like uppercase style. What about NULL, TRUE, FALSE, AND ... ?

Thank you.

#3 Updated by Dmitry T. almost 3 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

#4 Updated by Kemal Delalic almost 3 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 :)

#5 Updated by Willian Veiga almost 3 years ago

Ok, Now I agree with you. We should update Kohana's conventions.
Thank you.

#6 Updated by Woody Gilk almost 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Woody Gilk
  • Target version set to v3.2.1

#7 Updated by Woody Gilk almost 3 years ago

  • Resolution set to fixed

#8 Updated by Woody Gilk almost 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:57c4566153e7e3cc57887479e59ec9d29ee1cbce.

Also available in: Atom PDF