public function insert($tableName, array $data, array $types = []): int
    {
        $modified = $this->shallModifyIdentityInsert($data)
            && $this->modifyIdentityInsert($tableName, true);

        $result = parent::insert($tableName, $data, $types);

        if ($modified) {
            $this->modifyIdentityInsert($tableName, false);
        }

        return $result;
    }
public function insert($tableName, array $data, array $types = []): int
    {
        $modified = $this->shallModifyIdentityInsert($data)
            && $this->modifyIdentityInsert($tableName, true);

        $result = parent::insert($tableName, $data, $types);

        if ($modified) {
            $this->modifyIdentityInsert($tableName, false);
        }

        return $result;
    }
public function insert ( $ tableName , array $ data , array $ types = [ ] ) : int { $ modified = $ this -> shallModifyIdentityInsert ( $ data ) && $ this -> modifyIdentityInsert ( $ tableName , true ) ; $ result = parent :: insert ( $ tableName , $ data , $ types ) ; if ( $ modified ) { $ this -> modifyIdentityInsert ( $ tableName , false ) ; } return $ result ; }
Wraps insert execution in order to consider SQL Server IDENTITY_INSERT.

@param string $tableName
@param array $data
@param array $types
@return int
Wraps insert execution in order to consider SQL Server IDENTITY_INSERT .