Skip to content

Commit

Permalink
Merge pull request #1641 from tripal/tv4g0-issue1389-typos
Browse files Browse the repository at this point in the history
Tripal 4 Assorted typo fixes
  • Loading branch information
laceysanderson committed Sep 20, 2023
2 parents bf538b9 + e3beb52 commit a021aeb
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalImporterForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $plugin_i
}

// We should only add a submit button if this importer uses a button.
// Examples of importers who don't use this button are mutl-page forms.
// Examples of importers who don't use this button are multi-page forms.
if (array_key_exists('use_button', $importer_def) AND $importer_def['use_button'] !== FALSE) {
$form['button'] = [
'#type' => 'submit',
Expand Down
8 changes: 4 additions & 4 deletions tripal/src/Services/TripalFieldCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function create(ContainerInterface $container) {
*
* This function will only add defaults if the value is not already present
* in the $field_def array. You can retrieve a fully populated definition
* array, with derfaults, by not passing an argument. This function will
* array, with defaults, by not passing an argument. This function will
* remove any keys in the definition array that are not supported.
*
* @return array $field_def
Expand Down Expand Up @@ -201,7 +201,7 @@ public function setFieldDefDefaults(array $field_def = []) : array {
* Validates a field definition array.
*
* This function can be used to check a field definition prior to adding
* the field to a Tripal content type..
* the field to a Tripal content type.
*
* @param array $field_def
* A definition array for the field.
Expand Down Expand Up @@ -321,7 +321,7 @@ public function install() {
* - storage_plugin_id: the name of the storage plugin
* (e.g. 'chado_storage').
* - storage_plugin_setings: an array of any settings that the storage
* plugin expects for the field..
* plugin expects for the field.
* - settings: (array) Any other settings needed for the field. Every
* field can have different settings.
* - display: Provides details for display of the field. By default it
Expand Down Expand Up @@ -413,7 +413,7 @@ public function addBundleField($field_def) : bool {

try {

// Check if field storage exists for this field. If not, add it..
// Check if field storage exists for this field. If not, add it.
$field_storage = FieldStorageConfig::loadByName('tripal_entity', $field_def['name']);
if (!$field_storage) {
$field_storage = FieldStorageConfig::create([
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/TripalDBX/TripalDbxSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public function foreignKeyConstraintExists(
* -'name': table name
* -'type': one of 'table', 'view', 'partition' and 'materialized view' for
* PostgreSQL materialized views.
* -'status': either 'base' for base a table, or 'custom' for a custom table
* -'status': either 'base' for a base table, or 'custom' for a custom table
* or a tripal materialized view, or 'other' for other elements.
*/
public function getTables(
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/TripalStorage/StoragePropertyBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($entityType, $fieldType, $key, $term_id) {
}
}
else {
throw new \Exception('Cannot create a StorageProperty object without a property formatted term: ' . $term_id);
throw new \Exception('Cannot create a StorageProperty object without a properly formatted term: ' . $term_id);
}

// Ensure we have required values.
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/TripalVocabTerms/TripalTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ public function getInternalId() {
* An array of synonyms.
*
* For easy lookup, this is an associative array where
* the key is the synonym and the value is the type term..
* the key is the synonym and the value is the type term.
* Using the synonym as the key also prevents duplication.
*
* @var array
Expand Down
44 changes: 22 additions & 22 deletions tripal/tests/src/Kernel/TripalImporter/TripalImporterBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ public function testTripalImporterBase() {
"The class should match our fake plugin name.");
$selected_args = unserialize(base64_decode($records[0]->arguments));
$this->assertIsArray($selected_args,
"Unable to retrieve arguements after creating tripal importer record.");
"Unable to retrieve arguments after creating tripal importer record.");
$this->assertEquals($expected_args, $selected_args,
"We did not retreive the arguements we expected.");
"We did not retrieve the arguments we expected.");

$importerTestLoad = $this->getMockForAbstractClass(
'\Drupal\tripal\TripalImporter\TripalImporterBase',
Expand All @@ -151,9 +151,9 @@ public function testTripalImporterBase() {
$importerTestLoad->load($import_id);
$retrieved_args = $importerTestLoad->getArguments();
$this->assertIsArray($retrieved_args,
"Unable to retrieve arguements after loading tripal importer.");
"Unable to retrieve arguments after loading tripal importer.");
$this->assertEquals($expected_args, $retrieved_args,
"We did not retreive the arguements we expected after loading.");
"We did not retrieve the arguments we expected after loading.");

// CASE --- Exception Expected
// -- Empty run args, no file when file required.
Expand Down Expand Up @@ -214,9 +214,9 @@ public function testTripalImporterBase() {
"The class should match our fake plugin name.");
$selected_args = unserialize(base64_decode($records[0]->arguments));
$this->assertIsArray($selected_args,
"Unable to retrieve arguements after creating tripal importer record.");
"Unable to retrieve arguments after creating tripal importer record.");
$this->assertEquals($expected_args, $selected_args,
"We did not retreive the arguements we expected.");
"We did not retrieve the arguments we expected.");

$importerTestLoad = $this->getMockForAbstractClass(
'\Drupal\tripal\TripalImporter\TripalImporterBase',
Expand All @@ -225,9 +225,9 @@ public function testTripalImporterBase() {
$importerTestLoad->load($import_id);
$retrieved_args = $importerTestLoad->getArguments();
$this->assertIsArray($retrieved_args,
"Unable to retrieve arguements after loading tripal importer.");
"Unable to retrieve arguments after loading tripal importer.");
$this->assertEquals($expected_args, $retrieved_args,
"We did not retreive the arguements we expected after loading.");
"We did not retrieve the arguments we expected after loading.");

// CASE --- Valid
// -- run args + remote file.
Expand Down Expand Up @@ -262,9 +262,9 @@ public function testTripalImporterBase() {
"The class should match our fake plugin name.");
$selected_args = unserialize(base64_decode($records[0]->arguments));
$this->assertIsArray($selected_args,
"Unable to retrieve arguements after creating tripal importer record.");
"Unable to retrieve arguments after creating tripal importer record.");
$this->assertEquals($expected_args, $selected_args,
"We did not retreive the arguements we expected.");
"We did not retrieve the arguments we expected.");

$importerTestLoad = $this->getMockForAbstractClass(
'\Drupal\tripal\TripalImporter\TripalImporterBase',
Expand All @@ -273,9 +273,9 @@ public function testTripalImporterBase() {
$importerTestLoad->load($import_id);
$retrieved_args = $importerTestLoad->getArguments();
$this->assertIsArray($retrieved_args,
"Unable to retrieve arguements after loading tripal importer.");
"Unable to retrieve arguments after loading tripal importer.");
$this->assertEquals($expected_args, $retrieved_args,
"We did not retreive the arguements we expected after loading.");
"We did not retrieve the arguments we expected after loading.");

// CASE --- Valid
// -- run args + file upload (single file).
Expand Down Expand Up @@ -313,9 +313,9 @@ public function testTripalImporterBase() {
"The class should match our fake plugin name.");
$selected_args = unserialize(base64_decode($records[0]->arguments));
$this->assertIsArray($selected_args,
"Unable to retrieve arguements after creating tripal importer record.");
"Unable to retrieve arguments after creating tripal importer record.");
$this->assertEquals($expected_args, $selected_args,
"We did not retreive the arguements we expected.");
"We did not retrieve the arguments we expected.");

$importerTestLoad = $this->getMockForAbstractClass(
'\Drupal\tripal\TripalImporter\TripalImporterBase',
Expand All @@ -324,9 +324,9 @@ public function testTripalImporterBase() {
$importerTestLoad->load($import_id);
$retrieved_args = $importerTestLoad->getArguments();
$this->assertIsArray($retrieved_args,
"Unable to retrieve arguements after loading tripal importer.");
"Unable to retrieve arguments after loading tripal importer.");
$this->assertEquals($expected_args, $retrieved_args,
"We did not retreive the arguements we expected after loading.");
"We did not retrieve the arguments we expected after loading.");

// CASE --- Valid
// -- run args + file upload (multiple files).
Expand Down Expand Up @@ -367,9 +367,9 @@ public function testTripalImporterBase() {
"The class should match our fake plugin name.");
$selected_args = unserialize(base64_decode($records[0]->arguments));
$this->assertIsArray($selected_args,
"Unable to retrieve arguements after creating tripal importer record.");
"Unable to retrieve arguments after creating tripal importer record.");
$this->assertEquals($expected_args, $selected_args,
"We did not retreive the arguements we expected.");
"We did not retrieve the arguments we expected.");

$importerTestLoad = $this->getMockForAbstractClass(
'\Drupal\tripal\TripalImporter\TripalImporterBase',
Expand All @@ -378,9 +378,9 @@ public function testTripalImporterBase() {
$importerTestLoad->load($import_id);
$retrieved_args = $importerTestLoad->getArguments();
$this->assertIsArray($retrieved_args,
"Unable to retrieve arguements after loading tripal importer.");
"Unable to retrieve arguments after loading tripal importer.");
$this->assertEquals($expected_args, $retrieved_args,
"We did not retreive the arguements we expected after loading.");
"We did not retrieve the arguments we expected after loading.");

// CASE --- Exception Expected
// -- Load non-existant importer.
Expand Down Expand Up @@ -522,7 +522,7 @@ public function testTripalImporterBaseFiles() {
$importer->prepareFiles();
$retrieved_args = $importer->getArguments();
$this->assertIsArray($retrieved_args,
"We could not retrieve arguements after preparing files");
"We could not retrieve arguments after preparing files");
$this->assertArrayHasKey('file_path', $retrieved_args['files'][0],
"The file_path should have been set during prepareFiles().");

Expand All @@ -549,7 +549,7 @@ public function testTripalImporterBaseFiles() {
$importer->prepareFiles();
$retrieved_args = $importer->getArguments();
$this->assertIsArray($retrieved_args,
"We could not retrieve arguements after preparing files");
"We could not retrieve arguments after preparing files");
$this->assertArrayHasKey('file_path', $retrieved_args['files'][0],
"The file_path should have been set during prepareFiles().");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function testTripalImporterForm() {

// Ensure we are able to build the form.
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -245,7 +245,7 @@ public function testTripalImporterFormFiles() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -299,7 +299,7 @@ public function testTripalImporterFormFiles() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -334,7 +334,7 @@ public function testTripalImporterFormFiles() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -369,7 +369,7 @@ public function testTripalImporterFormFiles() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -414,7 +414,7 @@ public function testTripalImporterFormAnalysis() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down Expand Up @@ -448,7 +448,7 @@ public function testTripalImporterFormNoButton() {
$plugin_id,
);
$this->assertIsArray($form,
'We still expect the form builder to return a form array even without a plguin_id but it did not.');
'We still expect the form builder to return a form array even without a plugin_id but it did not.');
$this->assertEquals('tripal_admin_form_tripalimporter', $form['#form_id'],
'We did not get the form id we expected.');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function testPropertyCreation() {
catch (\Exception $e) {
$exception_message = $e->getMessage();
}
$this->assertStringContainsString('property formatted term', $exception_message,
$this->assertStringContainsString('properly formatted term', $exception_message,
"We did not get the exception message we expected for passing in a badly formatted term.");

// Test passing in a term whose ID Space doesn't exist in our mock.
Expand Down
2 changes: 1 addition & 1 deletion tripal/tripal.views.inc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function tripal_views_data_jobs(&$data) {

// Arguments
$data['tripal_jobs']['arguments'] = [
'title' => t('Arguements'),
'title' => t('Arguments'),
'help' => t('Any arguments passed to the callback.'),
'field' => [
'id' => 'standard',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ vocabularies:
description: 'A version number is an information content entity which is a sequence of characters borne by part of each of a class of manufactured products or its packaging and indicates its order within a set of other products having the same name.'
- id: 'IAO:0000064'
name: 'algorithm'
description: 'An algorithm is a set of instructions for performing a paticular calculation.'
description: 'An algorithm is a set of instructions for performing a particular calculation.'

- name: 'null'
label: 'No vocabulary'
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/config/install/views.view.chado_mviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ display:
admin_label: ''
plugin_id: text_custom
empty: false
content: '<a class="button button-action button--primary button--small" href="[site:url]admin/tripal/storage/chado/mview">Add Materilaized View</a>'
content: '<a class="button button-action button--primary button--small" href="[site:url]admin/tripal/storage/chado/mview">Add Materialized View</a>'
tokenize: false
footer: { }
display_extenders: { }
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/src/Database/ChadoSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getSchemaDef(array $parameters) :array {
* include linker tables (which link two or more base tables), property
* tables, and relationship tables. These provide additional information
* about primary data records and are therefore not base tables. This
* function retreives only the list of tables that are considered 'base'
* function retrieves only the list of tables that are considered 'base'
* tables.
*
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
$results = $chado->query($sql, []);

while ($contact = $results->fetchObject()) {
// Change the non-user-friendly 'null' contact, which is spedified by chado.
// Change the non-user-friendly 'null' contact, which is specified by chado.
if ($contact->name == 'null') {
$contact->name = '-- Unknown --'; // This will sort to the top.
}
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/src/Plugin/TripalIdSpace/ChadoIdSpace.php
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ public function setDescription($description) {
}

/**
* Retrieves from the Drupal cache the default vocabulary for this space..
* Retrieves from the Drupal cache the default vocabulary for this space.
*
* @return string
* The deffault vocabulary name.
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/src/Plugin/TripalImporter/OBOImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,7 @@ private function insertChadoCvtermRelationship($subject_id, $type_id, $object_id
* The name of the vocabulary to add.
*
* @return object|NULL
* The newly inserted CV object..
* The newly inserted CV object.
*/
private function insertChadoCv($cvname) {
$chado = $this->getChadoConnection();
Expand Down
6 changes: 3 additions & 3 deletions tripal_chado/src/Plugin/TripalStorage/ChadoStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public function updateValues(&$values) : bool {
}
}

// Now insert all new values for nor the non-base table records.
// Now insert all new values for the non-base table records.
foreach ($records as $chado_table => $deltas) {
foreach ($deltas as $delta => $record) {

Expand Down Expand Up @@ -393,7 +393,7 @@ public function selectChadoRecord(&$records, $base_tables, $chado_table, $delta,
}

// If we are selecting on the base table and we don't have a proper
// condition then throw and error.
// condition then throw an error.
if (!$this->hasValidConditions($record)) {
throw new \Exception($this->t('Cannot select record in the Chado "@table" table due to unset conditions. Record: @record',
['@table' => $chado_table, '@record' => print_r($record, TRUE)]));
Expand Down Expand Up @@ -983,7 +983,7 @@ protected function addChadoRecordJoins(array &$records, string $chado_column, st
];
}

// Get then current number of joins to the right table.
// Get the current number of joins to the right table.
$num_left = 0;
if (array_key_exists($left_table,$records[$parent_table][$delta]['joins'])) {
$num_left = count($records[$parent_table][$delta]['joins'][$left_table]) - 1;
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado/src/Services/ChadoFieldDebugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function reportQuery(object $query, $message) {
* We would like to complete print out the query with subbed in parameters
* but it's driving me crazy.
*
* Usually we would use $query->arguments() to get the arguements with
* Usually we would use $query->arguments() to get the arguments with
* placeholders but there are a number of bugs here:
* - in Drupal 10 $insertQuery->arguments() provides a scope error.
* - $updateQuery->arguments() only provides the conditional arguments,
Expand Down

0 comments on commit a021aeb

Please sign in to comment.