Skip to content

Commit

Permalink
Remove unneeded casting
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Mar 7, 2022
1 parent 9075779 commit f262ee7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/fields/VizyField.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,6 @@ public static function valueType(): string
// Public Methods
// =========================================================================

public function __construct($config = [])
{
// Config normalization
if (array_key_exists('fieldData', $config)) {
if (is_string($config['fieldData'])) {
$config['fieldData'] = Json::decodeIfJson($config['fieldData']);
}

if (!is_array($config['fieldData'])) {
$config['fieldData'] = [];
}
}

if (array_key_exists('vizyConfig', $config)) {
if (is_string($config['vizyConfig'])) {
$config['vizyConfig'] = Json::decodeIfJson($config['vizyConfig']);
}

if (!is_array($config['vizyConfig'])) {
$config['vizyConfig'] = [];
}
}

parent::__construct($config);
}

public function getContentColumnType(): array|string
{
return $this->columnType;
Expand Down

0 comments on commit f262ee7

Please sign in to comment.