Skip to content

Commit 06c3f40

Browse files
committed
Fix false positive class check. Update composer.json
1 parent 804c438 commit 06c3f40

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "byscripts/static-entity",
3+
"type": "library",
34
"description": "Provide some kind of static entities",
45
"minimum-stability": "dev",
56
"license": "MIT",
@@ -9,6 +10,9 @@
910
"email": "thierry@byscripts.info"
1011
}
1112
],
13+
"require": {
14+
"php": ">=5.3.0"
15+
},
1216
"autoload": {
1317
"psr-4": {
1418
"Byscripts\\StaticEntity\\": "src/"
@@ -19,4 +23,4 @@
1923
"Byscripts\\StaticEntity\\Tests\\": "tests/"
2024
}
2125
}
22-
}
26+
}

src/StaticEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static private function parseClass($class, $method)
193193
}
194194

195195
return $class;
196-
} elseif (null !== $class) {
196+
} elseif (null !== $class && $class !== $calledClass) {
197197
throw new \Exception($calledClass . '::' . $method . ' => $class must be null');
198198
}
199199

0 commit comments

Comments
 (0)