Skip to content

Commit 6931af3

Browse files
authored
Merge pull request #41 from rmunate/analysis-6VKlNl
Apply fixes from StyleCI
2 parents 8307b68 + ea84421 commit 6931af3

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

src/Bases/BaseGenerator.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
use BadMethodCallException;
66

77
/**
8-
* Class BaseGenerator
9-
*
10-
* @package Rmunate\Php2Js\Bases
8+
* Class BaseGenerator.
119
*/
1210
abstract class BaseGenerator
1311
{

src/Bases/BaseRender.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
use BadMethodCallException;
66

77
/**
8-
* Class BaseRender
9-
*
10-
* @package Rmunate\Php2Js\Bases
8+
* Class BaseRender.
119
*/
1210
abstract class BaseRender
1311
{

src/Elements/Generator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace Rmunate\Php2Js\Elements;
44

55
use Exception;
6-
use Rmunate\Php2Js\Traits\Alias;
76
use Rmunate\Php2Js\Bases\BaseGenerator;
7+
use Rmunate\Php2Js\Traits\Alias;
88

99
class 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+
}

src/Render.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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);

src/Traits/Alias.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)