
249 P.3d 689 (2011)
NO BOUNDARIES, LTD, a Washington corporation, and NBL II, LLC, a Washington limited liability company, Appellants,
v.
PACIFIC INDEMNITY COMPANY (a member of the Chubb Group of Insurance Companies), an insurer authorized by the Washington Insurance Commissioner, Respondent.
No. 64749-1-I.
Court of Appeals of Washington, Division 1.
April 4, 2011.
*690 Christopher Gibson, Nielsen Broman & Koch PLLC, Seattle, WA for Appellants.
Benjamin Almacher Santos III, King County Prosecuting Attys. Ofc., Seattle, WA, for Respondent.
BECKER, J.
¶ 1 In this case involving insurance coverage for repairs to a damaged building, the issue is whether code upgrade coverage is available for repairs mandated by a building code that was repealed before the repairs were undertaken. We agree with the policyholder that coverage turns on the requirements of the building code at the time the damage occurred. We reject the insurer's argument that the loss is valued as of the time the repairs are made.
¶ 2 No Boundaries, LTD owns the Metropole building in Seattle's Pioneer Square. In June 2005, the building suffered water damage and part of the basement collapsed. No Boundaries made a claim with its insurer, Pacific Indemnity Company. Pacific and No Boundaries both retained experts to estimate the cost of repairing the building.
¶ 3 The policy promised to cover the repair or replacement of damaged property on a replacement cost basis. It also included coverage for repairs required by an ordinance or law. When the Metropole building was damaged in June 2005, Seattle Ordinance 121519 was in effect. Ordinance 121519 adopted provisions of the 2003 building code for commercial buildings. It had a formula or cost threshold for determining whether a damaged building had to be upgraded to code standards when it was repaired.
¶ 4 The event giving rise to this dispute was Seattle's enactment of Ordinance 122528 in October 2007. The new ordinance amended Ordinance 121519. The sections of the old ordinance critical to the issue here were repealed and replaced with provisions of the 2006 building code for commercial buildings. The new ordinance has a different formula to determine when code upgrades are required as part of the repair of damaged commercial buildings. No Boundaries alleges that the formula in the old code, Ordinance 121519, mandated certain repairs to bring the Metropole up to code and that Pacific is obligated to provide coverage for such repairs. Pacific contends that the repeal of the old code makes the old code irrelevant to the determination of what coverage, if any, is available under the Ordinance or Law provision. No Boundaries responds that the availability of code upgrade coverage has to be determined under the old code because it was the ordinance in effect when the damage occurred.
¶ 5 No Boundaries sued Pacific and sought a declaratory judgment. On Pacific's motion for partial summary judgment, the court ruled that the 2003 building code, Ordinance *691 121519, does not apply to Pacific's obligations under the policy. Based on the trial court's certification that interpretation of the policy language was a controlling question of law and no factual disputes needed to be resolved in order to decide it, we granted discretionary review under RAP 2.3(b)(4).
¶ 6 We review summary judgment orders de novo and engage in the same inquiry as the trial court. Bordeaux, Inc. v. Am. Safety Ins. Co., 145 Wash.App. 687, 693-94, 186 P.3d 1188 (2008), review denied, 165 Wash.2d 1035, 203 P.3d 380 (2009). An insurance policy should be construed as a whole, with the policy being given a fair, reasonable, and sensible construction as would be given by the average person purchasing insurance. Am. Nat'l Fire Ins. Co. v. B & L Trucking & Constr. Co., 134 Wash.2d 413, 427, 951 P.2d 250 (1998). When interpreting a policy's terms, words and phrases are not analyzed in isolation. Allstate Ins. Co. v. Peasley, 131 Wash.2d 420, 424, 932 P.2d 1244 (1997). Instead, the policy is read in its entirety and effect is given to each provision. Peasley, 131 Wash.2d at 424, 932 P.2d 1244. If the language is clear and unambiguous, the policy must be enforced as written. Am. Nat'l Fire Ins. Co., 134 Wash.2d at 428, 951 P.2d 250. Undefined terms are given their ordinary, plain, and popular meaning. Bordeaux, 145 Wash.App. at 694, 186 P.3d 1188. If the policy language is ambiguousthat is fairly susceptible to different, reasonable interpretationsthen the policy is construed in the insured's favor. Am. Nat. Fire Ins. Co., 134 Wash.2d at 428, 951 P.2d 250.
¶ 7 Two provisions of the insurance agreement between No Boundaries and Pacific are central to the dispute, the "Replacement Cost Basis" provision and the "Ordinance or Law" provision.
¶ 8 The Replacement Cost Basis provision promises that damaged property will be valued at the cost of repair "at the time of loss or damage":
Lost or damaged covered property will be valued at the cost to repair or replace such property at the time of loss or damage, but not more than you actually spend to repair or replace such property at the same or another location for the same use or occupancy. There is no deduction for physical deterioration or depreciation.
If you replace the lost or damaged covered property, the valuation will include customs duties incurred.
If you do not repair or replace the covered property, we will only pay as provided under Actual Cash Value Basis.
If you commence the repair or replacement of the lost or damaged covered property within 24 months from the date of the loss or damage, we will pay you the difference between the actual cash value previously paid and the lesser of the:
 replacement cost at the time of loss or damage; or
 actual costs you incur to repair or replace.
