for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Tarantool Client package.
*
* (c) Eugene Leonovich <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use MessagePack\BufferUnpacker;
use MessagePack\Packer;
use MessagePack\TypeTransformer\Packable;
use MessagePack\TypeTransformer\Unpackable;
final class EmailTransformer implements Packable, Unpackable
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.
{
private $type;
public function __construct(int $type)
$this->type = $type;
}
public function getType() : int
return $this->type;
public function pack(Packer $packer, $value) : ?string
return $value instanceof Email
? $packer->packStr($value->toString())
: null;
public function unpack(BufferUnpacker $unpacker, int $extLength) : Email
return new Email($unpacker->unpackStr());
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.