Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So I was browsing through this repository once upon a time and I saw that in the function "strToId" in Parts.php that with the Jump Start Hat, instead of having a bunch of "or" conditionals, it just searched through an array. Array $jump_start was declared beforehand to do this, and no such thing occurred with no other hat. So just today while looking through it again I thought "why not do it for all hats, might make it tidier?" So I did. I also added the string "arti" in the checks for the Artifact, 'cuz that's a very common shorthand for the hat.
Now I'm not sure if this is what you'd want. Maybe this is some ancient Jiggy code you didn't want to interfere with for prosperity's sake. Maybe the Jump Start hat must have an array declared when converting a string to its ID or else Fred grows irritable. Honestly, I don't know a lick about PHP - I just wrote this through extrapolation of the logic and syntax. Yes, I checked through the linked site, it works, no syntax errors. From a programmer's point of view, maybe some sort of switch statement would be best for such a function, but I wouldn't know what works for you. Could make it easier for the future, for adding more hats and whatnot. It does look a bit more legible to me but again it's called a "pull request" not a "pull demand". New to this version control stuff, it's really neat.
Regards,
Northadox