Skip to content

Commit e60b584

Browse files
committed
Merge branch 'master' into 4.X
2 parents ce8c4d0 + 85c9ba3 commit e60b584

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

lib/Annotation/Model/Table.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ protected function writeEntity(WriterInterface $writer)
261261
->open($this->getClassFileName($extendableEntity ? true : false))
262262
->write('<?php')
263263
->write('')
264-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
264+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
265265
/** @var \MwbExporter\Configuration\Header $header */
266266
$header = $this->getConfig(HeaderConfiguration::class);
267267
if ($content = $header->getHeader()) {
@@ -286,7 +286,7 @@ protected function writeEntity(WriterInterface $writer)
286286
(strstr($this->getClassName($extendableEntity), 'Img') || $hasDeletableBehaviour || $hasTimestampableBehaviour),
287287
'use Gedmo\Mapping\Annotation as Gedmo;'
288288
)
289-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
289+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
290290
$_this->writeUsedClasses($writer);
291291
})
292292
->commentStart()
@@ -325,7 +325,7 @@ protected function writeEntity(WriterInterface $writer)
325325
->write('class '.$this->getClassName($extendableEntity).$extendsClass.$implementsInterface)
326326
->write('{')
327327
->indent()
328-
->writeCallback(function(WriterInterface $writer, Table $_this = null) use ($skipGetterAndSetter, $serializableEntity, $lifecycleCallbacks) {
328+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) use ($skipGetterAndSetter, $serializableEntity, $lifecycleCallbacks) {
329329
$_this->writePreClassHandler($writer);
330330
$_this->writeVars($writer);
331331
$_this->writeConstructor($writer);
@@ -359,7 +359,7 @@ protected function writeEntity(WriterInterface $writer)
359359
->open($this->getClassFileName())
360360
->write('<?php')
361361
->write('')
362-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
362+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
363363
/** @var \MwbExporter\Configuration\Header $header */
364364
$header = $this->getConfig(HeaderConfiguration::class);
365365
if ($content = $header->getHeader()) {
@@ -381,7 +381,7 @@ protected function writeEntity(WriterInterface $writer)
381381
->write('')
382382
->write('use %s\\%s;', $namespace, $this->getClassName(true, 'Base\\'))
383383
->write('')
384-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
384+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
385385
$_this->writeExtendedUsedClasses($writer);
386386
})
387387
->commentStart()
@@ -599,7 +599,7 @@ protected function writeRelationsVar(WriterInterface $writer)
599599
->writeIf($cacheMode, $this->getAnnotation('Cache', [$cacheMode]))
600600
->write($this->getAnnotation('OneToMany', $annotationOptions))
601601
->write($this->getJoins($local))
602-
->writeCallback(function(WriterInterface $writer, Table $_this = null) use ($local) {
602+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) use ($local) {
603603
if (count($orders = $_this->getFormatter()->getOrderOption($local->parseComment('order')))) {
604604
$writer
605605
->write($_this->getAnnotation('OrderBy', [$orders]))
@@ -719,7 +719,7 @@ protected function writeManyToManyVar(WriterInterface $writer)
719719
],
720720
true
721721
))
722-
->writeCallback(function(WriterInterface $writer, Table $_this = null) use ($fk2) {
722+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) use ($fk2) {
723723
if (count($orders = $_this->getFormatter()->getOrderOption($fk2->parseComment('order')))) {
724724
$writer
725725
->write($_this->getAnnotation('OrderBy', [$orders]))
@@ -759,7 +759,7 @@ public function writeConstructor(WriterInterface $writer)
759759
->write('public function __construct()')
760760
->write('{')
761761
->indent()
762-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
762+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
763763
$_this->writeCurrentTimestampConstructor($writer);
764764
$_this->writeRelationsConstructor($writer);
765765
$_this->writeManyToManyConstructor($writer);
@@ -1101,7 +1101,7 @@ protected function writeManyToManyGetterAndSetter(WriterInterface $writer)
11011101
->write('public function add'.$relation['refTable']->getModelName().'('.$typehints['add_arg'].'$'.$this->getNaming($relation['refTable']->getName()).')'.$typehints['add_return'])
11021102
->write('{')
11031103
->indent()
1104-
->writeCallback(function(WriterInterface $writer, Table $_this = null) use ($isOwningSide, $relation) {
1104+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) use ($isOwningSide, $relation) {
11051105
if ($isOwningSide) {
11061106
$writer->write('$%s->add%s($this);', $_this->getNaming($relation['refTable']->getName()), $_this->getModelName());
11071107
}
@@ -1121,7 +1121,7 @@ protected function writeManyToManyGetterAndSetter(WriterInterface $writer)
11211121
->write('public function remove'.$relation['refTable']->getModelName().'('.$typehints['remove_arg'].'$'.$this->getNaming($relation['refTable']->getName()).')'.$typehints['remove_return'])
11221122
->write('{')
11231123
->indent()
1124-
->writeCallback(function(WriterInterface $writer, Table $_this = null) use ($isOwningSide, $relation) {
1124+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) use ($isOwningSide, $relation) {
11251125
if ($isOwningSide) {
11261126
$writer->write('$%s->remove%s($this);', $_this->getNaming($relation['refTable']->getName()), $_this->getModelName());
11271127
}

lib/Yaml/Model/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function writeTable(WriterInterface $writer)
5757
$this->getDocument()->addLog(sprintf('Writing table "%s"', $this->getModelName()));
5858
$writer
5959
->open($this->getTableFileName())
60-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
60+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
6161
/** @var \MwbExporter\Configuration\Header $header */
6262
$header = $this->getConfig(HeaderConfiguration::class);
6363
if ($content = $header->getHeader()) {

lib/ZF2InputFilterAnnotation/Model/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function writeInputFilter(WriterInterface $writer)
118118
->write('$factory = new InputFactory();')
119119
->write('$filters = [')
120120
->indent()
121-
->writeCallback(function(WriterInterface $writer, Table $_this = null) {
121+
->writeCallback(function(WriterInterface $writer, ?Table $_this = null) {
122122
$_this->writeInputFilterColumns($writer);
123123
})
124124
->outdent()

0 commit comments

Comments
 (0)