diff --git a/src/IPub/Images/DI/ImagesExtension.php b/src/IPub/Images/DI/ImagesExtension.php index 3273d01..4e18627 100644 --- a/src/IPub/Images/DI/ImagesExtension.php +++ b/src/IPub/Images/DI/ImagesExtension.php @@ -156,7 +156,7 @@ public function beforeCompile() if ($configuration['prependRoutesToRouter']) { $router = $builder->getByType('Nette\Application\IRouter'); - if ($router) { + if ($router !== NULL) { if (!$router instanceof DI\ServiceDefinition) { $router = $builder->getDefinition($router); } diff --git a/src/IPub/Images/Forms/Controls/ImageUploadControl.php b/src/IPub/Images/Forms/Controls/ImageUploadControl.php index 4920b0b..323ed02 100644 --- a/src/IPub/Images/Forms/Controls/ImageUploadControl.php +++ b/src/IPub/Images/Forms/Controls/ImageUploadControl.php @@ -203,11 +203,11 @@ public static function validateImage(ImageUploadControl $control) public static function register($method = 'addImageUpload') { // Check for multiple registration - if (static::$registered) { + if (self::$registered) { throw new Nette\InvalidStateException('Image upload control already registered.'); } - static::$registered = TRUE; + self::$registered = TRUE; $class = function_exists('get_called_class') ? get_called_class() : __CLASS__; diff --git a/src/IPub/Images/Storage/FileStorage.php b/src/IPub/Images/Storage/FileStorage.php index de1f7ae..86dcef9 100644 --- a/src/IPub/Images/Storage/FileStorage.php +++ b/src/IPub/Images/Storage/FileStorage.php @@ -62,7 +62,7 @@ abstract class FileStorage extends Nette\Object implements IStorage private $validator; /** - * @var Application\IPresenter + * @var Application\UI\Presenter */ private $presenter; @@ -151,7 +151,7 @@ public function getWebDir() */ public function setNamespace($namespace = NULL) { - if (!$namespace) { + if ($namespace === NULL) { $this->namespace = NULL; } else { @@ -313,7 +313,7 @@ private function generateUniqueFilename($filename, $namespace = NULL) } /** - * @return Application\IPresenter + * @return Application\UI\Presenter */ private function getPresenter() { @@ -325,11 +325,11 @@ private function getPresenter() } /** - * @param Application\IPresenter $presenter + * @param Application\UI\Presenter $presenter * * @return $this */ - public function setPresenter(Application\IPresenter $presenter) + public function setPresenter(Application\UI\Presenter $presenter) { $this->presenter = $presenter;