Skip to content

Commit

Permalink
Merge pull request #12 from netbrothers-gmbh/11-support-attributes
Browse files Browse the repository at this point in the history
#11 support attributes
  • Loading branch information
netbrothers-tr authored Jan 18, 2023
2 parents cfa4584 + 5dcbe7b commit e5de6f1
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions src/Traits/VersionColumn.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
<?php

/**
* NetBrothers VersionBundle
*
* @author Stefan Wessel, NetBrothers GmbH
* @date 23.03.21
*
*/

namespace NetBrothers\VersionBundle\Traits;

use Doctrine\ORM\Mapping as ORM;

/**
* Trait VersionColumn
* @package NetBrothers\VersionBundle\Traits
*/
trait VersionColumn
{
/**
* @ORM\Column(type="integer", nullable=true, options={"default" : 1})
* @var int
* @ORM\Column(type="integer", nullable=false, options={"default": 1})
*/
protected $version = 1;
#[ORM\Column(type: 'integer', nullable: false, options: ['default' => 1])]
protected int $version = 1;

/**
* @return int
*/
public function getVersion(): ?int
public function getVersion(): int
{
return $this->version;
}

}
}

0 comments on commit e5de6f1

Please sign in to comment.