@@ -455,9 +455,9 @@ public function free(): void
455455 /**
456456 * Casts a stdClass object to the given class name mapping its' properties.
457457 *
458- * @param stdClass $sourceObject Object to cast from.
459- * @param string|object $destinationClass Name of the class or class instance to cast to.
460- * @param mixed[] $ctorArgs Arguments to use for constructing the destination class instance.
458+ * @param stdClass $sourceObject Object to cast from.
459+ * @param class- string|object $destinationClass Name of the class or class instance to cast to.
460+ * @param mixed[] $ctorArgs Arguments to use for constructing the destination class instance.
461461 *
462462 * @return object
463463 *
@@ -527,7 +527,7 @@ private function createTemporaryFile()
527527 $ handle = @tmpfile ();
528528
529529 if ($ handle === false ) {
530- throw CannotCreateTemporaryFile::new (error_get_last ()[ ' message ' ] );
530+ throw CannotCreateTemporaryFile::new (error_get_last ());
531531 }
532532
533533 return $ handle ;
@@ -542,7 +542,7 @@ private function createTemporaryFile()
542542 private function copyStreamToStream ($ source , $ target ): void
543543 {
544544 if (@stream_copy_to_stream ($ source , $ target ) === false ) {
545- throw CannotCopyStreamToStream::new (error_get_last ()[ ' message ' ] );
545+ throw CannotCopyStreamToStream::new (error_get_last ());
546546 }
547547 }
548548
@@ -554,7 +554,7 @@ private function copyStreamToStream($source, $target): void
554554 private function writeStringToStream (string $ string , $ target ): void
555555 {
556556 if (@fwrite ($ target , $ string ) === false ) {
557- throw CannotWriteToTemporaryFile::new (error_get_last ()[ ' message ' ] );
557+ throw CannotWriteToTemporaryFile::new (error_get_last ());
558558 }
559559 }
560560}
0 commit comments