Skip to content

Commit 7342d62

Browse files
authored
Merge pull request #69 from mlocati-forks/php8.4-fixes
Fix some PHP 8.4 deprecation warnings
2 parents a8b071b + e784ea8 commit 7342d62

21 files changed

+26
-26
lines changed

src/PortlandLabs/Concrete5/MigrationTool/Batch/Validator/MessageCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function add($element)
3030
return parent::add($element);
3131
}
3232

33-
public function addMessages(MessageCollection $collection = null)
33+
public function addMessages(?MessageCollection $collection = null)
3434
{
3535
if (is_object($collection) && count($collection)) {
3636
foreach ($collection as $message) {

src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/IgnoredTargetItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class IgnoredTargetItem extends TargetItem
1313
{
14-
public function __construct(MapperInterface $mapper = null)
14+
public function __construct(?MapperInterface $mapper = null)
1515
{
1616
parent::__construct($mapper);
1717
$this->setItemId(-1);

src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/ShortDescriptionTargetItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class ShortDescriptionTargetItem extends TargetItem
1313
{
14-
public function __construct(MapperInterface $mapper = null)
14+
public function __construct(?MapperInterface $mapper = null)
1515
{
1616
parent::__construct($mapper);
1717
$this->setItemId('short_description');

src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/TargetItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TargetItem implements TargetItemInterface
3737

3838
protected $item_name;
3939

40-
public function __construct(MapperInterface $mapper = null)
40+
public function __construct(?MapperInterface $mapper = null)
4141
{
4242
if ($mapper) {
4343
$this->item_type = $mapper->getHandle();

src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/UnmappedTargetItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class UnmappedTargetItem extends TargetItem
1313
{
14-
public function __construct(MapperInterface $mapper = null)
14+
public function __construct(?MapperInterface $mapper = null)
1515
{
1616
parent::__construct($mapper);
1717
$this->setItemId(0);

src/PortlandLabs/Concrete5/MigrationTool/Entity/Publisher/Log/Entry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class Entry
3030
**/
3131
protected $log;
3232

33-
public function __construct(LoggableObject $object = null)
33+
public function __construct(?LoggableObject $object = null)
3434
{
3535
$this->timestamp = new \DateTime();
3636
if (is_object($object)) {

src/PortlandLabs/Concrete5/MigrationTool/Importer/CIF/Element/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Tree implements ElementParserInterface
1313
{
1414
protected function walk(\SimpleXMLElement $node,
1515
\PortlandLabs\Concrete5\MigrationTool\Entity\Import\Tree $tree,
16-
TreeNode $parent = null)
16+
?TreeNode $parent = null)
1717
{
1818
foreach ($node->children() as $child) {
1919
$n = new TreeNode();

src/PortlandLabs/Concrete5/MigrationTool/Importer/Wordpress/WordpressParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function validateUploadedFile(array $file, &$error)
4747
}
4848

4949
// TODO maybe $file can't be null and we need to reparse the xml inside this function too
50-
public function addContentObjectCollectionsToBatch($file = null, Batch $batch)
50+
public function addContentObjectCollectionsToBatch($file, Batch $batch)
5151
{
5252
$manager = \Core::make('migration/manager/importer/wordpress');
5353
// $simplexml = simplexml_load_file($file);

src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/CollectionPublisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class CollectionPublisher implements PublisherInterface
1212
{
13-
public function publish(AttributeKey $ak, Package $pkg = null)
13+
public function publish(AttributeKey $ak, ?Package $pkg = null)
1414
{
1515
$key = new \Concrete\Core\Entity\Attribute\Key\PageKey();
1616
$key->setAttributeKeyHandle($ak->getHandle());

src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/EventPublisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class EventPublisher implements PublisherInterface
1212
{
13-
public function publish(AttributeKey $ak, Package $pkg = null)
13+
public function publish(AttributeKey $ak, ?Package $pkg = null)
1414
{
1515
$key = new \Concrete\Core\Entity\Attribute\Key\EventKey();
1616
$key->setAttributeKeyHandle($ak->getHandle());

0 commit comments

Comments
 (0)