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

Commit

Permalink
Fixes according to scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Mar 29, 2016
1 parent dfb8c7c commit 499cb31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/IPub/Images/DI/ImagesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/IPub/Images/Forms/Controls/ImageUploadControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__;

Expand Down
10 changes: 5 additions & 5 deletions src/IPub/Images/Storage/FileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class FileStorage extends Nette\Object implements IStorage
private $validator;

/**
* @var Application\IPresenter
* @var Application\UI\Presenter
*/
private $presenter;

Expand Down Expand Up @@ -151,7 +151,7 @@ public function getWebDir()
*/
public function setNamespace($namespace = NULL)
{
if (!$namespace) {
if ($namespace === NULL) {
$this->namespace = NULL;

} else {
Expand Down Expand Up @@ -313,7 +313,7 @@ private function generateUniqueFilename($filename, $namespace = NULL)
}

/**
* @return Application\IPresenter
* @return Application\UI\Presenter
*/
private function getPresenter()
{
Expand All @@ -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;

Expand Down

0 comments on commit 499cb31

Please sign in to comment.