Merge pull request #11704 from owncloud/fix-type-for-query

Use mixed as type
This commit is contained in:
Lukas Reschke 2014-10-22 18:13:31 +02:00
commit e9ec45ddd1
1 changed files with 8 additions and 5 deletions

View File

@ -11,14 +11,17 @@ class SimpleContainer extends \Pimple implements \OCP\IContainer {
/** /**
* @param string $name name of the service to query for * @param string $name name of the service to query for
* @return object registered service for the given $name * @return mixed registered service for the given $name
*/ */
public function query($name) { public function query($name) {
return $this->offsetGet($name); return $this->offsetGet($name);
} }
function registerParameter($name, $value) /**
{ * @param string $name
* @param mixed $value
*/
function registerParameter($name, $value) {
$this[$name] = $value; $this[$name] = $value;
} }
@ -29,9 +32,9 @@ class SimpleContainer extends \Pimple implements \OCP\IContainer {
* *
* @param string $name name of the service to register another backend for * @param string $name name of the service to register another backend for
* @param \Closure $closure the closure to be called on service creation * @param \Closure $closure the closure to be called on service creation
* @param bool $shared
*/ */
function registerService($name, \Closure $closure, $shared = true) function registerService($name, \Closure $closure, $shared = true) {
{
if ($shared) { if ($shared) {
$this[$name] = \Pimple::share($closure); $this[$name] = \Pimple::share($closure);
} else { } else {