From 852968fe4b43fe6b0458f203dbff8c725b4c8ffc Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Thu, 18 Apr 2013 15:20:12 -0300 Subject: [PATCH] Some codesniffer modifications. --- .travis.yml | 2 +- includes/ingest.form.inc | 2 +- includes/utilities.inc | 9 ++++----- islandora.api.php | 24 ++++++++++++------------ tests/scripts/travis_setup.sh | 2 ++ 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7bd2a84..7b537cfc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,6 @@ before_install: script: - ant -buildfile sites/all/modules/islandora/build.xml lint - $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora - - drush dcs sites/all/modules/islandora + - drush coder-review --reviews=production,security,style,i18n,potx,sniffer sites/all/modules/islandora - phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora - drush test-run --uri=http://localhost:8081 Islandora diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index db031dc0..62b09381 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -507,7 +507,7 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { catch (Exception $e) { // If post hooks throws it may already exist at this point but may be // invalid, so don't say failed. - watchdog('islandora', $e->getMessage(), NULL, WATCHDOG_ERROR); + watchdog('islandora', 'Exception Message: @exception.', array('@exception' => $e->getMessage()), WATCHDOG_ERROR); drupal_set_message(t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error'); } } diff --git a/includes/utilities.inc b/includes/utilities.inc index f7363bbe..4c83837a 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -484,11 +484,10 @@ function islandora_prepare_new_object($namespace = NULL, $label = NULL, $datastr // 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_WARNING); + 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); } } diff --git a/islandora.api.php b/islandora.api.php index d1d58f4f..a0ddde5c 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -35,7 +35,7 @@ function hook_islandora_view_object($object, $user, $page_number, $page_size) { * @return array * An array whose values are markup. */ -function hook_CMODEL_PID_islandora_view_object($object) { +function hook_cmodel_pid_islandora_view_object($object) { } @@ -60,7 +60,7 @@ function hook_islandora_view_object_alter(&$object, &$rendered) { * @param array $rendered * The array of rendered views. */ -function hook_CMODEL_PID_islandora_view_object_alter(&$object, &$rendered) { +function hook_cmodel_pid_islandora_view_object_alter(&$object, &$rendered) { } /** @@ -87,7 +87,7 @@ function hook_islandora_edit_object($object) { * @return array * An array whose values are markup. */ -function hook_CMODEL_PID_islandora_edit_object($object) { +function hook_cmodel_pid_islandora_edit_object($object) { } /** @@ -138,7 +138,7 @@ function hook_islandora_object_alter(AbstractFedoraObject $object, array &$conte * * @see hook_islandora_object_alter() */ -function hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context) { +function hook_cmodel_pid_islandora_object_alter(AbstractFedoraObject $object, array &$context) { } /** @@ -187,7 +187,7 @@ function hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractF * * @see hook_islandora_datastream_alter() */ -function hook_CMODEL_PID_DSID_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context) { +function hook_cmodel_pid_DSID_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context) { } /** @@ -211,7 +211,7 @@ function hook_islandora_object_ingested(FedoraObject $object) { * * @see hook_islandora_object_ingested() */ -function hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object) { +function hook_cmodel_pid_islandora_object_ingested(FedoraObject $object) { } /** @@ -236,7 +236,7 @@ function hook_islandora_object_modified(FedoraObject $object) { * * @see hook_islandora_object_modified() */ -function hook_CMODEL_PID_islandora_object_modified(FedoraObject $object) { +function hook_cmodel_pid_islandora_object_modified(FedoraObject $object) { } /** @@ -256,7 +256,7 @@ function hook_islandora_object_purged($pid) { * * @see hook_islandora_object_purged() */ -function hook_CMODEL_PID_islandora_object_purged($pid) { +function hook_cmodel_pid_islandora_object_purged($pid) { } /** @@ -281,7 +281,7 @@ function hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastre * * @see hook_islandora_object_ingested() */ -function hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream) { +function hook_cmodel_pid_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream) { } /** @@ -308,7 +308,7 @@ function hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastre * * @see hook_islandora_datastream_modified() */ -function hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream) { +function hook_cmodel_pid_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream) { } /** @@ -330,7 +330,7 @@ function hook_islandora_datastream_purged(FedoraObject $object, $dsid) { * * @see hook_islandora_datastream_purged() */ -function hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid) { +function hook_cmodel_pid_islandora_datastream_purged(FedoraObject $object, $dsid) { } /** @@ -418,5 +418,5 @@ function hook_islandora_ingest_steps(array $form_state) { * * @see hook_islandora_ingest_steps() */ -function hook_CMODEL_PID_islandora_ingest_steps(array $form_state) { +function hook_cmodel_pid_islandora_ingest_steps(array $form_state) { } diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index c0a5f0f2..c3515198 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -27,8 +27,10 @@ mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/is mkdir sites/all/libraries ln -s $HOME/tuque sites/all/libraries/tuque drush dl --yes coder +drush dl --yes potx drush en --yes coder_review drush en --yes simpletest +drush en --yes potx drush en --user=1 --yes islandora drush cc all sleep 4