- Some minors adjustments to match PHP 8.x coding styles
This commit is contained in:
1 parent
3736fbe0f6
commit
fed7d2e302
4 files changed
+23
-19
No files matched your search
+4
-6
@@ -62,7 +62,7 @@ trait EntityTrait {
|
||||
$data = json_decode($value, true);
|
||||
|
||||
if (json_last_error() !== \JSON_ERROR_NONE) {
|
||||
throw new \Exception(sprintf("JSON error while decoding in EntityTrait : '%s' given %s with field %s", json_last_error_msg(), $value, json_encode($field)));
|
||||
throw new \Exception(sprintf("JSON error while decoding in EntityTrait : '%s' given %s", json_last_error_msg(), $value));
|
||||
}
|
||||
|
||||
$this->{$field['name']} = $data;
|
||||
@@ -123,11 +123,9 @@ trait EntityTrait {
|
||||
public function resetVirtualProperties() : self
|
||||
{
|
||||
foreach($this->resolveEntity()->properties as $prop => $property) {
|
||||
if ( empty($property['builtin']) ) {
|
||||
foreach($property['tags'] as $tag) {
|
||||
if ( in_array(strtolower($tag['tag']), [ 'relation', 'join', 'virtual' ] ) ) {
|
||||
unset($this->$prop);
|
||||
}
|
||||
foreach($property['tags'] as $tag) {
|
||||
if ( in_array(strtolower($tag['tag']), [ 'relation', 'join', 'virtual' ] ) ) {
|
||||
unset($this->$prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user