patternlab-php-core icon indicating copy to clipboard operation
patternlab-php-core copied to clipboard

Clarify Coding Standards (DIRECTORY_SEPARATOR)

Open sghoweri opened this issue 8 years ago • 0 comments

@EvanLovely specifically, which of these is "correct" here? Do we actually need / use / require DIRECTORY_SEPARATOR still? Is there a better way to handle this sort of thing?

// PatternInfoRule.php
$filePath = Config::getOption("patternSourceDir")."/".$pathName;`
// PsuedoPatternRule.php
$filePath = Config::getOption("patternSourceDir").DIRECTORY_SEPARATOR.$pathName;`
// DocumentationRule.php
$patternSourceDir = Config::getOption("patternSourceDir");
$filePath = $patternSourceDir.DIRECTORY_SEPARATOR.$pathName;

sghoweri avatar Oct 28 '17 16:10 sghoweri