Does the code below violates Liskov Substitution Principle (LSP)?
No.
The code is not an example of Liskov Substitution Principle (LSP), so it does not violate Liskov Substitution Principle.
q.v. this answer regarding LSP: https://stackoverflow.com/a/584732/4641116