Always prefer stricter string comparisons.
This commit is contained in:
@@ -55,8 +55,8 @@ class Add extends Component
|
||||
|
||||
return;
|
||||
}
|
||||
if (empty($this->container) || $this->container == 'null') {
|
||||
if ($this->type == 'service') {
|
||||
if (empty($this->container) || $this->container === 'null') {
|
||||
if ($this->type === 'service') {
|
||||
$this->container = $this->subServiceName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ class All extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = get_route_parameters();
|
||||
if ($this->resource->type() == 'service') {
|
||||
if ($this->resource->type() === 'service') {
|
||||
$this->containerNames = $this->resource->applications()->pluck('name');
|
||||
$this->containerNames = $this->containerNames->merge($this->resource->databases()->pluck('name'));
|
||||
} elseif ($this->resource->type() == 'application') {
|
||||
} elseif ($this->resource->type() === 'application') {
|
||||
if ($this->resource->build_pack === 'dockercompose') {
|
||||
$parsed = $this->resource->parse();
|
||||
$containers = collect(data_get($parsed, 'services'))->keys();
|
||||
|
||||
@@ -77,7 +77,7 @@ class Show extends Component
|
||||
try {
|
||||
$this->task->delete();
|
||||
|
||||
if ($this->type == 'application') {
|
||||
if ($this->type === 'application') {
|
||||
return redirect()->route('project.application.configuration', $this->parameters, $this->scheduledTaskName);
|
||||
} else {
|
||||
return redirect()->route('project.service.configuration', $this->parameters, $this->scheduledTaskName);
|
||||
|
||||
Reference in New Issue
Block a user