Skip to content

Commit

Permalink
imagine 1.0, psr12, phpstan 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
janatjak committed Oct 3, 2018
1 parent a5458c6 commit 7269232
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -9,11 +9,11 @@ php:
- 7.1

install:
- composer install --no-interaction --prefer-source
- composer install --no-interaction

script:
- php vendor/bin/phpstan.phar analyse ./src ./tests --level 7
- php vendor/bin/phpcs --standard=PSR2 ./src ./tests
- php vendor/bin/phpcs --standard=PSR12 ./src ./tests
- php vendor/bin/tester tests -p phpdbg --coverage ./coverage.xml --coverage-src ./src

after_script:
Expand Down
8 changes: 3 additions & 5 deletions composer.json
@@ -1,8 +1,6 @@
{
"name": "freezy-bee/nette-imagine-generator",
"license": [
"MIT"
],
"license": "MIT",
"type": "library",
"description": "Image Imagine generator for Nette Framework",
"minimum-stability": "dev",
Expand All @@ -19,7 +17,7 @@
],
"require": {
"php": "~7.1",
"imagine/imagine": "^0.7",
"imagine/imagine": "^0.7 || ^1.0",
"freezy-bee/prepend-route": "~1.0",
"latte/latte": "~2.4",
"nette/di": "~2.4",
Expand All @@ -30,7 +28,7 @@
"tracy/tracy": "~2.4",
"nette/tester": "~2.0",
"squizlabs/php_codesniffer": "^3.0",
"phpstan/phpstan-shim": "^0.9.2"
"phpstan/phpstan-shim": "^0.10"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Generator.php
Expand Up @@ -83,7 +83,7 @@ public function generateImage(ImagineRequest $imageRequest): void
}

if ($image === null) {
throw new BadRequestException;
throw new BadRequestException();
}

$destination = $this->wwwDir . $this->request->getUrl()->getPath();
Expand Down
2 changes: 1 addition & 1 deletion tests/Mock/CopyProviderMock.php
Expand Up @@ -34,7 +34,7 @@ public function getImage(ImagineRequest $request): ?ImageInterface
return null;
}

$image = new Imagine;
$image = new Imagine();
return $image->open('http://fakeimg.pl/350x200/?text=Hello');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Mock/CropProviderMock.php
Expand Up @@ -54,7 +54,7 @@ public function getImage(ImagineRequest $request): ?ImageInterface

$this->used = true;

$image = new Imagine;
$image = new Imagine();
return $image
->open('http://fakeimg.pl/350x200/?text=Hello')
->crop(new Point(0, 0), new Box(10, 10));
Expand Down
4 changes: 2 additions & 2 deletions tests/Mock/PresenterMock.php
Expand Up @@ -26,8 +26,8 @@ public function actionDefault()
$template = $this->getTemplate();
$template->setFile(__DIR__ . '/template/file.latte');
$template->setParameters([
'file' => new RequestedImagineMock,
'fileWithoutNamespace' => new RequestedImagineWithoutNamespaceMock
'file' => new RequestedImagineMock(),
'fileWithoutNamespace' => new RequestedImagineWithoutNamespaceMock()
]);
}
}
2 changes: 1 addition & 1 deletion tests/Mock/RouteFactoryMock.php
Expand Up @@ -22,6 +22,6 @@ class RouteFactoryMock
*/
public function createRouter(): IRouter
{
return new RouteList;
return new RouteList();
}
}

0 comments on commit 7269232

Please sign in to comment.