@@ -29,7 +29,7 @@ public function supports($resource, $type = null): bool
2929
3030 public function setProjectDir (string $ path ): void
3131 {
32- $ this ->publicPath = rtrim ($ path , '/ ' ) . '/public ' ;
32+ $ this ->publicPath = rtrim ($ path , '/ ' ). '/public ' ;
3333 }
3434
3535 public function setAssetPaths (array $ paths ): void
@@ -42,16 +42,16 @@ public function load(mixed $resource, ?string $type = null): RouteCollection
4242 $ routes = new RouteCollection ();
4343 foreach ($ this ->assetPaths as $ assetPath ) {
4444 $ target = trim ($ assetPath , '/ ' );
45- if (!is_readable ($ this ->publicPath . '/ ' . $ target )) {
46- user_error ('Tried to register " ' . $ target . '" asset path, but it does not exist or is not readable. ' , E_USER_WARNING );
45+ if (!is_readable ($ this ->publicPath . '/ ' .$ target )) {
46+ trigger_error ('Tried to register " ' .$ target. '" asset path, but it does not exist or is not readable. ' , \ E_USER_WARNING );
4747 continue ;
4848 }
4949
50- if (is_file ($ this ->publicPath . '/ ' . $ target )) {
50+ if (is_file ($ this ->publicPath . '/ ' .$ target )) {
5151 $ routes ->add (
52- name: 'zolex:reactphp_bundle: ' . str_replace ('/ ' , '_ ' , $ target ),
52+ name: 'zolex:reactphp_bundle: ' . str_replace ('/ ' , '_ ' , $ target ),
5353 route: new Route (
54- path: '/ ' . $ target ,
54+ path: '/ ' . $ target ,
5555 defaults: [
5656 '_controller ' => 'zolex.reactphp_bundle.serve_bundle_assets_action ' ,
5757 'directory ' => '/ ' ,
@@ -62,9 +62,9 @@ public function load(mixed $resource, ?string $type = null): RouteCollection
6262 );
6363 } else {
6464 $ routes ->add (
65- name: 'zolex:reactphp_bundle: ' . str_replace ('/ ' , '_ ' , $ target ),
65+ name: 'zolex:reactphp_bundle: ' . str_replace ('/ ' , '_ ' , $ target ),
6666 route: new Route (
67- path: '/ ' . $ target . '/{file} ' ,
67+ path: '/ ' . $ target. '/{file} ' ,
6868 defaults: [
6969 '_controller ' => 'zolex.reactphp_bundle.serve_bundle_assets_action ' ,
7070 'directory ' => $ target ,
0 commit comments