Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g0.135 Resolve problems and bring code to standard #136

Draft
wants to merge 19 commits into
base: 4.x
Choose a base branch
from

Conversation

reynoldtan
Copy link
Contributor

@reynoldtan reynoldtan commented Dec 24, 2024

**Issue #135 ** Resolve Problems and bring up code to standard.

Motivation

What does this PR do?

Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an automated test to ensure it doesn't return.

  1. Resolve problems detected by PHP Sniffer & Beautifier, problems like
  • Use of \Drupal::service construct (Use DI to resolve this type).
  • Comments exceeding 80 characters.
  • Unused use statements and variables.
  • Required space between foreach and ().
  1. Upgrade automated test to use Phenotypes Traits and data provider.

Testing

Automated Testing

Please describe each automated test this PR creates and provide a list of the assertions it makes using casual language.
Do not just say things like "asserts the array is not empty" but rather say "Ensures that the return value of method X with these parameters is not an empty array".

The following tests have been revised

  • test/src/Kernel/ServiceGenusOntologyTest.php
  • test/src/Kernel/ServiceGenusProjectTest.php
  • test/src/Kernel/ServiceTermTest

Manual Testing

Describe in detail how someone should manually test this functionality.
Make sure to include whether they need to build a docker from scratch, create any records, etc.

  • Load the following files and confirm that for each file the problems tab should show 0 problem.

image

  • src/Controller/TripalCultivatePhenotypesSettings.php
  • src/Form/TripalCultivatePhenotypesOntologySettingsForm.php
  • src/Form/TripalCultivatePhenotypesRSettingsForm.php
  • src/Form/TripalCultivatePhenotypesWatermarkSettingsForm.php
  • tests/src/Functional/ConfigOntologyTermsTest.php
  • test/src/Functional/ConfigRRulesTest.php
  • test/src/Functional/ConfigWatermarkTest.php
  • test/src/Functional/InstallTest.php
  • test/src/Unit/ConfigRRulesFormTest.php
  • test/src/Unit/ConfigWatermarkFormTest.php
  • test/src/Kernel/ServiceGenusOntologyTest.php
  • test/src/Kernel/ServiceGenusProjectTest.php
  • test/src/Kernel/ServiceTermTest

@reynoldtan reynoldtan self-assigned this Jan 2, 2025
@reynoldtan reynoldtan linked an issue Jan 2, 2025 that may be closed by this pull request
16 tasks
@reynoldtan reynoldtan changed the title Fixes TripalCultivatePhenotypesSettingsController g0.135 Resolve problems and bring code to standard Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

G0.135 - Resolve Problems and Bring to Standard
1 participant