(a) Finding and authority of court.— If the court as a matter of law finds the contract or any clause of the contract to have been unconscionable at the time it was made, the court may:
- (1) refuse to enforce the contract;
- (2) enforce the remainder of the contract without the unconscionable clause; or
- (3) so limit the application of any unconscionable clause as to avoid any unconscionable result.
- (b) Evidence by parties.— When it is claimed or appears to the court that the contract or any clause thereof may be unconscionable the parties shall be afforded a reasonable opportunity to present evidence as to its commercial setting, purpose and effect to aid the court in making the determination.