diff --git a/src/Diff/EntityDiff.php b/src/Diff/EntityDiff.php index 0ce8f341..3b9996cd 100644 --- a/src/Diff/EntityDiff.php +++ b/src/Diff/EntityDiff.php @@ -83,7 +83,7 @@ protected function fixSubstructureDiff( array &$operations, $key ) { * @return Diff */ public function getAliasesDiff() { - return isset( $this['aliases'] ) ? $this['aliases'] : new Diff( [], true ); + return $this['aliases'] ?? new Diff( [], true ); } /** @@ -94,7 +94,7 @@ public function getAliasesDiff() { * @return Diff */ public function getLabelsDiff() { - return isset( $this['label'] ) ? $this['label'] : new Diff( [], true ); + return $this['label'] ?? new Diff( [], true ); } /** @@ -105,7 +105,7 @@ public function getLabelsDiff() { * @return Diff */ public function getDescriptionsDiff() { - return isset( $this['description'] ) ? $this['description'] : new Diff( [], true ); + return $this['description'] ?? new Diff( [], true ); } /** @@ -116,7 +116,7 @@ public function getDescriptionsDiff() { * @return Diff */ public function getClaimsDiff() { - return isset( $this['claim'] ) ? $this['claim'] : new Diff( [], true ); + return $this['claim'] ?? new Diff( [], true ); } /** diff --git a/src/Diff/ItemDiff.php b/src/Diff/ItemDiff.php index a57a803f..b6fedbba 100644 --- a/src/Diff/ItemDiff.php +++ b/src/Diff/ItemDiff.php @@ -30,7 +30,7 @@ public function __construct( array $operations = [] ) { * @return Diff */ public function getSiteLinkDiff() { - return isset( $this['links'] ) ? $this['links'] : new Diff( [], true ); + return $this['links'] ?? new Diff( [], true ); } /**