Question: What code was named after the man who also had Fort Kearny named after him?

Context paragraphs:
Dobytown, Nebraska: Dobytown is a ghost town in Kearney County, Nebraska, United States, three miles west of Fort Kearny.  Officially named Kearney City, the community was established in 1859.  The town was given the common name of "Dobytown" because it contained mostly adobe buildings.  Although the community no longer exists, the site was added to the National Register of Historic Places in 1974.  The site is located at an altitude of 2,129 feet (649 m).

Kearney County, Nebraska: Kearney County is a county located in the U.S. state of Nebraska.  As of the 2010 census, the population was 6,489.  Its county seat is Minden.  The county was formed in 1860.  It was named after Fort Kearny, which in turn was named after Brigade General Stephen W. Kearny.

Great Platte River Road: The Great Platte River Road was a major overland travel corridor approximately following the course of the Platte River in present-day Nebraska and Wyoming that was shared by several popular emigrant trails during the 19th century, including the Trapper's Trail, the Oregon Trail, the Mormon Trail, the California Trail, the Pony Express route, and the military road connecting Fort Leavenworth and Fort Laramie.  The road, which extended nearly 800 mi from the Second Fort Kearny to Fort Laramie, was utilized primarily from 1841 to 1866.  In modern times it is often regarded as a sort of superhighway of its era, and has been referred to as "the grand corridor of America's westward expansion".

Kearny Code: The Kearny Code is a legal code named after General Stephen W. Kearny.  The Kearny Code was promulgated in Santa Fe, New Mexico on September 22, 1846 for use in the New Mexico Territory, as occupied by the United States Army during the U.S.-Mexican War.  Four days later General Kearny left for Alta California.

Midland Pacific Railway: The Midland Pacific Railway was a railroad operating in the Nebraska counties of Lancaster, Nemaha, Otoe, Seward, and York.  It was organized in 1868 in Nebraska City.  It ran from there to Fort Kearny.  After much local fundraising, Midland Pacific built into the new capital city of Lincoln on April 22, 1871.   In 1875, it merged with the Brownville, Fort Kearney and Pacific Rail Road to form the Nebraska Railway.

Fort Kearny (Washington, D.C.): Fort Kearny was a fort constructed during the American Civil War as part of the defenses of Washington, D.C. Located near Tenleytown, in the District of Columbia, it filled the gap between Fort Reno and Fort DeRussy north of the city of Washington.  The fort was named in honor of Maj. Gen. Philip Kearny of the Union Army, who was killed at the Battle of Chantilly on September 1, 1862.  Three batteries of guns (Battery Rossell, Battery Terrill, and Battery Smead) supported the fort, and are considered part of the fort's defenses.

Fort Kearny: Fort Kearny was a historic outpost of the United States Army founded in 1848 in the western U.S. during the middle and late 19th century.  The fort was named after Col. and later General Stephen W. Kearny.  The outpost was located along the Oregon Trail near Kearney, Nebraska.  The town of Kearney took its name from the fort.  The "e" was added to Kearny by postmen who consistently misspelled the town name.

Fort Kearny (Rhode Island): Fort Kearny was a coastal defense fort in the Saunderstown area of Narragansett, Rhode Island from 1901 to 1943.  It was a prisoner-of-war camp for German prisoners in 1945.  It is now the Narragansett Bay Campus of the University of Rhode Island.  In many sources it is spelled Fort Kearney.

Fort Phil Kearny: Fort Phil Kearny was an outpost of the United States Army that existed in the late 1860s in present-day northeastern Wyoming along the Bozeman Trail.  Construction began Friday July 13, 1866 by Companies A, C, E and H of the 2nd Battalion, 18th Infantry, under the direction of the regimental commander and Mountain District commander Colonel Henry B. Carrington.  The post was named for Maj. Gen. Philip Kearny, a popular figure in the American Civil War.  The fort should be distinguished from the similarly named Fort Kearny in Nebraska, which was named for Kearny's uncle Stephen W. Kearny.  Today, the fort and the nearby Fetterman and Wagon Box battle sites are maintained by the State of Wyoming as the Fort Phil Kearny State Historic Site.

Stephen W. Kearny: surname also appears as Kearney in some historic sources; August 30, 1794October 31, 1848), was one of the foremost antebellum frontier officers of the United States Army.  He is remembered for his significant contributions in the Mexican–American War, especially the conquest of California.  The Kearny code, which was proclaimed on September 22, 1846 in Santa Fe, established the law and government of the newly acquired territory of New Mexico, was named after him.  His nephew was Major General Philip Kearny of American Civil War fame.

Supporting paragraphs: Fort Kearny Stephen W. Kearny
Answer: The Kearny code