File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -79,14 +79,14 @@ public function __construct(
7979 public function toArray (): array
8080 {
8181 return [
82- 'method ' => $ this ->method ,
83- 'path ' => $ this ->path ,
84- 'controller ' => $ this ->controller ,
85- 'name ' => $ this ->name ,
86- 'middleware ' => $ this ->middleware ,
87- 'domain ' => $ this ->domain ,
88- 'uri ' => $ this ->uri ,
89- 'parameters ' => $ this ->parameters ,
82+ 'method ' => $ this ->getMethod () ,
83+ 'path ' => $ this ->getPath () ,
84+ 'controller ' => $ this ->getController () ,
85+ 'name ' => $ this ->getName () ,
86+ 'middleware ' => $ this ->getMiddleware () ,
87+ 'domain ' => $ this ->getDomain () ,
88+ 'uri ' => $ this ->getUri () ,
89+ 'parameters ' => $ this ->getParameters () ,
9090 ];
9191 }
9292
Original file line number Diff line number Diff line change 44
55use Psr \Http \Message \ResponseInterface ;
66
7- /**
8- * Class HttpPublisher
9- * HttpPublisher publishes controller responses as over HTTP.
10- *
11- * @package MiladRahimi\PhpRouter\Services
12- * @codeCoverageIgnore
13- */
147class HttpPublisher implements Publisher
158{
169 /**
1710 * @inheritdoc
1811 */
1912 public function publish ($ content ): void
2013 {
21- $ content = empty ($ content ) ? '' : $ content ;
14+ $ content = empty ($ content ) ? null : $ content ;
2215
2316 $ output = fopen ('php://output ' , 'a ' );
2417
You can’t perform that action at this time.
0 commit comments