Skip to content

Commit

Permalink
Updated plugin partially fixing cs
Browse files Browse the repository at this point in the history
  • Loading branch information
shinde-rahul committed Jan 4, 2024
1 parent fe159fe commit e2ccdb2
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 161 deletions.
9 changes: 1 addition & 8 deletions EventListener/IntegrationRequestSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\EventListener;

Expand Down
9 changes: 1 addition & 8 deletions EventListener/LeadSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\EventListener;

Expand Down
30 changes: 7 additions & 23 deletions EventListener/StatsSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\EventListener;

use Doctrine\ORM\EntityManager;
use Mautic\CoreBundle\EventListener\CommonStatsSubscriber;
use Mautic\CoreBundle\Security\Permissions\CorePermissions;
use MauticPlugin\LeuchtfeuerGoToBundle\Entity\GoToEvent;

/**
* Class StatsSubscriber.
*/
class StatsSubscriber extends CommonStatsSubscriber
{
/**
* @var EntityManager
*/
protected $em;

/**
* StatsSubscriber constructor.
*/
public function __construct(EntityManager $em)
public function __construct(CorePermissions $security, EntityManager $entityManager)
{
$this->addContactRestrictedRepositories(
$em,
[
'LeuchtfeuerGoToBundle:GoToEvent',
]
);
parent::__construct($security, $entityManager);

$this->addContactRestrictedRepositories([GoToEvent::class]);
}
}
9 changes: 1 addition & 8 deletions Helper/BasicEnum.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Helper;

Expand Down
2 changes: 2 additions & 0 deletions Helper/GoToDetailKeywords.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Helper;

class GoToDetailKeywords extends BasicEnum
Expand Down
2 changes: 2 additions & 0 deletions Helper/GoToHelper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Helper;

use Mautic\PluginBundle\Exception\ApiErrorException;
Expand Down
9 changes: 1 addition & 8 deletions Helper/GoToProductTypes.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Helper;

Expand Down
24 changes: 3 additions & 21 deletions Integration/GotoassistIntegration.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Integration;

/**
* Class HubspotIntegration.
*/
class GotoassistIntegration extends GoToAbstractIntegration
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
public function getName(): string
{
return 'Gotoassist';
}

/**
* @return string
*/
public function getDisplayName()
public function getDisplayName(): string
{
return 'GoToAssist';
}
Expand Down
24 changes: 3 additions & 21 deletions Integration/GotomeetingIntegration.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Integration;

/**
* Class HubspotIntegration.
*/
class GotomeetingIntegration extends GoToAbstractIntegration
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
public function getName(): string
{
return 'Gotomeeting';
}

/**
* @return string
*/
public function getDisplayName()
public function getDisplayName(): string
{
return 'GoToMeeting';
}
Expand Down
24 changes: 3 additions & 21 deletions Integration/GototrainingIntegration.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Integration;

/**
* Class HubspotIntegration.
*/
class GototrainingIntegration extends GoToAbstractIntegration
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
public function getName(): string
{
return 'Gototraining';
}

/**
* @return string
*/
public function getDisplayName()
public function getDisplayName(): string
{
return 'GoToTraining';
}
Expand Down
24 changes: 3 additions & 21 deletions Integration/GotowebinarIntegration.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Integration;

/**
* Class HubspotIntegration.
*/
class GotowebinarIntegration extends GoToAbstractIntegration
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
public function getName(): string
{
return 'Gotowebinar';
}

/**
* @return string
*/
public function getDisplayName()
public function getDisplayName(): string
{
return 'GoToWebinar';
}
Expand Down
19 changes: 5 additions & 14 deletions Tests/DataFixtures/ORM/LoadCitrixData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectManager;
use Mautic\LeadBundle\Entity\Lead;
use MauticPlugin\LeuchtfeuerGoToBundle\Entity\GoToEvent;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
Expand All @@ -24,20 +24,14 @@
*/
class LoadCitrixData extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface
{
/**
* @var ContainerInterface
*/
private $container;
private ContainerInterface $container;

/**
* {@inheritdoc}
*/
public function setContainer(ContainerInterface $container = null)
public function setContainer(ContainerInterface $container = null): void
{
$this->container = $container;
}

public function load(ObjectManager $manager)
public function load(ObjectManager $manager): void
{
$em = $this->container->get('doctrine')->getManager();
$today = new \DateTime();
Expand Down Expand Up @@ -70,10 +64,7 @@ public function load(ObjectManager $manager)
$this->setReference('citrix-event', $event);
}

/**
* {@inheritdoc}
*/
public function getOrder()
public function getOrder(): int
{
return 10;
}
Expand Down
9 changes: 1 addition & 8 deletions Tests/Model/CitrixModelTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace MauticPlugin\LeuchtfeuerGoToBundle\Tests\Model;

Expand Down

0 comments on commit e2ccdb2

Please sign in to comment.