Skip to content

Commit

Permalink
Applied fixes from FlintCI
Browse files Browse the repository at this point in the history
  • Loading branch information
soullivaneuh authored and greg0ire committed Apr 14, 2020
1 parent a041b80 commit 1408276
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/Block/Service/AbstractCategoriesBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(
}
}

public function execute(BlockContextInterface $blockContext, Response $response = null)
public function execute(BlockContextInterface $blockContext, ?Response $response = null)
{
$category = $this->getCategory($blockContext->getSetting('categoryId'), $blockContext->getSetting('category'));
$root = $this->categoryManager->getRootCategory($blockContext->getSetting('context'));
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Service/AbstractCollectionsBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct(
}
}

public function execute(BlockContextInterface $blockContext, Response $response = null)
public function execute(BlockContextInterface $blockContext, ?Response $response = null)
{
$collection = $this->getCollection($blockContext->getSetting('collectionId'), $blockContext->getSetting('collection'));
$collections = $this->collectionManager->findBy([
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Service/AbstractTagsBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(
}
}

public function execute(BlockContextInterface $blockContext, Response $response = null)
public function execute(BlockContextInterface $blockContext, ?Response $response = null)
{
$tag = $this->getTag($blockContext->getSetting('tagId'), $blockContext->getSetting('tag'));
$tags = $this->tagManager->findBy([
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/CategoryAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CategoryAdminController extends Controller
*
* @return Response
*/
public function listAction(Request $request = null)
public function listAction(?Request $request = null)
{
if (!$request->get('filter') && !$request->get('filters')) {
return new RedirectResponse($this->admin->generateUrl('tree', $request->query->all()));
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/CategoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getRootCategory($context = null)
return $this->categories[$context->getId()][0];
}

public function getRootCategoriesForContext(ContextInterface $context = null)
public function getRootCategoriesForContext(?ContextInterface $context = null)
{
if (null === $context) {
$context = $this->getContext();
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function hasChildren()
return \count($this->children) > 0;
}

public function setParent(CategoryInterface $parent = null, $nested = false)
public function setParent(?CategoryInterface $parent = null, $nested = false)
{
$this->parent = $parent;

Expand All @@ -241,7 +241,7 @@ public function getParent()
return $this->parent;
}

public function setMedia(MediaInterface $media = null)
public function setMedia(?MediaInterface $media = null)
{
$this->media = $media;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Model/CategoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function hasChildren();
* @param CategoryInterface|null $parent
* @param bool $nested
*/
public function setParent(self $parent = null, $nested = false);
public function setParent(?self $parent = null, $nested = false);

/**
* Get Parent.
Expand All @@ -131,7 +131,7 @@ public function getParent();
/**
* @param MediaInterface $media
*/
public function setMedia(MediaInterface $media = null);
public function setMedia(?MediaInterface $media = null);

/**
* @return MediaInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function getUpdatedAt()
return $this->updatedAt;
}

public function setMedia(MediaInterface $media = null)
public function setMedia(?MediaInterface $media = null)
{
$this->media = $media;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/CollectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function getUpdatedAt();
/**
* @param MediaInterface $media
*/
public function setMedia(MediaInterface $media = null);
public function setMedia(?MediaInterface $media = null);

/**
* @return MediaInterface
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getEnabled()
return $this->enabled;
}

public function setCreatedAt(\DateTime $createdAt = null)
public function setCreatedAt(?\DateTime $createdAt = null)
{
$this->createdAt = $createdAt;
}
Expand All @@ -75,7 +75,7 @@ public function getCreatedAt()
return $this->createdAt;
}

public function setUpdatedAt(\DateTime $updatedAt = null)
public function setUpdatedAt(?\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Model/ContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getId();
*
* @param \DateTime $createdAt
*/
public function setCreatedAt(\DateTime $createdAt = null);
public function setCreatedAt(?\DateTime $createdAt = null);

/**
* Get created_at.
Expand All @@ -78,7 +78,7 @@ public function getCreatedAt();
*
* @param \DateTime $updatedAt
*/
public function setUpdatedAt(\DateTime $updatedAt = null);
public function setUpdatedAt(?\DateTime $updatedAt = null);

/**
* Get updated_at.
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getSlug()
return $this->slug;
}

public function setCreatedAt(\DateTime $createdAt = null)
public function setCreatedAt(?\DateTime $createdAt = null)
{
$this->createdAt = $createdAt;
}
Expand All @@ -94,7 +94,7 @@ public function getCreatedAt()
return $this->createdAt;
}

public function setUpdatedAt(\DateTime $updatedAt = null)
public function setUpdatedAt(?\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Model/TagInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getSlug();
*
* @param \DateTime $createdAt
*/
public function setCreatedAt(\DateTime $createdAt = null);
public function setCreatedAt(?\DateTime $createdAt = null);

/**
* Get created_at.
Expand All @@ -76,7 +76,7 @@ public function getCreatedAt();
*
* @param \DateTime $updatedAt
*/
public function setUpdatedAt(\DateTime $updatedAt = null);
public function setUpdatedAt(?\DateTime $updatedAt = null);

/**
* Get updated_at.
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/CategoryAdminControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function setUp(): void
->willReturnCallback(static function (
$view,
array $parameters = [],
Response $response = null
?Response $response = null
) use (
&$params,
&$template
Expand Down

0 comments on commit 1408276

Please sign in to comment.