| @@ -137,14 +137,14 @@ discard block | ||
| 137 | 137 | abstract public function isDirty($attributes = null); | 
| 138 | 138 | |
| 139 | 139 | /** | 
| 140 | - * Define an inverse one-to-one or many relationship. | |
| 141 | - * | |
| 142 | - * @param string $related | |
| 143 | - * @param string|null $foreignKey | |
| 144 | - * @param string|null $ownerKey | |
| 145 | - * @param string|null $relation | |
| 146 | - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |
| 147 | - */ | |
| 140 | + * Define an inverse one-to-one or many relationship. | |
| 141 | + * | |
| 142 | + * @param string $related | |
| 143 | + * @param string|null $foreignKey | |
| 144 | + * @param string|null $ownerKey | |
| 145 | + * @param string|null $relation | |
| 146 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |
| 147 | + */ | |
| 148 | 148 | abstract public function belongsTo($related, $foreignKey = null, $ownerKey = null, $relation = null); | 
| 149 | 149 | |
| 150 | 150 | /** | 
| @@ -186,30 +186,30 @@ discard block | ||
| 186 | 186 | abstract public function getKeyName(); | 
| 187 | 187 | |
| 188 | 188 | /** | 
| 189 | - * Get the parent column name. | |
| 190 | - * | |
| 191 | - * @return string | |
| 192 | - */ | |
| 189 | + * Get the parent column name. | |
| 190 | + * | |
| 191 | + * @return string | |
| 192 | + */ | |
| 193 | 193 | public function getParentColumnName(): string | 
| 194 | 194 |      { | 
| 195 | 195 | return $this->parentColumn; | 
| 196 | 196 | } | 
| 197 | 197 | |
| 198 | 198 | /** | 
| 199 | - * Get the table qualified parent column name. | |
| 200 | - * | |
| 201 | - * @return string | |
| 202 | - */ | |
| 199 | + * Get the table qualified parent column name. | |
| 200 | + * | |
| 201 | + * @return string | |
| 202 | + */ | |
| 203 | 203 | public function getQualifiedParentColumnName(): string | 
| 204 | 204 |      { | 
| 205 | 205 | return $this->getTable().'.'.$this->getParentColumnName(); | 
| 206 | 206 | } | 
| 207 | 207 | |
| 208 | 208 | /** | 
| 209 | - * Get the value of the models "parent_id" field. | |
| 210 | - * | |
| 211 | - * @return int|string | |
| 212 | - */ | |
| 209 | + * Get the value of the models "parent_id" field. | |
| 210 | + * | |
| 211 | + * @return int|string | |
| 212 | + */ | |
| 213 | 213 | public function getParentId() | 
| 214 | 214 |      { | 
| 215 | 215 | return $this->getAttribute($this->getparentColumnName()); | 
| @@ -375,20 +375,20 @@ discard block | ||
| 375 | 375 | } | 
| 376 | 376 | |
| 377 | 377 | /** | 
| 378 | - * Parent relation (self-referential) 1-1. | |
| 379 | - * | |
| 380 | - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |
| 381 | - */ | |
| 378 | + * Parent relation (self-referential) 1-1. | |
| 379 | + * | |
| 380 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |
| 381 | + */ | |
| 382 | 382 | public function parent(): BelongsTo | 
| 383 | 383 |      { | 
| 384 | 384 | return $this->belongsTo(get_class($this), $this->getParentColumnName()); | 
| 385 | 385 | } | 
| 386 | 386 | |
| 387 | 387 | /** | 
| 388 | - * Children relation (self-referential) 1-N. | |
| 389 | - * | |
| 390 | - * @return \Illuminate\Database\Eloquent\Relations\HasMany | |
| 391 | - */ | |
| 388 | + * Children relation (self-referential) 1-N. | |
| 389 | + * | |
| 390 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany | |
| 391 | + */ | |
| 392 | 392 | public function children(): HasMany | 
| 393 | 393 |      { | 
| 394 | 394 | return $this->hasMany(get_class($this), $this->getParentColumnName()) | 
| @@ -902,11 +902,11 @@ discard block | ||
| 902 | 902 | } | 
| 903 | 903 | |
| 904 | 904 | /** | 
| 905 | - * Returns the level of this node in the tree. | |
| 906 | - * Root level is 0. | |
| 907 | - * | |
| 908 | - * @return int | |
| 909 | - */ | |
| 905 | + * Returns the level of this node in the tree. | |
| 906 | + * Root level is 0. | |
| 907 | + * | |
| 908 | + * @return int | |
| 909 | + */ | |
| 910 | 910 | public function getLevel(): int | 
| 911 | 911 |      { | 
| 912 | 912 |          if (is_null($this->getParentId())) { | 
| @@ -925,7 +925,7 @@ discard block | ||
| 925 | 925 | public function isDescendantOf($other): bool | 
| 926 | 926 |      { | 
| 927 | 927 | return ( | 
| 928 | - $this->getLeft() > $other->getLeft() && | |
| 928 | + $this->getLeft() > $other->getLeft() && | |
| 929 | 929 | $this->getLeft() < $other->getRight() && | 
| 930 | 930 | $this->inSameScope($other) | 
| 931 | 931 | ); | 
| @@ -940,7 +940,7 @@ discard block | ||
| 940 | 940 | public function isSelfOrDescendantOf($other): bool | 
| 941 | 941 |      { | 
| 942 | 942 | return ( | 
| 943 | - $this->getLeft() >= $other->getLeft() && | |
| 943 | + $this->getLeft() >= $other->getLeft() && | |
| 944 | 944 | $this->getLeft() < $other->getRight() && | 
| 945 | 945 | $this->inSameScope($other) | 
| 946 | 946 | ); | 
| @@ -955,7 +955,7 @@ discard block | ||
| 955 | 955 | public function isAncestorOf($other): bool | 
| 956 | 956 |      { | 
| 957 | 957 | return ( | 
| 958 | - $this->getLeft() < $other->getLeft() && | |
| 958 | + $this->getLeft() < $other->getLeft() && | |
| 959 | 959 | $this->getRight() > $other->getLeft() && | 
| 960 | 960 | $this->inSameScope($other) | 
| 961 | 961 | ); | 
| @@ -970,7 +970,7 @@ discard block | ||
| 970 | 970 | public function isSelfOrAncestorOf($other): bool | 
| 971 | 971 |      { | 
| 972 | 972 | return ( | 
| 973 | - $this->getLeft() <= $other->getLeft() && | |
| 973 | + $this->getLeft() <= $other->getLeft() && | |
| 974 | 974 | $this->getRight() > $other->getLeft() && | 
| 975 | 975 | $this->inSameScope($other) | 
| 976 | 976 | ); | 
| @@ -1342,8 +1342,8 @@ discard block | ||
| 1342 | 1342 | ->where($self->getLeftColumnName(), '>', $self->getLeft()) | 
| 1343 | 1343 | ->where($self->getRightColumnName(), '<', $self->getRight()) | 
| 1344 | 1344 | ->update([ | 
| 1345 | - $self->getDeletedAtColumn() => null, | |
| 1346 | -          $self->getUpdatedAtColumn() => $self->{$self->getUpdatedAtColumn()}, | |
| 1345 | + $self->getDeletedAtColumn() => null, | |
| 1346 | +            $self->getUpdatedAtColumn() => $self->{$self->getUpdatedAtColumn()}, | |
| 1347 | 1347 | ]); | 
| 1348 | 1348 | }); | 
| 1349 | 1349 | } |