(a) No person shall charge anything for keeping any horse, mare, mule, jack, or jenny which may be worked or ridden while in the possession of the taker-up.
(b) For the keeping of other animals, or the named animals if not worked or ridden, the person taking them up shall be entitled to a reasonable compensation to be adjudged by the justice of the peace before whom the owner proves his or her right of property.