open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Tests/Security/Authorization/Voter/DeveloperToolVoterTest.php

Summary

Maintainability
B
4 hrs
Test Coverage

Method getBadRoles has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getBadRoles()
    {
        $actions = array(
            'Read'   => ContributionActionInterface::READ,
            'Edit'   => ContributionActionInterface::EDIT,

Method getNotSupportedSubjects has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getNotSupportedSubjects()
    {
        $node = $this->createPhakeNode();
        $content = $this->createPhakeContent();
        $trashItem = $this->createPhakeTrashItem();

Function getBadRoles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function getBadRoles()
    {
        $actions = array(
            'Read'   => ContributionActionInterface::READ,
            'Edit'   => ContributionActionInterface::EDIT,
Severity: Minor
Found in Backoffice/Tests/Security/Authorization/Voter/DeveloperToolVoterTest.php - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

The class DeveloperToolVoterTest has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
Open

class DeveloperToolVoterTest extends AbstractVoterTest
{
    /**
     * Set up the test
     */

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Api client'              => array($client,                           ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\SiteInterface
Open

            'Bad subject : Entity type Site'        => array(SiteInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Log'         => array(LogInterface::ENTITY_TYPE,         ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open

            'Ok : Read entity type workflow'       => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Delete status'                   => array($status,                               ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\StatusInterface
Open

            'Ok : Create entity type status'       => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open

            'Bad subject : Entity type Keyword'     => array(KeywordInterface::ENTITY_TYPE,     ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

            'Bad subject : Entity type Api client'  => array(ApiClientInterface::ENTITY_TYPE,   ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Keyword'                 => array($keyword,                          ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open

            'Ok : Create entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Create entity type workflow'     => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Keyword'     => array(KeywordInterface::ENTITY_TYPE,     ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad action : Trash Purge'   => array($profile, ContributionActionInterface::TRASH_PURGE,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Delete profile'                  => array($profile,                              ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open

            'Ok : Delete entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open

            'Ok : Create entity type workflow'     => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Redirection'             => array($redirection,                      ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Site'        => array(SiteInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Edit content type'               => array($contentType,                          ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\UserBundle\Model\UserInterface
Open

            'Bad subject : Entity type User'        => array(UserInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Edit profile'                    => array($profile,                              ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Log'                     => array($log,                              ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : User'                    => array($user,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Group'                   => array($group,                            ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Delete content type'             => array($contentType,                          ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Read entity type status'         => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Node'                    => array($node,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Group'       => array(GroupInterface::ENTITY_TYPE,       ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad action : Trash Restore' => array($profile, ContributionActionInterface::TRASH_RESTORE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Edit status'                     => array($status,                               ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Create entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Content'                 => array($content,                          ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Trash Item'              => array($trashItem,                        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Redirection' => array(RedirectionInterface::ENTITY_TYPE, ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open

            'entity type workflow'      => WorkflowProfileInterface::ENTITY_TYPE,

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Read profile'                    => array($profile,                              ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Read entity type workflow'       => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\StatusInterface
Open

            'Ok : Read entity type status'         => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Site'                    => array($site,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_DENIED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

                    $badRoles[$key1 . $key2 . $label] = array($subject, $action, $role, null, VoterInterface::ACCESS_DENIED);

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Create entity type status'       => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type User'        => array(UserInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Add status'                      => array($status,                               ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open

            'entity type content type'  => ContentTypeInterface::ENTITY_TYPE,

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Read content type'               => array($contentType,                          ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Add content type'                => array($contentType,                          ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Read status'                     => array($status,                               ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Delete entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\RedirectionInterface
Open

            'Bad subject : Entity type Redirection' => array(RedirectionInterface::ENTITY_TYPE, ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ACCESS_ABSTAIN from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Bad subject : Entity type Api client'  => array(ApiClientInterface::ENTITY_TYPE,   ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\StatusInterface
Open

            'entity type status'        => StatusInterface::ENTITY_TYPE,

Reference to constant ACCESS_GRANTED from undeclared class \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface
Open

            'Ok : Add profile'                     => array($profile,                              ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    protected function getNotSupportedAttributes()
    {
        $profile = $this->createPhakeWorkflowProfile();

        return array(
Backoffice/Tests/Security/Authorization/Voter/ContentVoterTest.php on lines 77..85
Backoffice/Tests/Security/Authorization/Voter/NodeNotHydratedVoterTest.php on lines 84..92
Backoffice/Tests/Security/Authorization/Voter/NodeVoterTest.php on lines 82..90
Backoffice/Tests/Security/Authorization/Voter/PlatformAdministrationVoterTest.php on lines 78..86
Backoffice/Tests/Security/Authorization/Voter/SiteAdministrationVoterTest.php on lines 69..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        foreach ($actions as $label => $action) {
            $key1 = 'Bad role (' . $label;

            foreach ($subjects as $label => $subject) {
                $key2 = ' ' . $label . ') : ';
Backoffice/Tests/Security/Authorization/Voter/SiteAdministrationVoterTest.php on lines 142..152

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Api client'              => array($client,                           ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 187 characters
Open

            'Bad action : Trash Purge'   => array($profile, ContributionActionInterface::TRASH_PURGE,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 187 characters
Open

            'Bad action : Trash Restore' => array($profile, ContributionActionInterface::TRASH_RESTORE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Redirection' => array(RedirectionInterface::ENTITY_TYPE, ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Delete content type'             => array($contentType,                          ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Edit profile'                    => array($profile,                              ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Delete entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : User'                    => array($user,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Group'                   => array($group,                            ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Site'        => array(SiteInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Add status'                      => array($status,                               ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Node'                    => array($node,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Trash Item'              => array($trashItem,                        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Redirection'             => array($redirection,                      ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Log'         => array(LogInterface::ENTITY_TYPE,         ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Keyword'     => array(KeywordInterface::ENTITY_TYPE,     ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Delete status'                   => array($status,                               ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Create entity type content type' => array(ContentTypeInterface::ENTITY_TYPE,     ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Delete profile'                  => array($profile,                              ContributionActionInterface::DELETE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Read entity type status'         => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Edit status'                     => array($status,                               ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Group'       => array(GroupInterface::ENTITY_TYPE,       ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type Api client'  => array(ApiClientInterface::ENTITY_TYPE,   ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Read profile'                    => array($profile,                              ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Read entity type workflow'       => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Read content type'               => array($contentType,                          ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Add content type'                => array($contentType,                          ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Edit content type'               => array($contentType,                          ContributionActionInterface::EDIT,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Content'                 => array($content,                          ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Site'                    => array($site,                             ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Keyword'                 => array($keyword,                          ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Read status'                     => array($status,                               ContributionActionInterface::READ,   array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Create entity type status'       => array(StatusInterface::ENTITY_TYPE,          ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 125 characters
Open

                    $badRoles[$key1 . $key2 . $label] = array($subject, $action, $role, null, VoterInterface::ACCESS_DENIED);

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Entity type User'        => array(UserInterface::ENTITY_TYPE,        ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Add profile'                     => array($profile,                              ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 219 characters
Open

            'Ok : Create entity type workflow'     => array(WorkflowProfileInterface::ENTITY_TYPE, ContributionActionInterface::CREATE, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_GRANTED),

Line exceeds 120 characters; contains 214 characters
Open

            'Bad subject : Log'                     => array($log,                              ContributionActionInterface::READ, array(ContributionRoleInterface::DEVELOPER), null, VoterInterface::ACCESS_ABSTAIN),

There are no issues that match your filters.

Category
Status