Fix PHPStan Level 0 issues #175
Merged
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.
Most of the issues fixed were fixing typos, obvious copy-paste issues, or mis-capitalized class names.
Issues Fixed That Need Validation:
SwatUiObject::addInlineScript()references anadd()method on an$inline_scriptsproperty which does not exist. I don't see this method used anywhere else in Swat, nor in EM:RAP or CourseHost, so I've removed it. https://github.com/silverorange/swat/pull/175/files#diff-8ec479556982c4d7fc7b48826ac8b6213aeb0a566419f48f09e348498d7d13e5L160Outstanding Issues:
SwatViewdoes not have agetDescendants()method, and there aren't any other methods that would be obvious candidates (i.e. it's just a typo). https://github.com/silverorange/swat/blob/master/Swat/SwatView.php#L77