for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of SwiftMailer.
* (c) 2004-2009 Chris Corbyn
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Message ID generator.
class Swift_Mime_IdGenerator implements Swift_IdGenerator
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.
{
* @param string $idRight
public function __construct($idRight)
$this->idRight = $idRight;
idRight
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* Returns the right-hand side of the "@" used in all generated IDs.
* @return string
public function getIdRight()
return $this->idRight;
* Sets the right-hand side of the "@" to use in all generated IDs.
public function setIdRight($idRight)
public function generateId()
$idLeft = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
return $idLeft.'@'.$this->idRight;
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.