Some are not as specific as they should be, and some may even be wrong,
but since these are only type hints (not type declarations) they won't
affect code execution, but rather provide some help to better understand
the code – for developers as well as tooling.
* Declare methods and instance variables in abstract classes
While PHP doesn't require this, it is good style, and makes the code
easier to reason about.
* Declare class variable
While `Config::getSdkNugetFeedUrl()` is not used from within the
project, and probably just was some experimental stuff, the method is
public, so we better keep it for now, but avoid reading an undeclared
class variable.
* Dodge from covariance warnings regarding Iterator for now
* Don't pass unnecessary arguments
These are retrieved from within the called functions, what *might* not
be the best idea, but it's what we have for now.
* Assert that $cb is actually a string before string conversion
In practice, it's either "copy" or "rename".
* Declare missing `Server::getPhp()`
* Remove unreachable code
* Ensure that `$crt` is defined
From looking at the code, it seems so, but let's make sure before
reading an undefined variable.
* Config::getDepsPort() returns an int
While that is changing the signature of a public method, it makes no
sense to return a string, and later to convert to int again.
* The abstract class TrainingCase is an Interfaces\TrainingCase
There shouldn't be the need for even having an interface (an abstract
class should be sufficient), but we keep the interface for now.
`Fetcher::getByUri()` returns a string (and since it is a public method
we don't want to change that for now), but we check for `false`; so we
change that.
We also use `file_exists()` instead of `Cache::isFileCached()` because
the method is actually called `Cache::fileIsCached()` but appears to be
broken due to applying `::getCacheablePath()` again. Furthermore the
other methods of `Cache` also use `file_exists()` directly. Since
`Cache::fileIsCached()` is public, we do not remove the otherwise
unused method yet.
There is no need to implement the detection logic in the PHP class;
instead we can get it from the Config object, where we try to get the
respective information from the environment, if not already set.
If there were vs16 packages listed in the series folder, the first
regex didn't parse these correctly, and if any vc packages were there,
the second regex was never executed. We fix this by merging the two
regexs into one.
The series alone deliver the information about the known branches,
no need to maintain an extra file. The only downside is the absense
of mapping between master and latest, howevere that's fine as it's
only master.