Skip to content

Commit db9588f

Browse files
committed
fixup! Gebruik Doctrine DateTimeImmutable
1 parent 8d48a84 commit db9588f

File tree

8 files changed

+10
-24
lines changed

8 files changed

+10
-24
lines changed

lib/Kernel.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ protected function configureContainer(ContainerConfigurator $container): void
4848
}
4949
}
5050

51-
/** @return void */
52-
public function boot()
51+
public function boot(): void
5352
{
5453
parent::boot();
5554
ContainerFacade::init($this->container);

lib/entity/corvee/CorveeTaak.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class CorveeTaak implements Agendeerbaar
9292
/**
9393
* @var DateTimeImmutable
9494
*/
95-
#[ORM\Column(type: 'date')]
95+
#[ORM\Column(type: 'date_immutable')]
9696
public $datum;
9797
/**
9898
* @var integer

lib/entity/eetplan/Eetplan.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Eetplan implements DataTableEntry
3838
/**
3939
* @var DateTimeImmutable
4040
*/
41-
#[ORM\Column(type: 'date', nullable: true)]
41+
#[ORM\Column(type: 'date_immutable', nullable: true)]
4242
public $avond;
4343
/**
4444
* Specifiek bedoelt voor bekende huizen.

lib/entity/groepen/Verticale.php

-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
class Verticale extends Groep
2424
{
2525
/**
26-
<<<<<<< HEAD
2726
* Primary key
2827
* @var string
2928
*/
@@ -45,14 +44,6 @@ class Verticale extends Groep
4544
#[Serializer\Groups(['datatable', 'log', 'vue'])]
4645
#[ORM\Column(type: 'stringkey', unique: true)]
4746
public $naam;
48-
=======
49-
* Primary key
50-
* @var string
51-
*/
52-
#[ORM\Column(type: 'string', unique: true, length: 1, options: ['fixed' => true])]
53-
#[Serializer\Groups(['datatable', 'log', 'vue'])]
54-
public $letter;
55-
>>>>>>> 293c8a774 (Fix meer problemen)
5647

5748
// Stiekem hebben we helemaal geen leden.
5849
public function getLeden()

lib/entity/maalcie/ArchiefMaaltijd.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class ArchiefMaaltijd implements Agendeerbaar
5151
/**
5252
* @var DateTimeImmutable
5353
*/
54-
#[ORM\Column(type: 'date')]
54+
#[ORM\Column(type: 'date_immutable')]
5555
public $datum;
5656
/**
5757
* @var DateTimeImmutable
5858
*/
59-
#[ORM\Column(type: 'time')]
59+
#[ORM\Column(type: 'time_immutable')]
6060
public $tijd;
6161
/**
6262
* @var int

lib/entity/maalcie/Maaltijd.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ class Maaltijd implements Agendeerbaar, DisplayEntity
104104
/**
105105
* @var DateTimeImmutable
106106
*/
107-
#[ORM\Column(type: 'date')]
107+
#[ORM\Column(type: 'date_immutable')]
108108
public $datum;
109109
/**
110110
* @var DateTimeImmutable
111111
*/
112-
#[ORM\Column(type: 'time')]
112+
#[ORM\Column(type: 'time_immutable')]
113113
public $tijd;
114114
/**
115115
* @var bool
@@ -416,7 +416,7 @@ public function getUUID(): string
416416
return $this->maaltijd_id . '@maaltijd.csrdelft.nl';
417417
}
418418

419-
public function getMoment()
419+
public function getMoment(): DateTimeImmutable
420420
{
421421
return $this->datum->setTime(
422422
$this->tijd->format('H'),

lib/entity/maalcie/MaaltijdRepetitie.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use CsrDelft\common\Eisen;
66
use CsrDelft\entity\fiscaat\CiviProduct;
77
use CsrDelft\view\formulier\DisplayEntity;
8+
use DateTimeImmutable;
89
use Doctrine\Common\Collections\ArrayCollection;
910
use Doctrine\ORM\Mapping as ORM;
10-
use Monolog\DateTimeImmutable;
1111

1212
/**
1313
* MaaltijdRepetitie.class.php | P.W.G. Brussee ([email protected])
@@ -74,7 +74,7 @@ class MaaltijdRepetitie implements DisplayEntity
7474
/**
7575
* @var DateTimeImmutable
7676
*/
77-
#[ORM\Column(type: 'time')]
77+
#[ORM\Column(type: 'time_immutable')]
7878
public $standaard_tijd;
7979
/**
8080
* @var int|null

lib/view/toestemming/ToestemmingModalForm.php

-4
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ public function __construct(
6161
}
6262
}
6363

64-
<<<<<<< HEAD
6564
$twig = ContainerFacade::getContainer()->get('csr.hack.twig');
66-
=======
67-
$twig = ContainerFacade::getContainer()->get(Environment::class);
68-
>>>>>>> 293c8a774 (Fix meer problemen)
6965

7066
$this->addFields([
7167
new HtmlComment(

0 commit comments

Comments
 (0)