Skip to content

Commit ca5bf99

Browse files
committed
Moving towards PSR-4 compliance.
1 parent 9f616f6 commit ca5bf99

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

classes/tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct($testTypes = []) {
7474
* @return string Test Class Name
7575
*/
7676
public function getTestClassName($testType) {
77-
return "mar\\tests\\".$testType;
77+
return __NAMESPACE__."\\tests\\".$testType;
7878
}
7979

8080
/**

mar.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,10 @@ private function run() {
156156
* @return void
157157
*/
158158
static public function autoloader($className) {
159-
$className = str_replace('mar\\', '', $className);
159+
$className = str_replace('alexia\\mar\\', '', $className);
160160
$file = PHP7MAR_DIR.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php';
161161
if (is_file($file)) {
162162
require_once($file);
163-
} else {
164-
throw new \Exception(__CLASS__.": Class file for {$className} not found at {$file}.");
165163
}
166164
}
167165

@@ -184,5 +182,5 @@ static public function getRealPath($path) {
184182
return false;
185183
}
186184
}
187-
$mar = new \mar\main();
185+
$mar = new main();
188186
?>

0 commit comments

Comments
 (0)