Merge remote-tracking branch 'origin/master' into 3.4.x

This commit is contained in:
William Cheng
2018-10-26 21:04:25 +08:00
757 changed files with 23913 additions and 2474 deletions

View File

@@ -183,7 +183,7 @@ class Category implements ModelInterface, ArrayAccess
public function __construct(array $data = null)
{
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : 'default-name';
}
/**
@@ -195,6 +195,9 @@ class Category implements ModelInterface, ArrayAccess
{
$invalidProperties = [];
if ($this->container['name'] === null) {
$invalidProperties[] = "'name' can't be null";
}
return $invalidProperties;
}
@@ -237,7 +240,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return string|null
* @return string
*/
public function getName()
{
@@ -247,7 +250,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string|null $name name
* @param string $name name
*
* @return $this
*/