pattern-lab / patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
http://patternlab.io/
MIT License
43 stars 62 forks source link

Clarify Coding Standards (DIRECTORY_SEPARATOR) #147

Open sghoweri opened 7 years ago

sghoweri commented 7 years ago

@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;