Skip to content

Commit

Permalink
Cleaned with php_cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Jun 17, 2018
1 parent d8bbd6e commit 7c2a6bd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
10 changes: 5 additions & 5 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
],
'view_manager' => [
'template_path_stack' => [
'template_path_stack' => [
dirname(__DIR__) . '/view',
],
],
Expand All @@ -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',
Expand Down
20 changes: 10 additions & 10 deletions src/Controller/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -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') {
Expand Down
1 change: 0 additions & 1 deletion src/Entity/ZoteroImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ZoteroImport extends AbstractEntity
* onDelete="CASCADE"
* )
*/

protected $job;
/**
* @OneToOne(
Expand Down
2 changes: 1 addition & 1 deletion src/Form/ExportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Form/ImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Job/AbstractZoteroSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
];

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Job/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/Job/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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']
Expand All @@ -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')]
Expand Down

0 comments on commit 7c2a6bd

Please sign in to comment.