Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 499cb31

Browse files
committed
Fixes according to scrutinizer
1 parent dfb8c7c commit 499cb31

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/IPub/Images/DI/ImagesExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function beforeCompile()
156156
if ($configuration['prependRoutesToRouter']) {
157157
$router = $builder->getByType('Nette\Application\IRouter');
158158

159-
if ($router) {
159+
if ($router !== NULL) {
160160
if (!$router instanceof DI\ServiceDefinition) {
161161
$router = $builder->getDefinition($router);
162162
}

src/IPub/Images/Forms/Controls/ImageUploadControl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ public static function validateImage(ImageUploadControl $control)
203203
public static function register($method = 'addImageUpload')
204204
{
205205
// Check for multiple registration
206-
if (static::$registered) {
206+
if (self::$registered) {
207207
throw new Nette\InvalidStateException('Image upload control already registered.');
208208
}
209209

210-
static::$registered = TRUE;
210+
self::$registered = TRUE;
211211

212212
$class = function_exists('get_called_class') ? get_called_class() : __CLASS__;
213213

src/IPub/Images/Storage/FileStorage.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ abstract class FileStorage extends Nette\Object implements IStorage
6262
private $validator;
6363

6464
/**
65-
* @var Application\IPresenter
65+
* @var Application\UI\Presenter
6666
*/
6767
private $presenter;
6868

@@ -151,7 +151,7 @@ public function getWebDir()
151151
*/
152152
public function setNamespace($namespace = NULL)
153153
{
154-
if (!$namespace) {
154+
if ($namespace === NULL) {
155155
$this->namespace = NULL;
156156

157157
} else {
@@ -313,7 +313,7 @@ private function generateUniqueFilename($filename, $namespace = NULL)
313313
}
314314

315315
/**
316-
* @return Application\IPresenter
316+
* @return Application\UI\Presenter
317317
*/
318318
private function getPresenter()
319319
{
@@ -325,11 +325,11 @@ private function getPresenter()
325325
}
326326

327327
/**
328-
* @param Application\IPresenter $presenter
328+
* @param Application\UI\Presenter $presenter
329329
*
330330
* @return $this
331331
*/
332-
public function setPresenter(Application\IPresenter $presenter)
332+
public function setPresenter(Application\UI\Presenter $presenter)
333333
{
334334
$this->presenter = $presenter;
335335

0 commit comments

Comments
 (0)