for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Evernote;
class EvernoteContent
{
const TYPE_HTML = 'html';
const TYPE_PLAIN = 'plain';
/** @var string */
protected $content;
/** @var array */
protected $type = self::TYPE_PLAIN;
/**
* @param string $content
*
* @return static
*/
public static function create($content)
return new static($content);
}
public function __construct($content)
$this->content = $content;
* Set the content type to HTML.
* @return $this
public function html()
$this->type = self::TYPE_HTML;
self::TYPE_HTML
string
array
$type
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..
return $this;
* Set the content type to plaintext.
public function plain()
$this->type = self::TYPE_PLAIN;
self::TYPE_PLAIN
* @return array
public function toArray()
return [
'content' => $this->content,
'type' => $this->type,
];
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..