public function replaceTypeHintsInFile(
        string $filePath,
        string $type,
        string $dbalType,
        bool $isNullable
    ): void {
        $contents = \ts\file_get_contents($filePath);

        $search = [
            ': string;',
            '(string $',
            ': string {',
            '@var string',
            '@return string',
            '@param string',

        ];

        $replaceNormal   = [
            ": $type;",
            "($type $",
            ": $type {",
            "@var $type",
            "@return $type",
            "@param $type",
        ];
        $replaceNullable = [
            ": ?$type;",
            "(?$type $",
            ": ?$type {",
            "@var $type|null",
            "@return $type|null",
            "@param $type|null",
        ];
        $replaceRemove   = [
            ';',
            '($',
            ' {',
            '',
            '',
            '',
        ];

        $replace = $replaceNormal;

        if (\in_array($dbalType, MappingHelper::MIXED_TYPES, true)) {
            $replace = $replaceRemove;
        } elseif ($isNullable) {
            $replace = $replaceNullable;
        }

        $contents = \str_replace(
            $search,
            $replace,
            $contents
        );

        \file_put_contents($filePath, $contents);
    }