src/Hydrator.php
protected function ensureMissingValuesAreNull(array $json, string $class): array
    {
        foreach ($this->getReflectionClassProperties($class) as $key) {
            if (isset($json[$key])) {
                continue;
            }

            $json[$key] = null;
        }

        return $json;
    }
protected function ensureMissingValuesAreNull(array $json, string $class): array
    {
        foreach ($this->getReflectionClassProperties($class) as $key) {
            if (isset($json[$key])) {
                continue;
            }

            $json[$key] = null;
        }

        return $json;
    }
protected function ensureMissingValuesAreNull ( array $ json , string $ class ) : array { foreach ( $ this -> getReflectionClassProperties ( $ class ) as $ key ) { if ( isset ( $ json [ $ key ] ) ) { continue ; } $ json [ $ key ] = null ; } return $ json ; }
Ensure all properties expected by resource are available.

@param  array  $json
@param  string $class
@return array
Ensure all properties expected by resource are available .