protected static function getDevicesFromStorage()
    {
        try {
            $file = (static::$deviceFile !== null) ? static::$deviceFile : WS::config()->get('device_storage');
            $content = @file_get_contents($file);
            if (!empty($content)) {
                $devices = json_decode($content, true);
                if(isset($devices['device'])){
                    return $devices['device'];
                }

                return $devices;
            } else {
                return null;
            }
        } catch (\Exception $e) {
            return null;
        }
    }
protected static function getDevicesFromStorage()
    {
        try {
            $file = (static::$deviceFile !== null) ? static::$deviceFile : WS::config()->get('device_storage');
            $content = @file_get_contents($file);
            if (!empty($content)) {
                $devices = json_decode($content, true);
                if(isset($devices['device'])){
                    return $devices['device'];
                }

                return $devices;
            } else {
                return null;
            }
        } catch (\Exception $e) {
            return null;
        }
    }
protected static function getDevicesFromStorage ( ) { try { $ file = ( static :: $ deviceFile !== null ) ? static :: $ deviceFile : WS :: config ( ) -> get ( 'device_storage' ) ; $ content = @ file_get_contents ( $ file ) ; if ( ! empty ( $ content ) ) { $ devices = json_decode ( $ content , true ) ; if ( isset ( $ devices [ 'device' ] ) ) { return $ devices [ 'device' ] ; } return $ devices ; } else { return null ; } } catch ( \ Exception $ e ) { return null ; } }
Retrieves devices from cache

@return mixed|null
Retrieves devices from cache