PHPackages                             amattu2/state-inspection-lookup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. amattu2/state-inspection-lookup

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

amattu2/state-inspection-lookup
===============================

This is a PHP wrapper for finding U.S. state inspection reports by a VIN number using various proprietary DMV endpoints

v1.0.0(3y ago)114AGPL-3.0PHP

Since Mar 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/amattu2/state-inspection-lookup)[ Packagist](https://packagist.org/packages/amattu2/state-inspection-lookup)[ RSS](/packages/amattu2-state-inspection-lookup/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (2)Used By (0)

Introduction
============

[](#introduction)

This is a basic library/wrapper for digital vehicle state safety/emissions inspection record lookups. If you need to check the last date(s) a vehicle was state inspected, and you know the state, this library is for you. A few states also support returning information on the last emissions/smog test. Originally designed for integration within a automotive service management SaaS application.

States Supported
================

[](#states-supported)

StateSupported OperationsNotesMaryland[Emissions/Smog](http://mva.mdveip.com/), [Safety](https://egov.maryland.gov/msp/vsi/api/Lookup/Inspections?vehicleVin=)Pending further tests, but it appears that MD only keeps the e-inspection record until it expires (6 months)Usage
=====

[](#usage)

Install
-------

[](#install)

Using composer

```
composer require amattu2/state-inspection-lookup
```

Manually

```
git clone https://github.com/amattu2/state-inspection-lookup
```

Files
-----

[](#files)

Composer: Import the autoload

```
require("vendor/autoload.php");
```

Manually: Import the core files

```
require("src/Inspections.php");
require("src/StateInspectionBase.php");
require("src/StateInspectionInterface.php");
require("src/Utils.php");
```

Functions
---------

[](#functions)

### Inspections::all

[](#inspectionsall)

Retrieve all inspection types (smog/safety inspections)

```
$all = amattu2\Inspections::all("VIN", "STATE_ABBR");
```

`VIN` is the 17 digit VIN number of the vehicle of interest. `STATE_ABBR` is the *2 digit* [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) state abbreviation.

Returns an array containing `Emissions`, `Safety` multi-dimensional arrays.

### Inspections::safety

[](#inspectionssafety)

Retrieve all state safety (mechanical) inspection reports.

PHPDoc

```
/**
 * A endpoint wrapper to return a structured state safety inspection search result
 * All return attributes are nullable, given that each state returns different information.
 *
 * @param string VIN number
 * @return array Array
