Skip to content

Commit d28bd00

Browse files
committed
rename function
1 parent ba32534 commit d28bd00

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Project.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Project {
6060
private $project;
6161

6262
/** @var bool */
63-
private $disableLaunch = false;
63+
private $launchState = true;
6464

6565
/**
6666
* Project constructor.
@@ -89,11 +89,11 @@ public function __construct(string $appName, string $path, string $xvt = null, s
8989
}
9090

9191
/**
92-
* @param bool $disable
92+
* @param bool $state
9393
*/
94-
public function setLaunchState(bool $disable): void
94+
public function setLaunchState(bool $state): void
9595
{
96-
$this->disableLaunch = $disable;
96+
$this->launchState = $state;
9797
return;
9898
}
9999

src/parser/ExtParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function parseAppJS(string &$buffer, array &$info)
3939
"pattern" => "/Ext\.create\(\'(.*)\'\);/isU",
4040
"replacer" => function(string $launch, string &$buffer, array $matches, string $target = null): bool {
4141
// Replace launch
42-
if ($this->disableLaunch)
42+
if ($this->launchState === false)
4343
$launch = "";
4444
else if ($target)
4545
$launch .= "Ext.getCmp('".$this->target."').add(new ".$matches[1]."()); \n";
@@ -55,7 +55,7 @@ public function parseAppJS(string &$buffer, array &$info)
5555
"pattern" => "/Ext\.create\('(.*)', \{renderTo: Ext\.getBody\(\)\}\);/isU",
5656
"replacer" => function(string $launch, string &$buffer, array $matches, string $target = null): bool {
5757
// Replace launch
58-
if ($this->disableLaunch)
58+
if ($this->launchState === false)
5959
$launch = "";
6060
else if ($target)
6161
$launch .= "Ext.getCmp('".$this->target."').add(new ".$matches[1]."()); \n";

0 commit comments

Comments
 (0)