Skip to content

Commit

Permalink
Use strpos for Valve Train Design
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Jul 15, 2021
1 parent 34f9b36 commit 0880575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/nhtsa.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public static function parseDecode(array $result = Array()) : ?array
} else if (isset($result['Displacement (CC)']) && !empty($result['Displacement (CC)'])) {
$parsed_result['Engine'] .= " (". number_format($result['Displacement (CC)']) ."cc)";
}
if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strtolower($result["Valve Train Design"]) == "dual overhead cam (dohc)") {
if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strpos($result["Valve Train Design"], "DOHC") !== false) {
$parsed_result['Engine'] .= " (DOHC)";
} else if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strtolower($result["Valve Train Design"]) == "single overhead cam (sohc)") {
} else if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strpos($result["Valve Train Design"], "SOHC") !== false) {
$parsed_result['Engine'] .= " (SOHC)";
}
if (isset($parsed_result['Engine'])) {
Expand Down

0 comments on commit 0880575

Please sign in to comment.