Add default values to class member variables
Strict types
Cleanup
<?php declare(strict_types=1);
/*
<?php declare(strict_types=1);
/*
- * this file is part of the rapsys packbundle package.
+ * This file is part of the Rapsys AirBundle package.
- * (c) raphaël gertz <symfony@rapsys.eu>
+ * (c) Raphaël Gertz <symfony@rapsys.eu>
- * for the full copyright and license information, please view the license
+ * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Rapsys\AirBundle\Entity;
* file that was distributed with this source code.
*/
namespace Rapsys\AirBundle\Entity;
+use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Event\PreUpdateEventArgs;
+ private ?int $id = null;
- protected $description;
+ private ?string $description = null;
+ private \DateTime $created;
+ private \DateTime $updated;
+ private Collection $sessions;
+ private Collection $snippets;
+ private Collection $users;
/**
* Constructor
*/
public function __construct() {
//Set defaults
/**
* Constructor
*/
public function __construct() {
//Set defaults
- $this->description = null;
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
$this->sessions = new ArrayCollection();
$this->snippets = new ArrayCollection();
$this->users = new ArrayCollection();
$this->sessions = new ArrayCollection();
$this->snippets = new ArrayCollection();
$this->users = new ArrayCollection();
- public function getId(): int {
+ public function getId(): ?int {