Court records detail reason officials say a man fired shots inside a Tempe Walmart