Skip to content

Commit 23abfea

Browse files
committed
Customize CXML
1 parent 55ba59a commit 23abfea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/CXml/Jms/ModelClassMapping.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CXml\Jms;
46

57
use CXml\Model\Exception\CXmlModelNotFoundException;
@@ -19,7 +21,7 @@ class ModelClassMapping
1921
public static function fromDefaultModelPath(): self
2022
{
2123
return new self(
22-
realpath(__DIR__ . '/../Model'),
24+
__DIR__ . '/../Model',
2325
);
2426
}
2527

@@ -49,8 +51,10 @@ private function loadModelClasses(): void
4951
$subNamespace = substr($file->getPath(), strlen($this->pathToModelFiles));
5052
$subNamespace = str_replace('/', '\\', $subNamespace);
5153

54+
/** @var class-string $className */
5255
$className = 'CXml\Model' . $subNamespace . '\\' . $file->getBasename('.php');
53-
$class = new ReflectionClass($className);
56+
57+
$class = new \ReflectionClass($className);
5458
if ($class->isAbstract() || $class->isInterface() || $class->isTrait() || $class->isAnonymous()) {
5559
continue;
5660
}

0 commit comments

Comments
 (0)