diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index 0f8e843e..db031dc0 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -35,7 +35,7 @@ function islandora_ingest_form(array $form, array &$form_state, array $configura islandora_ingest_form_init_form_state_storage($form_state, $configuration); return islandora_ingest_form_execute_step($form, $form_state); } - catch(Exception $e) { + catch (Exception $e) { drupal_set_message($e->getMessage(), 'error'); return array(array( '#markup' => l(t('Back'), 'javascript:window.history.back();', array('external' => TRUE)))); @@ -242,7 +242,7 @@ function islandora_ingest_get_approximate_steps(array $configuration) { try { islandora_ingest_form_validate_configuration($configuration); } - catch(InvalidArgumentException $e) { + catch (InvalidArgumentException $e) { // Don't log or display exception. return array(); } diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 4d989e9f..14a770e2 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -205,7 +205,7 @@ class IslandoraFedoraApiM extends FedoraApiM { } return $ret; } - catch(Exception $e) { + catch (Exception $e) { watchdog('islandora', 'Failed to modify datastream @dsid from @pid
code: @code
message: @msg', array( '@pid' => $pid, '@dsid' => $dsid, @@ -239,7 +239,7 @@ class IslandoraFedoraApiM extends FedoraApiM { } return $ret; } - catch(Exception $e) { + catch (Exception $e) { watchdog('islandora', 'Failed to modify object: @pid
code: @code
message: @msg', array( '@pid' => $pid, '@code' => $e->getCode(), @@ -281,7 +281,7 @@ class IslandoraFedoraApiM extends FedoraApiM { return $ret; } } - catch(Exception $e) { + catch (Exception $e) { watchdog('islandora', 'Failed to purge datastream @dsid from @pid
code: @code
message: @msg', array( '@pid' => $pid, '@dsid' => $dsid, @@ -325,7 +325,7 @@ class IslandoraFedoraApiM extends FedoraApiM { return $ret; } } - catch(Exception $e) { + catch (Exception $e) { watchdog('islandora', 'Failed to purge object @pid
code: @code
message: @msg', array( '@pid' => $pid, '@code' => $e->getCode(), diff --git a/includes/utilities.inc b/includes/utilities.inc index 27c53150..ec155eb9 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -486,13 +486,13 @@ function islandora_prepare_new_object($namespace = NULL, $label = NULL, $datastr } else { // Schema does not match available php stream wrapper. Attempt to - // set datastream_file by url for the given scheme. Https (SSL) can + // set datastream_file by url for the given scheme. Https (SSL) can // cause this to fail, and trigger an output log in watchdog. $datastream_file = url($ds['datastream_file'], array('absolute' => TRUE)); - watchdog('islandora', 'Attempting to ingest %file in islandora_prepare_new_object(), ' . - ' but it does not appear to be readable. We will pass the path through' . - ' url(), and pass along as such.', - array('%file' => $datastream_file, ) , + watchdog('islandora', 'Attempting to ingest %file in islandora_prepare_new_object(), ' . + ' but it does not appear to be readable. We will pass the path through' . + ' url(), and pass along as such.', + array('%file' => $datastream_file), WATCHDOG_WARNING); } } @@ -531,7 +531,7 @@ function islandora_display_repository_inaccessible_message() { $text = t('Islandora configuration'); $link = l($text, 'admin/islandora/configure', array('attributes' => array('title' => $text))); $message = t('Could not connect to the repository. Please check the settings on the !link page.', - array('!link' => $link)); + array('!link' => $link)); drupal_set_message(check_plain($message), 'error', FALSE); } diff --git a/tests/hooks.test b/tests/hooks.test index bc3020f3..3133d656 100644 --- a/tests/hooks.test +++ b/tests/hooks.test @@ -67,7 +67,7 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase { $object->label = "Don't Block"; $this->repository->purgeObject($object->id); } - catch(Exception $e) { + catch (Exception $e) { // Meh... Either it didn't exist or the purge failed. } } @@ -95,7 +95,7 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase { $this->fail('Blocked ingest should throw an Exception.'); $this->repository->purgeObject($object->id); } - catch(Exception $e) { + catch (Exception $e) { $this->pass('Ingest blocked and exception thrown.'); $this->assert($_SESSION['islandora_hooks']['alter'][ISLANDORA_OBJECT_INGESTED_HOOK], 'Called "hook_islandora_object_alter" when blocking ingesting via FedoraRepository::ingestObject.'); $this->assertFalse($_SESSION['islandora_hooks']['hook'][ISLANDORA_OBJECT_INGESTED_HOOK], 'Did not called ISLANDORA_OBJECT_INGESTED_HOOK when blocking ingesting via FedoraRepository::ingestObject.'); @@ -115,7 +115,7 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase { $object->label = 'block'; $this->fail('Blocked modify should throw an Exception.'); } - catch(Exception $e) { + catch (Exception $e) { $this->pass('Modify blocked and exception thrown.'); $this->assertNotEqual($object->label, 'block', 'Modification did not stick.'); $this->assert($_SESSION['islandora_hooks']['alter'][ISLANDORA_OBJECT_MODIFIED_HOOK], 'Called "hook_islandora_object_alter" when blocking modifying via set magic functions.'); @@ -149,7 +149,7 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase { $this->repository->purgeObject($object->id); $this->fail('Blocked modify should throw an Exception.'); } - catch(Exception $e) { + catch (Exception $e) { $this->pass('Modify blocked and exception thrown.'); $this->assert($_SESSION['islandora_hooks']['alter'][ISLANDORA_OBJECT_PURGED_HOOK], 'Called "hook_islandora_object_alter" when blocking purge via FedoraRepository::purgeObject.'); $this->assertFalse($_SESSION['islandora_hooks']['hook'][ISLANDORA_OBJECT_PURGED_HOOK], 'Called ISLANDORA_OBJECT_PURGED_HOOK when blocking purge via FedoraRepository::purgeObject.'); @@ -191,7 +191,7 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase { $ds->label = 'block'; $this->fail('Blocked modify should throw an Exception.'); } - catch(Exception $e) { + catch (Exception $e) { $this->pass('Modify blocked and exception thrown.'); $this->assert($_SESSION['islandora_hooks']['alter'][ISLANDORA_DATASTREAM_MODIFIED_HOOK], 'Called "hook_islandora_datastream_alter" when blocking modifying via set magic functions.'); $this->assertFALSE($_SESSION['islandora_hooks']['hook'][ISLANDORA_DATASTREAM_MODIFIED_HOOK], 'Called ISLANDORA_DATASTREAM_MODIFIED_HOOK when blocking modifying via set magic functions.');