Skip to content

Commit

Permalink
Replaced \ with directory separator const
Browse files Browse the repository at this point in the history
  • Loading branch information
runz0rd committed Sep 13, 2016
1 parent 0d53aaf commit 1dbcae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Validator/ModelValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function validate($object, string $validationRequiredType = '') {
throw new \InvalidArgumentException('Invalid object supplied for validation.');
}

$this->loadRules(__DIR__ . '\Rules');
$this->loadRules(__DIR__ . DIRECTORY_SEPARATOR . 'Rules');

$modelClass = new ModelClass($object);
foreach($modelClass->getProperties() as $property) {
Expand All @@ -44,7 +44,7 @@ public function validate($object, string $validationRequiredType = '') {
* @param string $location
*/
public function loadRules(string $location) {
$files = glob($location . '\*.php');
$files = glob($location . DIRECTORY_SEPARATOR . '*.php');
foreach($files as $file) {
@require_once $file;
$filename = basename($file, ".php");
Expand Down

0 comments on commit 1dbcae9

Please sign in to comment.