summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7fecee5)
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;
+ private \DateTime $created;
+ private \DateTime $updated;
+ * Applications collection
+ private Collection $applications;
- private $updated;
-
- /**
- * @var ArrayCollection
- */
- private $applications;
-
- /**
- * @var ArrayCollection
- */
- private $users;
+ private Collection $users;
* @param string $name The dance name
* @param string $type The dance type
*/
* @param string $name The dance name
* @param string $type The dance type
*/
- public function __construct(string $name, string $type) {
+ public function __construct(private string $name, private string $type) {
- $this->name = $name;
- $this->type = $type;
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
- public function getId(): int {
+ public function getId(): ?int {