Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Jul 27, 2018
1 parent 779b829 commit fb420b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
},
"require-dev": {
"arachne/codeception": "^0.8.0",
"codeception/codeception": "^2.3.2",
"codeception/codeception": "^2.4.3",
"eloquent/phony": "^3.0.0",
"eloquent/phony-phpunit": "^4.0.0",
"eloquent/phpstan-phony": "^0.1.1",
"eloquent/phpstan-phony": "^0.3.0",
"friendsofphp/php-cs-fixer": "^2.8.0",
"kdyby/doctrine-cache": "^2.6.1",
"latte/latte": "^2.4.0",
"phpstan/phpstan": "^0.9.0",
"phpstan/phpstan-nette": "^0.9.0"
"phpstan/phpstan": "^0.10.0",
"phpstan/phpstan-nette": "^0.10.0",
"phpstan/phpstan-strict-rules": "^0.10.0"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
includes:
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/eloquent/phpstan-phony/phony.neon
- vendor/arachne/codeception/extension.neon

Expand Down
4 changes: 2 additions & 2 deletions src/Application/ComponentsProtectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ trait ComponentsProtectionTrait
/**
* @param Reader $reader
*/
final public function injectReader(Reader $reader)
final public function injectReader(Reader $reader): void
{
$this->reader = $reader;
}
Expand All @@ -41,7 +41,7 @@ public function checkRequirements($reflection): void
if (
$reflection instanceof ReflectionMethod
&& substr($reflection->getName(), 0, 15) === 'createComponent'
&& !$this->reader->getMethodAnnotation($reflection, Actions::class)
&& $this->reader->getMethodAnnotation($reflection, Actions::class) === null
) {
$name = lcfirst(substr($reflection->getName(), 15));
throw new MissingAnnotationException(sprintf('Missing annotation @%s for component "%s".', Actions::class, $name));
Expand Down
4 changes: 1 addition & 3 deletions src/Rules/ActionsRuleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
class ActionsRuleHandler implements RuleHandlerInterface
{
/**
* @param Actions $rule
*
* @throws VerificationException
*/
public function checkRule(RuleInterface $rule, Request $request, ?string $component = null): void
Expand All @@ -32,7 +30,7 @@ public function checkRule(RuleInterface $rule, Request $request, ?string $compon
}

$parameters = $request->getParameters();
if (!in_array($parameters[Presenter::ACTION_KEY], $rule->actions)) {
if (!in_array($parameters[Presenter::ACTION_KEY], $rule->actions, true)) {
throw new VerificationException($rule, 'Component is inaccessible for the given action.');
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/src/Classes/ArticlePresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ protected function createComponentUnprotected(): void

public function formatTemplateFiles(): array
{
/** @var string */
$name = $this->getName();
$presenter = substr($name, strrpos(':'.$name, ':'));
$presenter = substr($name, (int) strrpos(':'.$name, ':'));

return [__DIR__."/../../templates/$presenter.$this->view.latte"];
}
Expand Down

0 comments on commit fb420b1

Please sign in to comment.