I noticed it in many poems that the verses do not contain words according to proper grammar rules. I was told that poets are allowed to do that to incorporate the rhyming words.
For example, in the famous Daffodils, it is written:
And then my heart with pleasure fills
And then my heart fills with pleasure
There are other examples in the same poem, but it is a very common construct I have noticed.
What is it called?