src/Core/Manifest/ClassManifest.php
protected function validateItemCache($data)
    {
        if (!$data || !is_array($data)) {
            return false;
        }
        foreach (['classes', 'interfaces', 'traits'] as $key) {
            // Must be set
            if (!isset($data[$key])) {
                return false;
            }
            // and an array
            if (!is_array($data[$key])) {
                return false;
            }
            // Detect legacy cache keys (non-associative)
            $array = $data[$key];
            if (!empty($array) && is_numeric(key($array))) {
                return false;
            }
        }
        return true;
    }
protected function validateItemCache($data)
    {
        if (!$data || !is_array($data)) {
            return false;
        }
        foreach (['classes', 'interfaces', 'traits'] as $key) {
            // Must be set
            if (!isset($data[$key])) {
                return false;
            }
            // and an array
            if (!is_array($data[$key])) {
                return false;
            }
            // Detect legacy cache keys (non-associative)
            $array = $data[$key];
            if (!empty($array) && is_numeric(key($array))) {
                return false;
            }
        }
        return true;
    }
protected function validateItemCache ( $ data ) { if ( ! $ data || ! is_array ( $ data ) ) { return false ; } foreach ( [ 'classes' , 'interfaces' , 'traits' ] as $ key ) { // Must be set if ( ! isset ( $ data [ $ key ] ) ) { return false ; } // and an array if ( ! is_array ( $ data [ $ key ] ) ) { return false ; } // Detect legacy cache keys (non-associative) $ array = $ data [ $ key ] ; if ( ! empty ( $ array ) && is_numeric ( key ( $ array ) ) ) { return false ; } } return true ; }
Verify that cached data is valid for a single item

@param array $data
@return bool
Verify that cached data is valid for a single item