(after stating the facts as above).
While it appears that the ordinance of 1881 was, in terms, repealed by the subsequently enacted ordinances, it is the theory of plaintiff that the below referred to action of the Süpreme Court of Illinois, in holding invalid the subsequent ordinances, left that of 1881 in full force, as though its repeal had not been undertaken. Granting this contention, we are first met with the question of the validity of the ordinance of 1881. Save only as to the different provisions of the subsequent ordinances, requiring the surplus of fees collected over $300 per month to be turned into the city treasury, this ordinance is subject practically to the same objections pointed out by the Illinois Supreme Court in City of Chicago v. Burke, 226 Ill. 191, 80 N. E. 720. By the statute of 1874 the Regislature assumed control over the subject of oil inspection, and its enactment thereon covers the subject, giving to the municipality only the function of appointing the inspector, who is to act in the city, and the fixing of his compensation. . The ordinance of 1881, like those that follow it, purports to be a complete codification of the subject,'just as though the Regislature had not acted thereon. In the main, the conflicting and additional provisions of this ordinance are like those of the subsequent ordinances, held to be invalid as covering a subject with which the city council was not empowered to deal., That plaintiff purported to act only under the authority of the ordinance is quite as plain here as in'the Burke Case, where the court held that, purporting so to act, and basing his authority upon these subsequently en*37acted ordinances, Burke was neither an officer de jure nor de facto; the ordinance under which he assumed to act being held void in toto-. A similar conclusion was reached by the same court, in an action by this plaintiff in error under such subsequent ordinance to compel the city of Chicago to refund to him the fees he had collected and paid into the treasury over and above the $300 per month. Ploner et al. v. City of Chicago, 248 Ill. 392, 94 N. E. 46. In the interest of brevity, we will not enter into an analysis of these cases, but they are referred to for better understanding of what was there decided.
i[2] But there is in the ordinance of 1881 an infirmity not found in the subsequent ordinances, in that it provides:
“The inspector may charge not to exceed 6 cents for inspecting or examining each package, cask or barrel and collect the same of the party -employing him.”
This leaves it entirely within the discretion of the inspector whether, up to 6 cents, he will charge much or little or anything at all. It is not even undertaken, as in the ordinance of 1905, to fix a unit — such as a barrel — and in case of a large container or package, such as a tank car, not to be drawn off into smaller packages, the fee would not be different from that on a barrel. The ordinance fixes no guide or rule whatever for the exercise of the inspector’s discretion, leaving the entire matter of charge, up to the maximum, to his own will. This is an unwarranted delegation of power, and, generally speaking, an ordinance conferring it is unreasonable and void. Yick Wo v. Hopkins, 118 U. S. 356, 6 Sup. Ct. 1064, 30 L. Ed. 220; Cicero Lumber Co. v. Town of Cicero, 176 Ill. 9, 51 N. E. 758, 42 L. R. A. 696, 68 Am. St. Rep. 155; City of Chicago v. John Trotter, 136 Ill. 430, 26 N. E. 359; City of East St. Louis v. Wehrung, 50 Ill. 28; Mayor, etc., v. Radecke, 49 Md. 217, 33 Am. Rep. 239.
In one Illinois case, where the statute provided for a maximum fee of $10 and a minimum fee of $6 for inspecting mines, and further provided that the fee- should depend on the length of time consumed and the expense necessarily incurred in inspection, the court held that, in view of the great difference in the character of mines, it would not be practicable to fix a fee which would be the same in all cases, nor to prescribe exact rules for fixing the fee within the prescribed limits, 'and this statute was upheld. Consolidated Coal Co. v. People, 186 Ill. 134, 57 N. E. 880, 56 L. R. A. 266. On error to the United States Supreme Court, in the affirming opinion it was pointed out that the inspection fee, within the stated limits, would depend upon the time and -expense involved in the inspection of the mines, and that the compensation of the inspector was in no way dependent upon the fees collected, but if the fees were not sufficient to pay the fixed salary, the balance should be paid out of the treasury. The court said:
“If his discretion were unlimited in this direction, and the fees were retained by himself, 'there would be much force in the suggestion.” St. Louis Consolidated Coal Co. v. Illinois, 185 U. S. 203, 22 Sup. Ct. 616, 46 L. Ed. 872.
As stated, in the case at bar, the amount, within the maximum, is determinable wholly by the will of the inspector, who, under this or*38dinance, takes for his compensation the entire amount of all fees collected. We are satisfied that for this reason alone the ordinance of 1881 was void.
To plaintiff’s insistence that he was an officer acting under the statute of 1874 (as subsequently amended in respects not material here) we repeat that this contention is effectually disposed of by the Burke and Ploner Cases, supra.
It is further contended that, regardless of ordinances or statute, the inspection was done at the request of defendant, and that, being a service performed at its request, defendant should pay. While it may be that defendant would notify plaintiff, according to the terms of the ordinance, that it had gasoline, and even requested him to inspect it, it nevertheless consistently denied the validity of the ordinance as to gasoline, and refused to pay. The inspector was evidently willing to take his chance, since he would in no event have been required to inspect, where the owner of the oil said in advance he would not pay. The inspecting of the oil was not a service to the defendant, in the sense that it was a physical improvement to its property or added to its value. The object of the inspection was clearly not to the special interest and benefit of the, defendant, 'but presumably of the public. No doubt, when the defendant brought oils to market and represented them to be of suitable quality for intended use, defendant was sufficiently satisfied of its own good faith and the propriety of its practices, that for its benefit and protection no inspection was needed. The inspection was in effect a checking up of the dealer’s representation, actual or implied, of quality and fitness for use of oils offered in the Chicago market. Surely here, where admittedly the plaintiff, out of the fees collected, has already received all that he contracted to receive by way of his personal compensation for all the service that he rendered, there is not that impelling reason for sustaining his claim as is to be found in some cases cited, where under void ordinances work was done and materials furnished with consent of the property owner, which physically and substantially improved and enhanced the value of his property.
It was further contended that the entire invalidity of the ordinance was not asserted in the reasons given by defendant for refusing to pay the bills rendered for gasoline inspection, but that these were challenged only because of the claim that gasoline could not lawfully be included, while recognizing the right to collect on kerosene, and that, if gasoline and kerosene are held to be in the same relation, the payment of the bills for inspecting kerosene is a recognition of the validity of the ordinance, and the defendant cannot now “change his hold.” This is rather far-fetched. We do nqt think that payment upon the kerosene inspected has any bearing on the question. The persistent refusal to pay for inspecting the gasoline was predicated upon the alleged invalidity of the ordinance as to gasoline, and payment was to await determination of that question. If the ordinance was subsequently found entirely void, it was void as to gasoline, as well as kerosene. Surely, it has not yet been held valid, and the stated condition under which defendant agreed to pay for inspecting the gasoline has *39not yet come to pass. Indeed, it does not appear that plaintiff was then asserting liability under the ordinance of 1881, or the claim that he was then an officer under the statute. These are contentions which did not arise until the litigation began, and we find nothing in the conduct of the defendant to prevent insistence now on the invalidity of the ordinance of 1881.
Respecting plaintiff’s contention that the defendant, being a nonresident corporation, may not raise the question of the invalidity of the ordinance, the case does not even fall within the line of authorities referred to in the plaintiff’s briefs and argument, to the effect that such a corporation may not object to the invalidity of an ordinance properly passed under the authority of a statute, notwithstanding such statute is subsequently held to be invalid. As has been seen, the ordinances here considered in and of themselves transgress the statute, to which we must look for authority to enact any ordinance on the subject; and having been enacted without statutory authority, they are void for all purposes, and are not more binding upon nonresident corporations than on others. Unless it is the law that a foreign corporation, authorized to do business in another state, must submit to any imposition upon it by a purported municipal ordinance, passed without authority and utterly void as to all individuals and domestic corporations, plaintiffs contention in this regard is without foundation. The mere statement of such a proposition negatives it.
The judgment is affirmed.