Skip to content

Commit

Permalink
Fix CodeFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Barášek committed May 6, 2021
1 parent cb4c8ba commit e393d03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 14 additions & 6 deletions src/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ class Post
{
private ?ImageStorage $imageStorage = null;

private string $title;

private string $description;

private string $link;

private \DateTimeImmutable $date;

private ?string $creator = null;

/** @var string[] */
Expand All @@ -17,12 +25,12 @@ class Post
private ?string $mainImageUrl = null;


public function __construct(
private string $title,
private string $description,
private string $link,
private \DateTimeImmutable $date
) {
public function __construct(string $title, string $description, string $link, \DateTimeImmutable $date)
{
$this->title = $title;
$this->description = $description;
$this->link = $link;
$this->date = $date;
}


Expand Down
6 changes: 3 additions & 3 deletions src/WordpressPostFeedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getConfigSchema(): Schema
public function beforeCompile(): void
{
$builder = $this->getContainerBuilder();
/** @var mixed[] $config */
/** @var array<string, mixed> $config */
$config = $this->getConfig();

$builder->addDefinition($this->prefix('feed'))
Expand All @@ -41,8 +41,8 @@ public function beforeCompile(): void


/**
* @param mixed[] $config
* @param mixed[] $parameters
* @param array<string, mixed> $config
* @param array<string, mixed> $parameters
* @return string[]
*/
private function resolveImageStoragePath(array $config, array $parameters): array
Expand Down

0 comments on commit e393d03

Please sign in to comment.