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 { class ContactPhotoController extends Controller {
/**
* @var \OCP\ICache
*/
$cache;
public function __construct($appName, IRequest $request, App $app, ICache $cache) { public function __construct($appName, IRequest $request, App $app, ICache $cache) {
parent::__construct($appName, $request); parent::__construct($appName, $request, $app);
$this->app = $app;
$this->cache = $cache; $this->cache = $cache;
} }

View File

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

View File

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

View File

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