Backoffice/BusinessRules/Strategies/ContentStrategy.php
Avoid unused parameters such as '$parameters'. Open
Open
public function canRead(ContentInterface $content, array $parameters)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$parameters'. Open
Open
public function canDelete(ContentInterface $content, array $parameters)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$parameters'. Open
Open
public function canDeleteVersion(ContentInterface $content, array $parameters)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
public function canEdit(ContentInterface $content, array $parameters)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
public function canDelete(ContentInterface $content, array $parameters)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
public function canDeleteVersion(ContentInterface $content, array $parameters)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $contentRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $this->contentRepository->countNotDeletedByLanguage($content->getContentId(), $content->getLanguage()) > 1 && $this->isContentOnSiteAllowed($content) && !$content->getStatus()->isPublishedState();
- Create a ticketCreate a ticket
- Exclude checks
Call with 2 arg(s) to \OpenOrchestra\Backoffice\BusinessRules\Strategies\ContentStrategy::isContentOnSiteAllowed()
which only takes 1 arg(s) defined at /code/Backoffice/BusinessRules/Strategies/ContentStrategy.php:106
Open
Open
return $this->isContentOnSiteAllowed($content, $parameters) && !$content->getStatus()->isBlockedEdition();
- Create a ticketCreate a ticket
- Exclude checks
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
protected function isContentOnSiteAllowed(ContentInterface $content)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return ContentInterface::ENTITY_TYPE;
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLanguage
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $this->contentRepository->countNotDeletedByLanguage($content->getContentId(), $content->getLanguage()) > 1 && $this->isContentOnSiteAllowed($content) && !$content->getStatus()->isPublishedState();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $this->isContentOnSiteAllowed($content, $parameters) && !$content->getStatus()->isBlockedEdition();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentId
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $this->isContentOnSiteAllowed($content) && false === $this->contentRepository->hasContentIdWithoutAutoUnpublishToState($content->getContentId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method hasContentIdWithoutAutoUnpublishToState
from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
return $this->isContentOnSiteAllowed($content) && false === $this->contentRepository->hasContentIdWithoutAutoUnpublishToState($content->getContentId());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $siteRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method countNotDeletedByLanguage
from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
return $this->contentRepository->countNotDeletedByLanguage($content->getContentId(), $content->getLanguage()) > 1 && $this->isContentOnSiteAllowed($content) && !$content->getStatus()->isPublishedState();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentId
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $this->contentRepository->countNotDeletedByLanguage($content->getContentId(), $content->getLanguage()) > 1 && $this->isContentOnSiteAllowed($content) && !$content->getStatus()->isPublishedState();
- Create a ticketCreate a ticket
- Exclude checks
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
public function canRead(ContentInterface $content, array $parameters)
- Create a ticketCreate a ticket
- Exclude checks
Call to method findOneBySiteId
from undeclared class \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open
Open
$site = $this->siteRepository->findOneBySiteId($siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentType
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return in_array($content->getContentType(), $site->getContentTypes());
- Create a ticketCreate a ticket
- Exclude checks
PHP keywords must be lowercase; expected "const" but found "CONST" Open
Open
CONST DELETE_VERSION = 'DELETE_VERSION';
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 211 characters Open
Open
return $this->contentRepository->countNotDeletedByLanguage($content->getContentId(), $content->getLanguage()) > 1 && $this->isContentOnSiteAllowed($content) && !$content->getStatus()->isPublishedState();
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
Open
return $this->isContentOnSiteAllowed($content) && false === $this->contentRepository->hasContentIdWithoutAutoUnpublishToState($content->getContentId());
- Create a ticketCreate a ticket
- Exclude checks