Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Moving towards PSR-4 compliance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexia committed Jun 3, 2015
1 parent 9f616f6 commit ca5bf99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct($testTypes = []) {
* @return string Test Class Name
*/
public function getTestClassName($testType) {
return "mar\\tests\\".$testType;
return __NAMESPACE__."\\tests\\".$testType;
}

/**
Expand Down
6 changes: 2 additions & 4 deletions mar.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ private function run() {
* @return void
*/
static public function autoloader($className) {
$className = str_replace('mar\\', '', $className);
$className = str_replace('alexia\\mar\\', '', $className);
$file = PHP7MAR_DIR.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php';
if (is_file($file)) {
require_once($file);
} else {
throw new \Exception(__CLASS__.": Class file for {$className} not found at {$file}.");
}
}

Expand All @@ -184,5 +182,5 @@ static public function getRealPath($path) {
return false;
}
}
$mar = new \mar\main();
$mar = new main();
?>

0 comments on commit ca5bf99

Please sign in to comment.