Skip to content

[Bugfix:Developer] Fix Lint in TeamView.php#12587

Merged
IDzyre merged 2 commits intomainfrom
fix-team-2
Mar 17, 2026
Merged

[Bugfix:Developer] Fix Lint in TeamView.php#12587
IDzyre merged 2 commits intomainfrom
fix-team-2

Conversation

@JManion32
Copy link
Copy Markdown
Contributor

@JManion32 JManion32 commented Mar 15, 2026

Why is this Change Important & Necessary?

#12586 resolved #12580, allowing students to once again create teams on VCS gradeables, but not in "the PHP way". Because of this, PHP Lint was failing due to the way I used a ternary operator.

What is the New Behavior?

Instead of a ternary operator to guarantee we don't call getId() on NULL, we now just use the nullsafe operator, which "short-circuits the retrieval if the value is null, without causing any errors."

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Create a VCS team gradeable
  2. Create and Leave a team
  3. No errors

Automated Testing & Documentation

N/A

Other information

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (4bd710c) to head (3070561).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12587   +/-   ##
=========================================
  Coverage     21.66%   21.66%           
  Complexity     9637     9637           
=========================================
  Files           268      268           
  Lines         36222    36222           
  Branches        487      487           
=========================================
  Hits           7847     7847           
  Misses        27892    27892           
  Partials        483      483           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-project-automation github-project-automation bot moved this to Awaiting Maintainer Review in Submitty Development Mar 16, 2026
@IDzyre IDzyre moved this from Awaiting Maintainer Review to Ready to Merge in Submitty Development Mar 16, 2026
@github-project-automation github-project-automation bot moved this from Ready to Merge to Awaiting Maintainer Review in Submitty Development Mar 16, 2026
@IDzyre IDzyre merged commit 9cb25d6 into main Mar 17, 2026
25 checks passed
@IDzyre IDzyre deleted the fix-team-2 branch March 17, 2026 00:01
SkyBlue43 pushed a commit to SkyBlue43/Submitty that referenced this pull request Mar 19, 2026
### Why is this Change Important & Necessary?
Submitty#12586 resolved Submitty#12580, allowing students to once again create teams on
VCS gradeables, but not in "the PHP way". Because of this, `PHP Lint`
was failing due to the way I used a ternary operator.

### What is the New Behavior?
Instead of a ternary operator to guarantee we don't call `getId()` on
`NULL`, we now just use the nullsafe operator, which "short-circuits the
retrieval if the value is null, without causing any errors."

### What steps should a reviewer take to reproduce or test the bug or
new feature?
1. Create a VCS team gradeable
2. Create and Leave a team
3. No errors

### Automated Testing & Documentation
N/A

### Other information

Co-authored-by: Cameron Peterson <46759635+IDzyre@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

VCS Team Gradeable: Team can't be created

3 participants