Skip to content

Commit

Permalink
Merge pull request #286 from symfony-cmf/analysis-maYxQ7
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
dbu authored Feb 17, 2024
2 parents 83ca1b0 + 5406858 commit 43c99e0
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/DependencyInjection/CmfCoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ public function setupFormTypes(ContainerBuilder $container, LoaderInterface $loa
/**
* Load and configure the publish workflow services.
*
* @param $config
*
* @throws InvalidConfigurationException
*/
private function loadPublishWorkflow($config, XmlFileLoader $loader, ContainerBuilder $container)
Expand Down
2 changes: 1 addition & 1 deletion src/PublishWorkflow/Voter/PublishTimePeriodVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

namespace Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\Voter;

use function is_subclass_of;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use function is_subclass_of;

/**
* Workflow voter for the PublishTimePeriodReadInterface.
Expand Down
2 changes: 1 addition & 1 deletion src/PublishWorkflow/Voter/PublishableVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

namespace Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\Voter;

use function is_subclass_of;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use function is_subclass_of;

/**
* Workflow voter for the PublishableReadInterface.
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Authorization/Voter/PublishedVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

namespace Symfony\Cmf\Bundle\CoreBundle\Security\Authorization\Voter;

use function is_subclass_of;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use function is_subclass_of;

/**
* This is a security voter registered with the Symfony security system that
Expand Down
7 changes: 0 additions & 7 deletions src/Templating/Helper/Cmf.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class Cmf
*/
private $publishWorkflowChecker;

/**
* @param AuthorizationCheckerInterface $publishWorkflowChecker
*/
public function __construct(AuthorizationCheckerInterface $publishWorkflowChecker = null)
{
$this->publishWorkflowChecker = $publishWorkflowChecker;
Expand Down Expand Up @@ -133,8 +130,6 @@ public function getPath($document)
/**
* Finds a document by path.
*
* @param $path
*
* @return object|null
*/
public function find($path)
Expand Down Expand Up @@ -474,8 +469,6 @@ public function getDescendants($parent, ?int $depth = null): array
/**
* Check children for a possible following document.
*
* @param bool $ignoreRole
*
* @return object|null
*/
private function checkChildren(array $childNames, string $path, ?bool $ignoreRole = false, ?string $class = null)
Expand Down
2 changes: 0 additions & 2 deletions src/Templating/Helper/CmfHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public function getPath($document)
/**
* Finds a document by path.
*
* @param $path
*
* @return object|null
*/
public function find($path)
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Form/CheckboxUrlLabelFormTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private function getFormRenderer()

protected function assertMatchesXpath($html, $expression, $count = 1)
{
$dom = new \DomDocument('UTF-8');
$dom = new \DOMDocument('UTF-8');

try {
// Wrap in <root> node so we can load HTML with multiple tags at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Unit\PublishWorkflow\Voter;

use function is_subclass_of;
use PHPUnit\Framework\TestCase;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker;
Expand All @@ -21,6 +20,7 @@
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
use function is_subclass_of;

class PublishTimePeriodVoterTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/PublishWorkflow/Voter/PublishableVoterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Unit\PublishWorkflow\Voter;

use function is_subclass_of;
use PHPUnit\Framework\TestCase;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableReadInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker;
Expand All @@ -21,6 +20,7 @@
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
use function is_subclass_of;

class PublishableVoterTest extends TestCase
{
Expand Down

0 comments on commit 43c99e0

Please sign in to comment.