Skip to content

Feat: Disallow snake naming convention in favor of camel case  #7

@satrun77

Description

@satrun77

Disallow

function some_cool_thing() {}

$cool_value = '';

class big_cool_thig {}

protected $cool_var = '';

Allow

private static $cool_var = ''; <-- only silverstripe static config property
public static function get_extensions($class = null, $includeArgumentString = false) <-- methods from the core depenencies


function someCoolThing() {}

$coolValue = '';

class BigCoolThig {} <-- must uppercase first letter

protected $coolVar = '';

The sniff exists however we need custom one that uses the core sniff and bypass silverstripe core method and extend the sniff to cover properties.

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions