Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand All @@ -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;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);


}
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand All @@ -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']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand All @@ -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']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down