Skip to content

Commit

Permalink
code style, remove dead stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Gappa committed May 2, 2019
1 parent 4c2f129 commit 016a31a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 56 deletions.
44 changes: 0 additions & 44 deletions phpstan/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,57 +1,13 @@
parameters:
autoload_directories:
- src/
# - libs/

paths:
- src/
# - libs/

level: 7

# ignoreErrors:
# # Global errors
# - '#Call to an undefined method Nette\\(Forms\\Container|Application\\UI\\Form)::addDatePicker\(\).#'
# - '#Call to an undefined method Nette\\(Forms\\Container|Application\\UI\\Form)::addUploadImage\(\).#'
# - '#Call to an undefined method Nette\\(Forms\\Container|Application\\UI\\Form)::addRichTextArea\(\).#'
# - '#Call to an undefined method Nette\\(Forms\\Container|Application\\UI\\Form)::addUploadGeneric\(\).#'
# - '#Call to an undefined method Nette\\(Forms\\Container|Application\\UI\\Form)::addDivBlock\(\).#'

# # Whole files
# -
# path: %currentWorkingDirectory%/libs/Nelson/Data.php
# message: '##'
# -
# path: %currentWorkingDirectory%/libs/Nelson/Doctrine/Entities/ABaseEntity.php
# message: '##'
# -
# path: %currentWorkingDirectory%/libs/Nelson/Forms/FormRenderer.php
# message: '##'

# # Specific
# -
# path: %currentWorkingDirectory%/libs/Nelson/Grid/GridFactory.php
# message: '#Call to an undefined method Nette\\Application\\UI\\Presenter::getTemplatePath\(\).#'
# -
# path: %currentWorkingDirectory%/libs/Nelson/TreeStructure/Tree.php
# message: '#Result of method Nette\\ComponentModel\\Container::getComponent\(\) \(void\) is used.#'
# -
# path: %currentWorkingDirectory%/app/modules/Front/NewsPresenter.php
# message: '#Call to an undefined method ([a-zA-Z0-9\\_]+)#'
# -
# path: %currentWorkingDirectory%/app/packages/StructureDataPackage/Presenters/AdminPresenter.php
# message: '#Call to an undefined method App\\Packages\\StructureDataPackage\\Entities\\Value::getGallery\(\).#'
# -
# path: %currentWorkingDirectory%/app/packages/StructureDataPackage/Presenters/AdminPresenter.php
# message: '#Call to an undefined method App\\Packages\\StructureDataPackage\\Entities\\Value::setGallery\(\).#'


includes:
- ../vendor/phpstan/phpstan-nette/extension.neon
- ../vendor/phpstan/phpstan-nette/rules.neon

# - ../vendor/phpstan/phpstan-doctrine/extension.neon
# - ../vendor/phpstan/phpstan-doctrine/rules.neon



4 changes: 0 additions & 4 deletions src/DI/ResizerExtension.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

namespace Nelson\Resizer\DI;

use Latte\Engine;
use Nelson\Resizer\Resizer;
use Nepada\PresenterMapping\PresenterMapper;
use Nette\Bridges\ApplicationLatte\ILatteFactory;
use Nette\DI\CompilerExtension;
use Nette\DI\Definitions\FactoryDefinition;
use Nette\DI\ServiceDefinition;
use Nette\Schema\Expect;
use Nette\Schema\Processor;
use Nette\Schema\Schema;

final class ResizerExtension extends CompilerExtension
Expand Down Expand Up @@ -92,5 +89,4 @@ public function beforeCompile(): void
$service->addSetup('setMapping', [$mapping]);
}
}

}
3 changes: 1 addition & 2 deletions src/Geometry.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Geometry
{
use SmartObject;


/**
* @param array|string|null $geometry
* @return array|null
Expand All @@ -20,7 +19,7 @@ public static function parseGeometry($geometry): ?array
{
if (is_array($geometry)) {
return $geometry;
} elseif (is_null($geometry)) {
} elseif ($geometry === null) {
return null;
} elseif (is_string($geometry) && strlen($geometry) === 0) {
return null;
Expand Down
8 changes: 2 additions & 6 deletions src/Presenters/ResizePresenter.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ final class ResizePresenter extends Presenter
*/
public $resizer;

/**
* @var IRequest
*/
/** @var IRequest */
private $request;

/**
* @var IResponse
*/
/** @var IResponse */
private $response;


Expand Down

0 comments on commit 016a31a

Please sign in to comment.