diff --git a/lib/controller/contactphotocontroller.php b/lib/controller/contactphotocontroller.php index e84b7131..15e9dfd1 100644 --- a/lib/controller/contactphotocontroller.php +++ b/lib/controller/contactphotocontroller.php @@ -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; } diff --git a/lib/controller/importcontroller.php b/lib/controller/importcontroller.php index 66eb654c..3a56b8c2 100644 --- a/lib/controller/importcontroller.php +++ b/lib/controller/importcontroller.php @@ -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; } diff --git a/lib/dispatcher.php b/lib/dispatcher.php index 9b9c5c44..0b1ce2db 100644 --- a/lib/dispatcher.php +++ b/lib/dispatcher.php @@ -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; diff --git a/lib/utils/temporaryphoto.php b/lib/utils/temporaryphoto.php index 915676a8..fc7f7568 100644 --- a/lib/utils/temporaryphoto.php +++ b/lib/utils/temporaryphoto.php @@ -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); } }