Mark classes as final and enable strict types
This commit is contained in:
parent
7a9bf80a89
commit
730b724ac4
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\custom\Plugin\migrate\destination;
|
||||
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
|
@ -18,7 +20,7 @@ use Illuminate\Support\Collection;
|
|||
* id="opd_talk"
|
||||
* )
|
||||
*/
|
||||
class OpdTalk extends EntityContentBase {
|
||||
final class OpdTalk extends EntityContentBase {
|
||||
|
||||
protected static function getEntityTypeId($plugin_id) {
|
||||
return 'node';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\custom\Plugin\migrate\process;
|
||||
|
||||
use Drupal\migrate\MigrateExecutableInterface;
|
||||
|
@ -14,9 +16,9 @@ use Illuminate\Support\Str;
|
|||
* id = "opd_redirect"
|
||||
* )
|
||||
*/
|
||||
class OpdRedirect extends ProcessPluginBase {
|
||||
final class OpdRedirect extends ProcessPluginBase {
|
||||
|
||||
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
|
||||
public function transform($value, MigrateExecutableInterface $migrateExecutable, Row $row, $destinationProperty) {
|
||||
if (Str::startsWith($value, '/')) {
|
||||
return "internal:{$value}";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue