src/mako/database/midgard/traits/NullableTrait.php
protected function setEmptyNullablesToNull(array $values): array
	{
		$nullables = $this->getNullableColumns();

		foreach($values as $column => $value)
		{
			if($value === '' && in_array($column, $nullables))
			{
				$values[$column] = null;
			}
		}

		return $values;
	}
protected function setEmptyNullablesToNull(array $values): array
	{
		$nullables = $this->getNullableColumns();

		foreach($values as $column => $value)
		{
			if($value === '' && in_array($column, $nullables))
			{
				$values[$column] = null;
			}
		}

		return $values;
	}
protected function setEmptyNullablesToNull ( array $ values ) : array { $ nullables = $ this -> getNullableColumns ( ) ; foreach ( $ values as $ column => $ value ) { if ( $ value === '' && in_array ( $ column , $ nullables ) ) { $ values [ $ column ] = null ; } } return $ values ; }
Will replace empty strings with null if the column is nullable.

@param  array $values Values
@return array
Will replace empty strings with null if the column is nullable .