Payment under the Replacement Cost Basis will not be made until the completion of the repairs or the replacement of the covered property.
(Emphasis added.) This provision makes clear that the insurer will not pay for repair of damaged property until after the repair is completed. No payment is made for a repair not actually performed.
¶ 9 Appearing shortly after this provision in the insurance agreement is the Ordinance or Law provision. It promises coverage for increased costs to repair or replace a building due to an ordinance or law if certain conditions are met:
If there is an ordinance or law in effect at the time of loss or damage that regulates zoning, land use or construction of a building or personal property, and if that ordinance or law affects the repair or replacement of the lost or damaged building or personal property, and if you:
... repair or replace the building or personal property as soon as reasonably possible, the valuation will include:
....
... the increased cost to repair or replace the building to the same general size at the same site or personal property for the same general use, to the *692 minimum standards of such ordinance or law.
¶ 10 No Boundaries argues that when reading these two policy provisions together, an average layperson would conclude that it is the ordinance in effect when the damage occurs that determines the availability of code upgrade coverage under the Ordinance or Law provision.
¶ 11 The three "if" clauses in the Ordinance or Law provision set forth three conditions that must be met for the cost of code upgrades to be included in the valuation of repairs covered under the policy. First, there must be an ordinance or law in effect at the time of loss or damage that regulates zoning, land use or construction of a building or personal property. Second, that ordinance or law must "affect" the repair or replacement of the lost or damaged building or personal property. Third, the building or personal property must be repaired or replaced as soon as reasonably possible.
¶ 12 There is no issue as to the first condition. Ordinance 121519, a regulation of building construction, was in effect at the time the Metropole sustained water damage. And the third condition, whether repairs were done as soon as reasonably possible, is likewise not at issue. The stumbling block is the second requirement. Pacific argues that the second requirement is not met because the defunct code provisions do not "affect" the repair or replacement of the Metropole building.
¶ 13 The meaning of "affect" is not defined in the insurance policy. A dictionary may be used to determine a term's ordinary meaning. N. Pac. Ins. Co. v. Christensen, 143 Wash.2d 43, 48, 17 P.3d 596 (2001). Webster's lists one definition as "to act upon." WEBSTER'S THIRD NEW INTERNATIONAL DICTIONARY 35 (1993). Similarly, Black's Law Dictionary defines the word as meaning "Most generally, to produce an effect on; to influence in some way." BLACK'S LAW DICTIONARY 65 (9th ed.2009). Pacific contends that once the relevant code upgrade provisions of the former ordinance became unenforceable, they could not produce an effect upon or influence repairs made later. Pacific asserts that through its use of the term "affects," the Ordinance or Law section of the policy necessarily and unambiguously covers the cost of repairs made for code compliance only if the code requiring them is capable of being enforced at the time the repairs are made.
¶ 14 No Boundaries, on the other hand, argues that the policy uses the term "affect" to zero in on the particular subset of building code ordinances that will trigger coverage. For example, ordinance provisions regulating residential building construction in Seattle were in effect at the time of the damage, but they cannot "affect" the repair or replacement of the Metropole because it is a commercial building. Only the commercial building code can produce an effect upon or influence the repair or replacement of commercial buildings.
¶ 15 The interpretation offered by No Boundaries is reasonable. At any given time there are in effect various ordinances and laws regulating zoning, land use, and construction. The grant of coverage, having specified a large pool of ordinances in the first "if" clause, narrows it down in the second clause to those ordinances that "affect" repair of the damaged property.
¶ 16 The interpretation offered by No Boundaries is reasonable also because it is in harmony with the policy's explicit statement that lost or damaged property is to be valued at the time of loss or damage. Pacific's interpretation is not. If a code cannot "affect" a repair unless it is capable of being enforced at the time repairs are made, then the valuation date for repairs for code compliance necessarily has to be at the time repairs are made.
¶ 17 The Replacement Cost Basis provision specifies that the insurer does not have to pay until the repairs are complete. But the time of valuation is not the same as the time of payment. And there is no explicit language in the policy calling for valuation at the time of repairs. Considering that repairs frequently span a lengthy time period from beginning to end, it is unclear exactly when that valuation date would be. Using "at the time of loss or damage" as the valuation date has the advantage of simplicity.
*693 ¶ 18 The average purchaser of insurance would likely understand the policy language as a promise of payment for repairs made necessary by the code in effect at the time of loss or damage. Pacific's interpretation would frustrate the reasonable expectations of a purchaser who incurs substantial expense in planning and other activities preliminary to making the repairs, because if the municipality happens to downgrade its code requirements while the repairs are still pending, the insurer would have no obligation to pay.
¶ 19 Conceivably, interpreting the Ordinance or Law provision in favor of No Boundaries means that some insureds will have coverage for code upgrades they include in their repairs even though there is no longer a code requirement for the upgrades at the time the repairs are made. As Pacific acknowledges, however, building code requirements typically become more stringent over time, not less so. Insurers as well as policyholders would most likely understand the common sense of an interpretation that establishes the date of damage as the fixed and clear date for valuation rather than choosing a moving target.
¶ 20 We note that Pacific does not contend that No Boundaries forfeited its right to coverage for the increased cost of code compliance when it failed to repair the water damage to the Metropole while the old code was still in force. Pacific points out that it has stipulated to extending Ordinance or Law coverage to No Boundaries for the cost of compliance, if any, with code upgrades mandated by the new code, Ordinance 122528. The stipulation, however, is extraneous to the coverage issue in this appeal, and it appears to be a gift. Because Ordinance 122528 was not in effect at the time of the water damage to the Metropole, it is not an ordinance that can trigger coverage under the Ordinance or Law provision.
¶ 21 We conclude that the Ordinance or Law provision should be interpreted in accord with the policy's explicit provision for valuing the cost of repairing damaged property "at the time of loss or damage." To the extent the provision is susceptible to more than one reasonable interpretation because of its use of the term "affect," the ambiguity must be resolved in favor of No Boundaries. As a matter of law, the valuation of the cost to repair the water damage to the Metropole must include the cost of meeting the minimum standards of Ordinance 121519.
¶ 22 Reversed.
WE CONCUR: SPEARMAN and GROSSE, JJ.
