File tree Expand file tree Collapse file tree 5 files changed +6
-16
lines changed
Expand file tree Collapse file tree 5 files changed +6
-16
lines changed Original file line number Diff line number Diff line change 55use BadMethodCallException ;
66
77/**
8- * Class BaseGenerator
9- *
10- * @package Rmunate\Php2Js\Bases
8+ * Class BaseGenerator.
119 */
1210abstract class BaseGenerator
1311{
Original file line number Diff line number Diff line change 55use BadMethodCallException ;
66
77/**
8- * Class BaseRender
9- *
10- * @package Rmunate\Php2Js\Bases
8+ * Class BaseRender.
119 */
1210abstract class BaseRender
1311{
Original file line number Diff line number Diff line change 33namespace Rmunate \Php2Js \Elements ;
44
55use Exception ;
6- use Rmunate \Php2Js \Traits \Alias ;
76use Rmunate \Php2Js \Bases \BaseGenerator ;
7+ use Rmunate \Php2Js \Traits \Alias ;
88
99class Generator extends BaseGenerator
1010{
@@ -65,4 +65,4 @@ public function script()
6565 // Replace the placeholder with the set alias
6666 return str_replace ('{PHP2JS} ' , $ this ->alias , $ stub );
6767 }
68- }
68+ }
Original file line number Diff line number Diff line change @@ -85,27 +85,21 @@ public function compose()
8585 $ posicionCierreBody = strpos ($ html , '</body> ' );
8686
8787 if ($ posicionCierreHead !== false ) {
88-
8988 $ ssr [0 ] = substr ($ html , 0 , $ posicionCierreHead );
9089 $ ssr [1 ] = $ metas ;
9190 $ ssr [2 ] = $ scripts ;
9291 $ ssr [3 ] = substr ($ html , $ posicionCierreHead );
9392
9493 $ html = implode (PHP_EOL , $ ssr );
95-
9694 } elseif ($ posicionCierreBody !== false ) {
97-
9895 $ ssr [0 ] = substr ($ html , 0 , $ posicionCierreBody );
9996 $ ssr [1 ] = $ metas ;
10097 $ ssr [2 ] = $ scripts ;
10198 $ ssr [3 ] = substr ($ html , $ posicionCierreBody );
10299
103100 $ html = implode (PHP_EOL , $ ssr );
104-
105101 } else {
106-
107102 $ html .= $ metas .$ scripts ;
108-
109103 }
110104
111105 return response ($ html );
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ trait Alias
1313 */
1414 public static function isValid (string $ alias )
1515 {
16- $ alias = trim ($ alias , " \t\n\r\0\x0B$ " );
16+ $ alias = trim ($ alias , " \t\n\r\0\x0B$ " );
1717
1818 $ pattern = '/^[_a-zA-Z\x7f-\xff][_a-zA-Z0-9\x7f-\xff]*$/ ' ;
1919
2020 return preg_match ($ pattern , $ alias ) === 1 ;
2121 }
22- }
22+ }
You can’t perform that action at this time.
0 commit comments