Skip to content

Commit a047b74

Browse files
ECS updates
Signed-off-by: Tom Wright <[email protected]>
1 parent 45ce405 commit a047b74

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/NamespaceList.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public function import(
6868
NamespaceList $list,
6969
?string $mapTo = null,
7070
): void {
71-
foreach($list->namespaces as $namespace => $priority) {
72-
if($mapTo !== null) {
73-
$namespace .= '\\'.$mapTo;
71+
foreach ($list->namespaces as $namespace => $priority) {
72+
if ($mapTo !== null) {
73+
$namespace .= '\\' . $mapTo;
7474
}
7575

7676
$this->add($namespace, $priority);

src/NamespaceMap.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function addAlias(
7474
string $interface,
7575
string $alias
7676
): void {
77-
if(!isset($this->aliases[$interface])) {
77+
if (!isset($this->aliases[$interface])) {
7878
$this->aliases[$interface] = [];
7979
}
8080

@@ -110,7 +110,7 @@ public function map(
110110
$output = new NamespaceList();
111111
$this->applyMap($namespace, $output);
112112

113-
foreach($this->aliases[$namespace] ?? [] as $alias) {
113+
foreach ($this->aliases[$namespace] ?? [] as $alias) {
114114
$this->applyMap($alias, $output);
115115
}
116116

@@ -125,7 +125,7 @@ protected function applyMap(
125125
$inner = [];
126126
$namespaces->add($namespace, -1);
127127

128-
while(!empty($parts)) {
128+
while (!empty($parts)) {
129129
$root = implode('\\', $parts);
130130

131131
if (isset($this->namespaces[$root])) {

src/Resolver/Generic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function resolve(
7474
$name = str_replace('/', '\\', $name);
7575
$name = trim($name, '\\');
7676

77-
foreach($this->namespaces->map($this->interface) as $namespace) {
77+
foreach ($this->namespaces->map($this->interface) as $namespace) {
7878
$class = $namespace . '\\' . $name;
7979

8080
if (class_exists($class)) {

src/ResolverTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function setNamespaceMap(
2121

2222
public function getNamespaceMap(): NamespaceMap
2323
{
24-
if(!isset($this->namespaces)) {
24+
if (!isset($this->namespaces)) {
2525
$this->namespaces = new NamespaceMap();
2626
}
2727

0 commit comments

Comments
 (0)