minor #13059 [Debug] use ternary operator to simplify the getClassLoader() method in DebugClassLoader class. (hhamon)

This PR was merged into the 2.5 branch.

Discussion
----------

[Debug] use ternary operator to simplify the getClassLoader() method in DebugClassLoader class.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Commits
-------

e22c887 [Debug] use ternary operator to simplify the getClassLoader() method in DebugClassLoader class.
This commit is contained in:
Fabien Potencier 2014-12-21 15:48:15 +01:00
commit 3892389c6d

View File

@ -65,11 +65,7 @@ class DebugClassLoader
*/
public function getClassLoader()
{
if ($this->wasFinder) {
return $this->classLoader[0];
} else {
return $this->classLoader;
}
return $this->wasFinder ? $this->classLoader[0] : $this->classLoader;
}
/**