Opinion by
Mr. Justice Elkin,For many years controversies growing out of the imposition of license fees or taxes have arisen between public service corporations and the municipalities in which they do business. *63A large number of such cases have been considered by our appellate courts, and the rules of law heretofore applicable thereto may be found in repeated decisions of the Supreme Court from Allentown v. Western Union Tel. Company, 148 Pa. 117, to Kittanning Boro. v. Gas Company, 219 Pa. 250, and of the Superior Court from Ridley Park Boro. v. Electric Light, etc., Company, 9 Pa. Superior Ct. 615, to Kittanning Boro. v. Water Company, 35 Pa. Superior Ct. 174. These cases are all founded upon ordinances passed prior to the act of 1905, and while they were actions at law they were considered as if upon certiorari to determine the legal rights of the parties and without reference to the statutory proceedings authorized by said act. The right to impose these license fees was sustained as a police power, but it was uniformly pointed out that general revenue for the support of the municipal government could not be raised under the guise of a license tax for police regulation. This principle has been recognized in every case, and in no instance has it been suggested that it might be modified or varied or weakened in its application. It is true that under the old forms of action it was often difficult for an appellate court to pass upon questions of fact necessary to determine whether a particular ordinance under consideration did impose a revenue tax or a license fee. Because of this limitation upon the courts the practice became quite general throughout the commonwealth to establish flat rates per pole, per mile or per car as the case might be, upon an arbitrary basis and without reference to the cost of police inspection or supervision. An examination of the cases will show that the municipalities were given a wide latitude in the imposition of these license charges and their right to do so was not interfered with unless for gross abuse. This was the situation when the act of 1905 was passed, and this legislation grew out of the unsatisfactory methods then existing for the determination of such controversies. The purpose of the act is stated to be the providing of a method for the determination by the courts of common pleas, with the right of appeal, of all disputes between municipalities and telegraph, telephone, light and power companies, relating to the reasonableness' of the amount of license fees. In the third section of the *64act the duty is imposed upon the court hearing the cause to determine the amount of the annual license fees necessary to properly compensate the municipality for the cost of the services performed, or to be performed, by it for the inspection and regulation of the poles, wires, conduits or cables belonging to such public service corporations and located within the limits of the municipality. This is a statutory rule binding upon the courts. The amount of the license fees to be charged is measured by the cost of the service performed or to be performed during the year for municipal inspection and regulation. If there be no inspection or supervision by the municipality there can be no license fee imposed, because under such circumstances no expense would be incurred for which the statute makes the companies liable. If there be inspection and supervision, the measure of liability imposed by the act is the cost of the same to the municipality. The cost of the service is the rule adopted by the legislature to guide the courts in determining the disputes between the parties. This rule cannot be ignored or lightly set aside, and it should be the central and controlling thought in the mind of the court in the determination of such disputes. Of course, when the ordinance is passed in advance of any service rendered it may and no doubt will be difficult to fix with mathematical precision the amount of the license fee before the cost of the service is definitely known, and some reasonable allowance must necessarily be made for contingencies that may happen. However, the courts should see to it that under the guise of a reasonable allowance the municipality is not permitted to impose a tax for general municipal purposes, or to disregard the rule which limits the license fee to the cost of inspection. Under this rule no flat per pole or per mile charge can be made applicable throughout the commonwealth, because in no two cases will the cost of inspection be the same. Many boroughs do not inspect at all, and in such cases no license fee can be charged. Other boroughs may require very little inspection, while others may need more, but in each instance the inquiry must be, what is the cost? The legislature fixed the rule and imposed the duty to determine all such controversies according- to that rule upon the courts *65when proper preceedings are instituted. The rule is imperative and cannot be disregarded.
Another question raised by this appeal is whether the borough authorities in the present case were justified in making any provision for inspection and regulation. It is contended that the inspection by the companies was ample and sufficient to protect the public, and that no municipal inspection was. necessary. It is true that the courts have held companies furnishing electricity or operating by electrical forces to the very highest degree of care by way of inspection and maintenance. It is meet and right to do so, because of the great danger to the public having to deal with such agencies. The duty of inspection and maintenance imposed by law upon these companies can be more safely relied on as a protection to the public than the casual and indifferent inspection made by a borough officer without any technical knowledge of the business. There are many things, however, which the borough may properly do by way of police regulation. It can require the poles to be kept in proper condition, the wires in safe repair, and see to it that the conduits and other appliances do not interfere with the public use of the streets. Reasonable latitude must be allowed the municipalities in dealing with this subject, but on the other hand they should not be permitted to make useless and unnecessary inspections at the cost of the operating companies. This is also a question for the courts to determine in a proceeding instituted under the Act of April 17, 1905, P. L. 183. In the case at bar we think the borough was justified in requiring the inspection directed by the ordinance, and hence the only question for determination is as to the amount of the license fee imposed. The learned judge of the court of common pleas treated the question upon the theory that the borough ordinance should be sustained on the presumption that it was reasonable without reference to whether it was based upon the cost of inspection or not. In this we think there was error. "When the petition was filed under the act of 1905, the proceedings were de novo, and it was the duty of the court to hear and determine the questions involved upon the pleadings, having due regard for the weight of the evidence. The Superior Court on appeal took *66up the question and did modify the decree entered in the court below by fixing the amount of the license fees upon the basis of the cost of inspection, although there may be some doubt as to the strict application of the rule in arriving at the proper amount to be charged. The case was very intelligently considered by the learned judge who wrote the opinion and since the amount involved in this particular case is small, no useful purpose can be served by prolonging the controversy. The per pole and per mile license fee charged in this case cannot be taken as a precedent on which to base charges in other municipalities throughout the commonwealth, because each case must depend upon its own facts and in every case the cost of inspection must be the measure of liability.
Decree affirmed and record remitted to the court below with instructions to enter judgment in favor of the borough of Sharon Hill for the amount of the license fees as fixed by the Superior Court.
The costs on the appeal to this court to be paid by appellant and all other costs to be paid as directed by the decree of the Superior Court.