Skip to content
Snippets Groups Projects
Commit d2003d73 authored by Yas Naoi's avatar Yas Naoi Committed by Yas Naoi
Browse files

Issue #3220258 by yas, Xiaohua Guan: Hotfix - Fix TypeError:...

Issue #3220258 by yas, Xiaohua Guan: Hotfix - Fix TypeError: Drupal\k8s\Entity\K8sDeployment::getCreationYaml()
parent 57dfc13a
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,8 @@ class K8sConfigMap extends K8sEntityBase implements K8sConfigMapInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -155,8 +155,8 @@ class K8sCronJob extends K8sEntityBase implements K8sCronJobInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -213,8 +213,8 @@ class K8sDeployment extends K8sEntityBase implements K8sDeploymentInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -12,7 +12,7 @@ interface K8sExportableEntityInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string;
public function getCreationYaml(): string;
/**
* {@inheritdoc}
......
......@@ -155,8 +155,8 @@ class K8sJob extends K8sEntityBase implements K8sJobInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -141,8 +141,8 @@ class K8sNetworkPolicy extends K8sEntityBase implements K8sNetworkPolicyInterfac
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -241,8 +241,8 @@ class K8sPod extends K8sEntityBase implements K8sPodInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
......@@ -99,8 +99,8 @@ class K8sSecret extends K8sEntityBase implements K8sSecretInterface {
/**
* {@inheritdoc}
*/
public function getCreationYaml(): ?string {
return $this->get('creation_yaml')->value;
public function getCreationYaml(): string {
return $this->get('creation_yaml')->value ?? '';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment