diff --git a/config/module.config.php b/config/module.config.php index 3b5bbad..f3cc849 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -17,7 +17,7 @@ ], ], 'view_manager' => [ - 'template_path_stack' => [ + 'template_path_stack' => [ dirname(__DIR__) . '/view', ], ], @@ -35,10 +35,10 @@ 'navigation' => [ 'AdminModule' => [ [ - 'label' => 'Zotero Import', // @translate - 'route' => 'admin/zotero', - 'resource' => 'ZoteroImport\Controller\Index', - 'pages' => [ + 'label' => 'Zotero Import', // @translate + 'route' => 'admin/zotero', + 'resource' => 'ZoteroImport\Controller\Index', + 'pages' => [ [ 'label' => 'Import', // @translate 'route' => 'admin/zotero/default', diff --git a/src/Controller/IndexController.php b/src/Controller/IndexController.php index 7525bdc..519286a 100644 --- a/src/Controller/IndexController.php +++ b/src/Controller/IndexController.php @@ -43,15 +43,15 @@ public function importAction() $timestamp = (int) $addedAfter->format('U'); } $args = [ - 'itemSet' => $data['itemSet'], - 'type' => $data['type'], - 'id' => $data['id'], + 'itemSet' => $data['itemSet'], + 'type' => $data['type'], + 'id' => $data['id'], 'collectionKey' => $data['collectionKey'], - 'apiKey' => $data['apiKey'], - 'syncFiles' => (bool) $data['syncFiles'], - 'action' => $data['action'], - 'version' => 0, - 'timestamp' => $timestamp, + 'apiKey' => $data['apiKey'], + 'syncFiles' => (bool) $data['syncFiles'], + 'action' => $data['action'], + 'version' => 0, + 'timestamp' => $timestamp, ]; if ($args['apiKey'] && !($username = $this->apiKeyIsValid($args))) { @@ -124,7 +124,7 @@ public function exportAction() } // Set default values to simplify checks. - $params += array_fill_keys(['resource_type', 'resource_ids', 'query', 'batch_action', 'zotero_all'],null); + $params += array_fill_keys(['resource_type', 'resource_ids', 'query', 'batch_action', 'zotero_all'], null); $resourceType = $params['resource_type']; $resourceTypeMap = [ @@ -159,7 +159,7 @@ public function exportAction() // Export of item sets is managed like a query for all their items. $itemSets = []; $itemSetCount = 0; - $itemSetQuery= null; + $itemSetQuery = null; $itemQuery = $query; if ($selectAll || $resource === 'item_sets') { diff --git a/src/Entity/ZoteroImport.php b/src/Entity/ZoteroImport.php index ae36eeb..095991b 100644 --- a/src/Entity/ZoteroImport.php +++ b/src/Entity/ZoteroImport.php @@ -26,7 +26,6 @@ class ZoteroImport extends AbstractEntity * onDelete="CASCADE" * ) */ - protected $job; /** * @OneToOne( diff --git a/src/Form/ExportForm.php b/src/Form/ExportForm.php index 225f83a..ad11802 100644 --- a/src/Form/ExportForm.php +++ b/src/Form/ExportForm.php @@ -30,7 +30,7 @@ public function init() 'name' => 'type', 'type' => Element\Radio::class, 'options' => [ - 'label' => 'Library Type', // @translate + 'label' => 'Library Type', // @translate 'info' => 'Is this a user or group library?', // @translate 'value_options' => [ 'user' => 'User', // @translate diff --git a/src/Form/ImportForm.php b/src/Form/ImportForm.php index 39aaed3..e2ef216 100644 --- a/src/Form/ImportForm.php +++ b/src/Form/ImportForm.php @@ -30,7 +30,7 @@ public function init() 'name' => 'type', 'type' => Element\Radio::class, 'options' => [ - 'label' => 'Library Type', // @translate + 'label' => 'Library Type', // @translate 'info' => 'Required. Is this a user or group library?', // @translate 'value_options' => [ 'user' => 'User', // @translate diff --git a/src/Job/AbstractZoteroSync.php b/src/Job/AbstractZoteroSync.php index 88b83ac..66f836f 100644 --- a/src/Job/AbstractZoteroSync.php +++ b/src/Job/AbstractZoteroSync.php @@ -55,8 +55,8 @@ abstract class AbstractZoteroSync extends AbstractJob */ protected $vocabularies = [ 'dcterms' => 'http://purl.org/dc/terms/', - 'dctype' => 'http://purl.org/dc/dcmitype/', - 'bibo' => 'http://purl.org/ontology/bibo/', + 'dctype' => 'http://purl.org/dc/dcmitype/', + 'bibo' => 'http://purl.org/ontology/bibo/', ]; /** diff --git a/src/Job/Export.php b/src/Job/Export.php index cef930c..1e114b5 100644 --- a/src/Job/Export.php +++ b/src/Job/Export.php @@ -120,7 +120,7 @@ public function perform() $this->resourceClassMap = $this->loadMapping('resource_class_map'); $this->itemTypeMap = $this->prepareMapping('item_type_map'); - $this->creatorNameMap = $this->loadMapping('creator_name_map'); + $this->creatorNameMap = $this->loadMapping('creator_name_map'); $this->propertyMap = $this->loadMapping('property_map'); $this->setImportClient(); @@ -201,7 +201,7 @@ protected function export(array $itemIds, array $args) // Prepare Zotero items. foreach ($itemIds as $itemId) { - try{ + try { /** @var \Omeka\Api\Representation\ItemRepresentation $item */ $item = $this->api->read('items', $itemId)->getContent(); } catch (NotFoundException $e) { diff --git a/src/Job/Import.php b/src/Job/Import.php index 30224cc..f55d3b6 100644 --- a/src/Job/Import.php +++ b/src/Job/Import.php @@ -78,7 +78,7 @@ public function perform() 'itemType' => '-note', ]; if ($collectionKey) { - $url = $this->url->collectionItems($collectionKey, $params); + $url = $this->url->collectionItems($collectionKey, $params); } else { $url = $this->url->items($params); } @@ -334,7 +334,7 @@ protected function mapSubjectValues(array $zoteroItem, array $omekaItem) * @param array $zoteroItem The Zotero item data * @param array $omekaItem The Omeka item data * @return string - */ + */ protected function mapAttachment($zoteroItem, $omekaItem) { if ('attachment' === $zoteroItem['data']['itemType'] @@ -345,7 +345,7 @@ protected function mapAttachment($zoteroItem, $omekaItem) $property = $this->properties['dcterms']['title']; $omekaItem['o:media'][] = [ 'o:ingester' => 'url', - 'o:source' => $this->url->itemFile($zoteroItem['key']), + 'o:source' => $this->url->itemFile($zoteroItem['key']), 'ingest_url' => $this->url->itemFile( $zoteroItem['key'], ['key' => $this->getArg('apiKey')]