Improved strtr calls

This commit is contained in:
Alexander Makarov
2014-07-23 16:19:28 +04:00
parent 81d5dd0163
commit 92c64994cd
3 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class CodeFile extends Object
*/
public function __construct($path, $content)
{
$this->path = strtr($path, ['/' => DIRECTORY_SEPARATOR, '\\' => DIRECTORY_SEPARATOR]);
$this->path = strtr($path, '/\\', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);
$this->content = $content;
$this->id = md5($this->path);
if (is_file($path)) {