+1 vote

Hi,

Currently when I have a PHP class that uses PHP 7 return types, when I export from Skipper it messes up my class and adds extra curly braces. Here is a small sample:

Before:

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

    /**
     * @ORM\Column(type="string", nullable=false)
     *
     * @var string
     */
    private $description;

    public function __construct(string $description)
    {
        $this->description = $description;
    }

    public function getId(): int
    {
        return $this->id;
    }

    public function getDescription(): string
    {
        return $this->description;
    }
}

After export from Skipper:

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

    /**
     * @ORM\Column(type="string", nullable=false)
     *
     * @var string
     */
    private $description;

    public function __construct(string $description)
    {
        $this->description = $description;
    }

    public function getId(){: int
    {
        return $this->id;
    }

    public function getDescription(): string
    {
        return $this->description;
    }
}}

So as you can see it adds an extra { before the first return type and an extra } at the end.

asked in Solved by (260 points)
recategorized by

1 Answer

0 votes
Best answer

This feature is implemented in latest beta 3.2.7.1319 available from our support site:
http://support.skipper18.com/402/downloads-skipper-beta

answered by Skipper developer (131k points)
selected by