Grade
Issues
-
Complexity
2
Duplication
-
Coverage
-
1<?php 2namespace Tests\Functional\BehatContext; 3 4use Behat\Behat\Context\Context; 5 6class AbstractContext implements Context 7{ 8 public function jsonDecode(string $encodedData) 9 { 10 $decoded = json_decode($encodedData, true); 11 12 if (JSON_ERROR_NONE != json_last_error()) { 13 throw new \Exception( 14 json_last_error_msg(), 15 json_last_error() 16 ); 17 } 18 19 return $decoded; 20 } 21}
No issues found
Good job! Your file does not have any issues.