Auguste Comte said this quote

Each department of knowledge passes through three stages. The theoretic stage the theological stage and the metaphysical or abstract stage.