Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Ne..
Decoded Output download
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\UserMigration;
/**
* Basic version handling: we can import older versions but not newer ones
* @since 24.0.0
*/
trait TMigratorBasicVersionHandling {
protected int $version = 1;
protected bool $mandatory = false;
/**
* {@inheritDoc}
* @since 24.0.0
*/
public function getVersion(): int {
return $this->version;
}
/**
* {@inheritDoc}
* @since 24.0.0
*/
public function canImport(
IImportSource $importSource
): bool {
$version = $importSource->getMigratorVersion($this->getId());
if ($version === null) {
return !$this->mandatory;
}
return ($this->version >= $version);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\UserMigration;
/**
* Basic version handling: we can import older versions but not newer ones
* @since 24.0.0
*/
trait TMigratorBasicVersionHandling {
protected int $version = 1;
protected bool $mandatory = false;
/**
* {@inheritDoc}
* @since 24.0.0
*/
public function getVersion(): int {
return $this->version;
}
/**
* {@inheritDoc}
* @since 24.0.0
*/
public function canImport(
IImportSource $importSource
): bool {
$version = $importSource->getMigratorVersion($this->getId());
if ($version === null) {
return !$this->mandatory;
}
return ($this->version >= $version);
}
}
Function Calls
None |
Stats
MD5 | c778994beb5f73b86c5c5e55672998f1 |
Eval Count | 0 |
Decode Time | 133 ms |