diff --git a/modules/electrophysiology_browser/php/module.class.inc b/modules/electrophysiology_browser/php/module.class.inc index b76c0d77ecb..2d5b21f0e4c 100644 --- a/modules/electrophysiology_browser/php/module.class.inc +++ b/modules/electrophysiology_browser/php/module.class.inc @@ -36,11 +36,11 @@ class Module extends \Module { return parent::hasAccess($user) && $user->hasAnyPermission( - [ - 'electrophysiology_browser_view_allsites', - 'electrophysiology_browser_view_site' - ] - ); + [ + 'electrophysiology_browser_view_allsites', + 'electrophysiology_browser_view_site' + ] + ); } /** diff --git a/modules/electrophysiology_browser/php/sessions.class.inc b/modules/electrophysiology_browser/php/sessions.class.inc index 6828614d02b..bdaefd124b4 100644 --- a/modules/electrophysiology_browser/php/sessions.class.inc +++ b/modules/electrophysiology_browser/php/sessions.class.inc @@ -161,7 +161,9 @@ class Sessions extends \NDB_Page $sessions = $db->pselect($query, array()); $sessions = array_column($sessions, 'SessionID'); $response['patient'] = $this->getSubjectData($outputType); - $response['database'] = array_values($this->getFilesData($sessionID, $outputType)); + $response['database'] = array_values( + $this->getFilesData($sessionID, $outputType) + ); $response['sessions'] = $sessions; $currentIndex = array_search($sessionID, $sessions); $response['nextSession'] = $sessions[$currentIndex+1] ?? ''; @@ -181,7 +183,9 @@ class Sessions extends \NDB_Page function getSubjectData($outputType) { $subjectData = array(); - $candidate = \NDB_Factory::singleton()->candidate($this->timepoint->getCandID()); + $candidate = \NDB_Factory::singleton()->candidate( + $this->timepoint->getCandID() + ); $subjectData['pscid'] = $candidate->getPSCID(); $subjectData['dccid'] = $candidate->getCandID(); @@ -236,8 +240,12 @@ class Sessions extends \NDB_Page $fileSummary = array(); $physiologicalFileID = $file['PhysiologicalFileID']; $physiologicalFile = $file['FilePath']; - $physioFileObj = new ElectrophysioFile(intval($physiologicalFileID)); - $fileName = basename($physioFileObj->getParameter('FilePath')); + $physioFileObj = new ElectrophysioFile( + intval($physiologicalFileID) + ); + $fileName = basename( + $physioFileObj->getParameter('FilePath') + ); // ----------------------------------------------------- // Create a file summary object with file's information @@ -298,13 +306,21 @@ class Sessions extends \NDB_Page $intituteAddress = $physioFileObj->getParameter('InstitutionAddress'); $miscChannelCount = $physioFileObj->getParameter('MiscChannelCount'); $manufacturer = $physioFileObj->getParameter('Manufacturer'); - $modelName = $physioFileObj->getParameter('ManufacturerModelName'); - $capManufacturer = $physioFileObj->getParameter('ManufacturerCapModelName'); - $capModelName = $physioFileObj->getParameter('ManufacturerCapModelName'); + $modelName = $physioFileObj->getParameter( + 'ManufacturerModelName' + ); + $capManufacturer = $physioFileObj->getParameter( + 'ManufacturerCapModelName' + ); + $capModelName = $physioFileObj->getParameter( + 'ManufacturerCapModelName' + ); $hardwareFilters = $physioFileObj->getParameter('HardwareFilters'); $duration = $physioFileObj->getParameter('RecordingDuration'); $epochLength = $physioFileObj->getParameter('EpochLength'); - $softwareVersion = $physioFileObj->getParameter('DeviceSoftwareVersion'); + $softwareVersion = $physioFileObj->getParameter( + 'DeviceSoftwareVersion' + ); $serialNumber = $physioFileObj->getParameter('DeviceSerialNumber'); $artefactDesc = $physioFileObj->getParameter( 'SubjectArtefactDescription' @@ -352,22 +368,22 @@ class Sessions extends \NDB_Page * Gets the download link for the files associated to the electrophysiology * file (channels.tsv, electrodes.tsv, task events.tsv...) * - * @param int $physiologicalFileID FileID of the electrophysiology file - * @param string $physiologicalFile electrophysiology file's relative path + * @param int $physioFileID FileID of the electrophysiology file + * @param string $physioFile electrophysiology file's relative path * * @return array array with the path to the different files associated to the * electrophysiology file */ - function getDownloadlinks(int $physiologicalFileID, string $physiologicalFile): array + function getDownloadlinks(int $physioFileID, string $physioFile): array { $db = \NDB_Factory::singleton()->database(); $params = array(); - $params['PFID'] = $physiologicalFileID; + $params['PFID'] = $physioFileID; $downloadLinks = array(); $downloadLinks[] = array( 'type' => 'physiological_file', - 'file' => $physiologicalFile, + 'file' => $physioFile, ); $queries = [