diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Batch/Validator/MessageCollection.php b/src/PortlandLabs/Concrete5/MigrationTool/Batch/Validator/MessageCollection.php index 38920b58..681c2d24 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Batch/Validator/MessageCollection.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Batch/Validator/MessageCollection.php @@ -30,7 +30,7 @@ public function add($element) return parent::add($element); } - public function addMessages(MessageCollection $collection = null) + public function addMessages(?MessageCollection $collection = null) { if (is_object($collection) && count($collection)) { foreach ($collection as $message) { diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/IgnoredTargetItem.php b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/IgnoredTargetItem.php index 6afdc292..e3831c71 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/IgnoredTargetItem.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/IgnoredTargetItem.php @@ -11,7 +11,7 @@ */ class IgnoredTargetItem extends TargetItem { - public function __construct(MapperInterface $mapper = null) + public function __construct(?MapperInterface $mapper = null) { parent::__construct($mapper); $this->setItemId(-1); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/ShortDescriptionTargetItem.php b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/ShortDescriptionTargetItem.php index 32ed7c22..d17dd1d1 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/ShortDescriptionTargetItem.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/ShortDescriptionTargetItem.php @@ -11,7 +11,7 @@ */ class ShortDescriptionTargetItem extends TargetItem { - public function __construct(MapperInterface $mapper = null) + public function __construct(?MapperInterface $mapper = null) { parent::__construct($mapper); $this->setItemId('short_description'); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/TargetItem.php b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/TargetItem.php index 209ee18f..abca0460 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/TargetItem.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/TargetItem.php @@ -37,7 +37,7 @@ class TargetItem implements TargetItemInterface protected $item_name; - public function __construct(MapperInterface $mapper = null) + public function __construct(?MapperInterface $mapper = null) { if ($mapper) { $this->item_type = $mapper->getHandle(); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/UnmappedTargetItem.php b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/UnmappedTargetItem.php index 9acdfe27..0ffd606b 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/UnmappedTargetItem.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Entity/ContentMapper/UnmappedTargetItem.php @@ -11,7 +11,7 @@ */ class UnmappedTargetItem extends TargetItem { - public function __construct(MapperInterface $mapper = null) + public function __construct(?MapperInterface $mapper = null) { parent::__construct($mapper); $this->setItemId(0); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Entity/Publisher/Log/Entry.php b/src/PortlandLabs/Concrete5/MigrationTool/Entity/Publisher/Log/Entry.php index 4d8a538d..847094d7 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Entity/Publisher/Log/Entry.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Entity/Publisher/Log/Entry.php @@ -30,7 +30,7 @@ abstract class Entry **/ protected $log; - public function __construct(LoggableObject $object = null) + public function __construct(?LoggableObject $object = null) { $this->timestamp = new \DateTime(); if (is_object($object)) { diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Importer/CIF/Element/Tree.php b/src/PortlandLabs/Concrete5/MigrationTool/Importer/CIF/Element/Tree.php index abd9d668..a147245b 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Importer/CIF/Element/Tree.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Importer/CIF/Element/Tree.php @@ -13,7 +13,7 @@ class Tree implements ElementParserInterface { protected function walk(\SimpleXMLElement $node, \PortlandLabs\Concrete5\MigrationTool\Entity\Import\Tree $tree, - TreeNode $parent = null) + ?TreeNode $parent = null) { foreach ($node->children() as $child) { $n = new TreeNode(); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Importer/Wordpress/WordpressParser.php b/src/PortlandLabs/Concrete5/MigrationTool/Importer/Wordpress/WordpressParser.php index ff512f86..e9e9bd50 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Importer/Wordpress/WordpressParser.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Importer/Wordpress/WordpressParser.php @@ -47,7 +47,7 @@ public function validateUploadedFile(array $file, &$error) } // TODO maybe $file can't be null and we need to reparse the xml inside this function too - public function addContentObjectCollectionsToBatch($file = null, Batch $batch) + public function addContentObjectCollectionsToBatch($file, Batch $batch) { $manager = \Core::make('migration/manager/importer/wordpress'); // $simplexml = simplexml_load_file($file); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/CollectionPublisher.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/CollectionPublisher.php index c7de377b..6feea601 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/CollectionPublisher.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/CollectionPublisher.php @@ -10,7 +10,7 @@ class CollectionPublisher implements PublisherInterface { - public function publish(AttributeKey $ak, Package $pkg = null) + public function publish(AttributeKey $ak, ?Package $pkg = null) { $key = new \Concrete\Core\Entity\Attribute\Key\PageKey(); $key->setAttributeKeyHandle($ak->getHandle()); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/EventPublisher.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/EventPublisher.php index 1961b338..f3ae10c9 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/EventPublisher.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/EventPublisher.php @@ -10,7 +10,7 @@ class EventPublisher implements PublisherInterface { - public function publish(AttributeKey $ak, Package $pkg = null) + public function publish(AttributeKey $ak, ?Package $pkg = null) { $key = new \Concrete\Core\Entity\Attribute\Key\EventKey(); $key->setAttributeKeyHandle($ak->getHandle()); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/ExpressPublisher.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/ExpressPublisher.php index 54657e85..eeba1506 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/ExpressPublisher.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/ExpressPublisher.php @@ -21,7 +21,7 @@ public function __construct(Entity $entity) $this->entity = $entity; } - public function publish(AttributeKey $ak, Package $pkg = null) + public function publish(AttributeKey $ak, ?Package $pkg = null) { $key = new \Concrete\Core\Entity\Attribute\Key\ExpressKey(); $key->setEntity($this->entity); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/FilePublisher.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/FilePublisher.php index d5e9b898..9ca79f38 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/FilePublisher.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/FilePublisher.php @@ -10,7 +10,7 @@ class FilePublisher implements PublisherInterface { - public function publish(AttributeKey $ak, Package $pkg = null) + public function publish(AttributeKey $ak, ?Package $pkg = null) { $key = new \Concrete\Core\Entity\Attribute\Key\FileKey(); $key->setAttributeKeyHandle($ak->getHandle()); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/PublisherInterface.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/PublisherInterface.php index 508c05ba..d7b14d97 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/PublisherInterface.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/PublisherInterface.php @@ -13,5 +13,5 @@ interface PublisherInterface * * @return \Concrete\Core\Attribute\Key\Key */ - public function publish(AttributeKey $ak, Package $pkg = null); + public function publish(AttributeKey $ak, ?Package $pkg = null); } diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/UserPublisher.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/UserPublisher.php index 946563b6..2c94c447 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/UserPublisher.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/AttributeKeyCategory/UserPublisher.php @@ -11,7 +11,7 @@ class UserPublisher implements PublisherInterface { - public function publish(AttributeKey $ak, Package $pkg = null) + public function publish(AttributeKey $ak, ?Package $pkg = null) { $key = new \Concrete\Core\Entity\Attribute\Key\UserKey(); $key->setAttributeKeyHandle($ak->getHandle()); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FatalErrorEntryFormatter.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FatalErrorEntryFormatter.php index 634c508f..1c6e8620 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FatalErrorEntryFormatter.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FatalErrorEntryFormatter.php @@ -10,7 +10,7 @@ class FatalErrorEntryFormatter extends AbstractEntryFormatter { - public function getEntryStatusElement(LoggableObject $object = null) + public function getEntryStatusElement(?LoggableObject $object = null) { $div = new Element('div', '', ['class' => 'text-danger']); $div->appendChild(new Element('span', t('Fatal Error'))); @@ -19,7 +19,7 @@ public function getEntryStatusElement(LoggableObject $object = null) return $div; } - public function getDescriptionElement(LoggableObject $object = null) + public function getDescriptionElement(?LoggableObject $object = null) { $entry = $this->entry; /** diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FormatterInterface.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FormatterInterface.php index 546f68bf..38a69b46 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FormatterInterface.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/FormatterInterface.php @@ -8,8 +8,8 @@ interface FormatterInterface { - function getEntryStatusElement(LoggableObject $object = null); - function getDescriptionElement(LoggableObject $object = null); + function getEntryStatusElement(?LoggableObject $object = null); + function getDescriptionElement(?LoggableObject $object = null); } diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishCompleteEntryFormatter.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishCompleteEntryFormatter.php index e8d987cf..9a3e79eb 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishCompleteEntryFormatter.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishCompleteEntryFormatter.php @@ -9,7 +9,7 @@ class PublishCompleteEntryFormatter extends AbstractEntryFormatter { - public function getEntryStatusElement(LoggableObject $object = null) + public function getEntryStatusElement(?LoggableObject $object = null) { $div = new Element('div', '', ['class' => 'text-success']); $div->appendChild(new Element('span', t('Complete'))); @@ -18,7 +18,7 @@ public function getEntryStatusElement(LoggableObject $object = null) return $div; } - public function getDescriptionElement(LoggableObject $object = null) + public function getDescriptionElement(?LoggableObject $object = null) { $formatter = $object->getLogFormatter(); $div = new Element('div', $formatter->getPublishCompleteDescription($object), ['class' => 'text-success']); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishStartedEntryFormatter.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishStartedEntryFormatter.php index c1f7d2e7..98e2f704 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishStartedEntryFormatter.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/PublishStartedEntryFormatter.php @@ -9,7 +9,7 @@ class PublishStartedEntryFormatter extends AbstractEntryFormatter { - public function getEntryStatusElement(LoggableObject $object = null) + public function getEntryStatusElement(?LoggableObject $object = null) { $div = new Element('div', '', ['class' => 'text-warning']); $div->appendChild(new Element('span', t('Started'))); @@ -18,7 +18,7 @@ public function getEntryStatusElement(LoggableObject $object = null) return $div; } - public function getDescriptionElement(LoggableObject $object = null) + public function getDescriptionElement(?LoggableObject $object = null) { if ($object) { $formatter = $object->getLogFormatter(); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/SkippedEntryFormatter.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/SkippedEntryFormatter.php index 72a255d8..912bd55e 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/SkippedEntryFormatter.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Formatter/Entry/SkippedEntryFormatter.php @@ -9,7 +9,7 @@ class SkippedEntryFormatter extends AbstractEntryFormatter { - public function getEntryStatusElement(LoggableObject $object = null) + public function getEntryStatusElement(?LoggableObject $object = null) { $div = new Element('div', '', ['class' => 'text-muted']); $div->appendChild(new Element('span', t('Skipped'))); @@ -18,7 +18,7 @@ public function getEntryStatusElement(LoggableObject $object = null) return $div; } - public function getDescriptionElement(LoggableObject $object = null) + public function getDescriptionElement(?LoggableObject $object = null) { $formatter = $object->getLogFormatter(); $div = new Element('div', $formatter->getSkippedDescription($object), ['class' => 'text-muted']); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Logger.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Logger.php index 2b42662b..e94a6f45 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Logger.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/Logger.php @@ -79,7 +79,7 @@ public function logMessages($messages) $this->entityManager->flush(); } - public function openLog(Batch $batch, User $user = null) + public function openLog(Batch $batch, ?User $user = null) { $log = new Log(); $log->setUser($user); diff --git a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/LoggerInterface.php b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/LoggerInterface.php index e193e227..800da5bd 100644 --- a/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/LoggerInterface.php +++ b/src/PortlandLabs/Concrete5/MigrationTool/Publisher/Logger/LoggerInterface.php @@ -14,7 +14,7 @@ interface LoggerInterface { function getLog(); - function openLog(Batch $batch, User $user = null); + function openLog(Batch $batch, ?User $user = null); function closeLog(Batch $batch); function logMessages($messages); function logEntry(Entry $entry);