for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @ingroup SMWDataItems
*/
* This class implements blob (long string) data items.
*
* @since 1.6
* @author Markus Krötzsch
class SMWDIBlob extends SMWDataItem {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
* Internal value.
* @var string
protected $m_string;
public function __construct( $string ) {
$this->m_string = trim( $string );
}
public function getDIType() {
return SMWDataItem::TYPE_BLOB;
public function getString() {
return $this->m_string;
public function getSortKey() {
* @see SMWDataItem::getSortKeyDataItem()
* @return SMWDataItem
public function getSortKeyDataItem() {
return $this;
public function getSerialization() {
* Create a data item from the provided serialization string and type
* ID.
* @return SMWDIBlob
public static function doUnserialize( $serialization ) {
return new SMWDIBlob( $serialization );
public function equals( SMWDataItem $di ) {
if ( !( $di instanceof SMWDIBlob ) ) {
return false;
return $di->getString() === $this->m_string;
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.