File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
test/php/lang/reflection/unittest Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,12 @@ public function is($type): bool {
8383 }
8484
8585 /**
86- * Returns this type's package, or NULL if this type is in the global namespace.
86+ * Returns this type's package
8787 *
88- * @return ? lang.reflection.Package
88+ * @return lang.reflection.Package
8989 */
9090 public function package () {
91- $ name = $ this ->reflect ->getNamespaceName ();
92- return $ name ? new Package ($ name ) : null ;
91+ return new Package ($ this ->reflect ->getNamespaceName ());
9392 }
9493
9594 /**
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function package() {
5151
5252 #[Test]
5353 public function global_namespace () {
54- Assert::null ( Reflection::of (\Throwable::class)->package ());
54+ Assert::equals ( new Package (), Reflection::of (\Throwable::class)->package ());
5555 }
5656
5757 #[Test]
You can’t perform that action at this time.
0 commit comments