Getting Parse Error: syntax error, unexpected '/', expecting '&' or variable (T_VARIABLE) error when running app/console doctrine:schema:update

Getting Parse Error: syntax error, unexpected '/', expecting '&' or variable (T_VARIABLE) error when running app/console doctrine:schema:update

运行 app/console doctrine:schema:update --force 但是 returns:

[Symfony\Component\Debug\Exception\FatalErrorException]                            
Parse Error: syntax error, unexpected '/', expecting '&' or variable (T_VARIABLE)

这是包含错误的文件:

<?php

namespace Admin\Store\Product\Type\TypeBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Type
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Type
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
    * @ORM\OneToOne(targetEntity="Admin/Store/Product/Type/TypeBundle/Entity/Kind")
    */
    private $kind;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set kind
     *
     * @param \Admin\Store\Product\Type\TypeBundle\Entity\Admin/Store/Product/Type/TypeBundle/Entity/Kind $kind
     *
     * @return Type
     */
    public function setKind(\Admin\Store\Product\Type\TypeBundle\Entity\Admin/Store/Product/Type/TypeBundle/Entity/Kind $kind = null)
    {
        $this->kind = $kind;

        return $this;
    }

    /**
     * Get kind
     *
     * @return \Admin\Store\Product\Type\TypeBundle\Entity\Admin/Store/Product/Type/TypeBundle/Entity/Kind
     */
    public function getKind()
    {
        return $this->kind;
    }
}

所有操作都是使用 symfony 的控制台完成的,实际上我根本没有接触任何东西! 但是我不明白错误是从哪里来的。

这样试试:

public function setKind(\Admin\Store\Product\Type\TypeBundle\Entity\Kind $kind = null)