for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the slince/smartqq package.
*
* (c) Slince <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Slince\SmartQQ\Message;
class Font
{
/**
* 名称.
* @var string
protected $name;
* 颜色.
protected $color;
* 字号.
protected $size;
* 风格,具体不知效果.
protected $style;
public function __construct($name, $color, $size, array $style = [])
$this->name = $name;
$this->color = $color;
$this->size = $size;
$this->style = $style;
$style
array
string
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
}
* @param string $name
public function setName($name)
* @param string $color
public function setColor($color)
* @param string $size
public function setSize($size)
* @param string $style
public function setStyle($style)
* @return string
public function getName()
return $this->name;
public function getColor()
return $this->color;
public function getSize()
return $this->size;
public function getStyle()
return $this->style;
* 转换成数组.
* @return array
public function toArray()
return [
'name' => $this->name,
'size' => $this->size,
'style' => $this->style,
'color' => $this->color,
];
* 创建一个默认字体.
* @return static
public static function createDefault()
return new static('微软雅黑', '000000', 10, [0, 0, 0]);
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..