1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Scrutinizer fixes

This commit is contained in:
Thomas Tanghus 2014-04-08 01:19:30 +02:00
parent d0e8457fc3
commit c5bdc2f74d
4 changed files with 14 additions and 11 deletions

View File

@ -23,9 +23,13 @@ use OCA\Contacts\App,
*/
class ContactPhotoController extends Controller {
/**
* @var \OCP\ICache
*/
$cache;
public function __construct($appName, IRequest $request, App $app, ICache $cache) {
parent::__construct($appName, $request);
$this->app = $app;
parent::__construct($appName, $request, $app);
$this->cache = $cache;
}

View File

@ -24,8 +24,7 @@ use OCA\Contacts\App,
class ImportController extends Controller {
public function __construct($appName, IRequest $request, App $app, ICache $cache) {
parent::__construct($appName, $request);
$this->app = $app;
parent::__construct($appName, $request, $app);
$this->cache = $cache;
}

View File

@ -37,7 +37,7 @@ class Dispatcher extends MainApp {
protected $appName;
/**
* @var OCA\Contacts\App
* @var \OCA\Contacts\App
*/
protected $app;
@ -47,7 +47,7 @@ class Dispatcher extends MainApp {
protected $server;
/**
* @var OCP\AppFramework\IAppContainer
* @var \OCP\AppFramework\IAppContainer
*/
protected $container;

View File

@ -39,9 +39,9 @@ class TemporaryPhoto {
const PHOTO_UPLOADED = 2;
/**
* @var \OCP\IServerContainer
* @var \OCP\ICache
*/
protected $server;
$cache;
/**
* @var \OCP\Image
@ -82,8 +82,8 @@ class TemporaryPhoto {
);
/**
* Always call parents ctor:
* parent::__construct($server);
* Always call parents ctor in subclasses:
* parent::__construct($cache);
*/
public function __construct(ICache $cache, $key = null) {
$this->cache = $cache;
@ -104,7 +104,7 @@ class TemporaryPhoto {
if (isset(self::$classMap[$type])) {
return new self::$classMap[$type]($cache, $data);
} else {
return new self($data, $data);
return new self($cache, $data);
}
}