Skip to content

Commit

Permalink
updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
konecnyjakub committed Oct 6, 2018
1 parent 16f9f5a commit d7e2100
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -18,7 +18,7 @@
},
"require-dev": {
"nexendrie/code-quality": "@dev",
"phpstan/phpstan-nette": "^0.9",
"phpstan/phpstan-nette": "^0.10",
"tracy/tracy": "^2.4"
},
"suggest": {
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon
Expand Up @@ -6,3 +6,10 @@ includes:
parameters:
ignoreErrors:
- '#(Instantiated c|C)lass Texy not found#'
- '#Parameter \#1 \$input of static method Nette\\Neon\\Neon::decode\(\) expects string, string\|false given#'
- '#Construct empty\(\) is not allowed. Use more strict comparison#'
- '#Cannot call method format\(\) on DateTime\|false#'
- '#Only booleans are allowed in an if condition, mixed given#'
- '#Property EventCalendar\\Goog\\[a-zA-Z0-9\\_]+::\$[a-zA-Z0-9\\_]+ has no typehint specified#'
- '#Method EventCalendar\\Goog\\[a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has no return typehint specified#'
- '#Method EventCalendar\\Goog\\[a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no typehint specified#'
6 changes: 3 additions & 3 deletions src/AbstractCalendar.php
Expand Up @@ -72,22 +72,22 @@ abstract protected function getTemplateFile(): string;
/**
* Specify the date on which the week starts
*/
public function setFirstDay(int $day)
public function setFirstDay(int $day): void
{
$this->firstDay = $day;
}

/**
* Changes default options, see OPT constants for currently supported options for each type of calendar
*/
public function setOptions(array $options)
public function setOptions(array $options): void
{
foreach ($options as $key => $value) {
$this->options[$key] = $value;
}
}

public function setEvents(IEventModel $events)
public function setEvents(IEventModel $events): void
{
$this->events = $events;
}
Expand Down
2 changes: 1 addition & 1 deletion src/BasicCalendar.php
Expand Up @@ -17,7 +17,7 @@ abstract class BasicCalendar extends AbstractCalendar
/**
* set translator for calendar control
*/
public function setTranslator(\Nette\Localization\ITranslator $translator)
public function setTranslator(\Nette\Localization\ITranslator $translator): void
{
$this->translator = $translator;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Goog/GoogCalendar.php
Expand Up @@ -67,7 +67,7 @@ protected function getTemplateFile(): string
return __DIR__ . '/GoogCalendar.latte';
}

public function setGoogAdapter(GoogAdapter $googAdapter)
public function setGoogAdapter(GoogAdapter $googAdapter): void
{
$this->googAdapter = $googAdapter;
}
Expand All @@ -76,7 +76,7 @@ public function setGoogAdapter(GoogAdapter $googAdapter)
* Do not set events directly, use GoogAdapter. Mix of events from Google with customs events is not implemented yet.
* @throws \LogicException
*/
public function setEvents(\EventCalendar\IEventModel $events)
public function setEvents(\EventCalendar\IEventModel $events): void
{
throw new \LogicException('Do not set events directly, use GoogAdapter.');
}
Expand Down
4 changes: 2 additions & 2 deletions src/Goog/GoogData.php
Expand Up @@ -26,12 +26,12 @@ class GoogData implements IEventModel
*/
private $description;

public function setName(string $name)
public function setName(string $name): void
{
$this->name = $name;
}

public function setDescription(string $description)
public function setDescription(string $description): void
{
$this->description = $description;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Simple/SimpleCalendar.php
Expand Up @@ -35,6 +35,7 @@ class SimpleCalendar extends AbstractCalendar
*/
public const OPT_BOTTOM_NAV_NEXT = 'bottomNavNext';

/** @var string */
protected $language = self::LANG_EN;

public function __construct()
Expand All @@ -48,7 +49,7 @@ public function __construct()
]);
}

public function setLanguage(string $lang)
public function setLanguage(string $lang): void
{
$this->language = $lang;
}
Expand Down
3 changes: 2 additions & 1 deletion tests/EventCalendar/Simple/TestEvent.php
Expand Up @@ -7,7 +7,8 @@

final class TestEvent implements IEventModel
{


/** @var array */
private $events = [];

public function __construct()
Expand Down

0 comments on commit d7e2100

Please sign in to comment.