diff --git a/Command/AutoClosingCommand.php b/Command/AutoClosingCommand.php index 8454fef8..2529dac5 100644 --- a/Command/AutoClosingCommand.php +++ b/Command/AutoClosingCommand.php @@ -9,6 +9,9 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class AutoClosingCommand extends ContainerAwareCommand { protected static $defaultName = 'ticket:autoclosing'; diff --git a/Command/TicketManagerCommand.php b/Command/TicketManagerCommand.php index c73d7e0d..c0a80f4c 100644 --- a/Command/TicketManagerCommand.php +++ b/Command/TicketManagerCommand.php @@ -9,6 +9,9 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketManagerCommand extends ContainerAwareCommand { protected static $defaultName = 'ticket:create'; diff --git a/Component/TicketFeatures.php b/Component/TicketFeatures.php index 158d357b..92507991 100644 --- a/Component/TicketFeatures.php +++ b/Component/TicketFeatures.php @@ -4,6 +4,9 @@ use Hackzilla\Bundle\TicketBundle\Model\TicketFeature\MessageAttachmentInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketFeatures { private $features; diff --git a/Controller/TicketAttachmentController.php b/Controller/TicketAttachmentController.php index 32274efa..16c49d91 100644 --- a/Controller/TicketAttachmentController.php +++ b/Controller/TicketAttachmentController.php @@ -9,6 +9,8 @@ * Ticket Attachment controller. * * Download attachments + * + * @final since hackzilla/ticket-bundle 3.x. */ class TicketAttachmentController extends Controller { diff --git a/Controller/TicketController.php b/Controller/TicketController.php index 3a87ae7c..9c646d29 100644 --- a/Controller/TicketController.php +++ b/Controller/TicketController.php @@ -15,6 +15,8 @@ /** * Ticket controller. + * + * @final since hackzilla/ticket-bundle 3.x. */ class TicketController extends Controller { diff --git a/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php b/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php index 8b4222ca..e02c7fab 100644 --- a/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php +++ b/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php @@ -6,6 +6,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class DoctrineOrmMappingsPass extends \Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass { public function __construct($driver = null, array $namespaces = [], $managerParameters = [], $enabledParameter = false, array $aliasMap = []) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index c4f63254..bf239242 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -9,6 +9,8 @@ * This is the class that validates and merges configuration from your app/config files. * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} + * + * @final since hackzilla/ticket-bundle 3.x. */ class Configuration implements ConfigurationInterface { diff --git a/DependencyInjection/HackzillaTicketExtension.php b/DependencyInjection/HackzillaTicketExtension.php index 5ab6c915..fbb51547 100644 --- a/DependencyInjection/HackzillaTicketExtension.php +++ b/DependencyInjection/HackzillaTicketExtension.php @@ -11,6 +11,8 @@ * This is the class that loads and manages your bundle configuration. * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} + * + * @final since hackzilla/ticket-bundle 3.x. */ class HackzillaTicketExtension extends Extension { diff --git a/Event/TicketEvent.php b/Event/TicketEvent.php index 5c5e292b..c4706ae1 100644 --- a/Event/TicketEvent.php +++ b/Event/TicketEvent.php @@ -5,6 +5,9 @@ use Hackzilla\Bundle\TicketBundle\Model\TicketInterface; use Symfony\Component\EventDispatcher\Event; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketEvent extends Event { protected $ticket; diff --git a/EventListener/FileSubscriber.php b/EventListener/FileSubscriber.php index 62850f9a..c5166d3d 100644 --- a/EventListener/FileSubscriber.php +++ b/EventListener/FileSubscriber.php @@ -10,6 +10,8 @@ * Class FileSubscriber. * * Source: https://gist.github.com/hubgit/0cdf96c296f20017fe91#file-filesubscriber-php + * + * @final since hackzilla/ticket-bundle 3.x. */ class FileSubscriber implements EventSubscriberInterface { diff --git a/EventListener/UserLoad.php b/EventListener/UserLoad.php index 46d72e2a..823482ed 100644 --- a/EventListener/UserLoad.php +++ b/EventListener/UserLoad.php @@ -6,6 +6,9 @@ use Hackzilla\Bundle\TicketBundle\Model\TicketInterface; use Hackzilla\Bundle\TicketBundle\Model\TicketMessageInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class UserLoad { protected $userRepository; diff --git a/Form/DataTransformer/StatusTransformer.php b/Form/DataTransformer/StatusTransformer.php index d4c51e44..f6fca90a 100644 --- a/Form/DataTransformer/StatusTransformer.php +++ b/Form/DataTransformer/StatusTransformer.php @@ -5,6 +5,9 @@ use Hackzilla\Bundle\TicketBundle\Entity\TicketMessage; use Symfony\Component\Form\DataTransformerInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class StatusTransformer implements DataTransformerInterface { /** @@ -19,6 +22,8 @@ public function transform($number) if (TicketMessage::STATUS_CLOSED == $number) { return 1; } + + return null; } /** @@ -33,5 +38,7 @@ public function reverseTransform($number) if (1 == $number) { return TicketMessage::STATUS_CLOSED; } + + return null; } } diff --git a/Form/Type/PriorityType.php b/Form/Type/PriorityType.php index a3750bae..90997b92 100644 --- a/Form/Type/PriorityType.php +++ b/Form/Type/PriorityType.php @@ -8,6 +8,9 @@ use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class PriorityType extends AbstractType { public function configureOptions(OptionsResolver $resolver) diff --git a/Form/Type/StatusType.php b/Form/Type/StatusType.php index 49cc4b8a..18f99f14 100644 --- a/Form/Type/StatusType.php +++ b/Form/Type/StatusType.php @@ -8,6 +8,9 @@ use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class StatusType extends AbstractType { public function configureOptions(OptionsResolver $resolver) diff --git a/Form/Type/TicketMessageType.php b/Form/Type/TicketMessageType.php index 776bf194..ab612809 100644 --- a/Form/Type/TicketMessageType.php +++ b/Form/Type/TicketMessageType.php @@ -13,6 +13,9 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketMessageType extends AbstractType { protected $userManager; diff --git a/Form/Type/TicketType.php b/Form/Type/TicketType.php index ce1c052b..64de9f0e 100644 --- a/Form/Type/TicketType.php +++ b/Form/Type/TicketType.php @@ -8,6 +8,9 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketType extends AbstractType { protected $ticketClass; diff --git a/Manager/TicketManager.php b/Manager/TicketManager.php index 5c37dd94..34116c04 100644 --- a/Manager/TicketManager.php +++ b/Manager/TicketManager.php @@ -9,6 +9,9 @@ use Hackzilla\Bundle\TicketBundle\TicketRole; use Symfony\Component\Translation\TranslatorInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketManager implements TicketManagerInterface { private $translator; diff --git a/Manager/UserManager.php b/Manager/UserManager.php index 43f4d559..12191cc1 100644 --- a/Manager/UserManager.php +++ b/Manager/UserManager.php @@ -10,6 +10,9 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class UserManager implements UserManagerInterface { /** @@ -59,7 +62,7 @@ public function getCurrentUser() public function getUserById($userId) { if (!$userId) { - return; + return null; } return $this->userRepository->find($userId); diff --git a/Tests/Component/TicketFeaturesTest.php b/Tests/Component/TicketFeaturesTest.php index cb729aef..e3da61ca 100644 --- a/Tests/Component/TicketFeaturesTest.php +++ b/Tests/Component/TicketFeaturesTest.php @@ -32,11 +32,10 @@ public function constructProvider() /** * @dataProvider featureAttachmentProvider * - * @param array $features * @param string $class * @param bool|null $compare */ - public function testFeatureAttachment($features, $class, $compare) + public function testFeatureAttachment(array $features, $class, $compare) { $obj = new TicketFeatures($features, $class); diff --git a/TicketRole.php b/TicketRole.php index 086bacc0..605311bb 100644 --- a/TicketRole.php +++ b/TicketRole.php @@ -2,6 +2,9 @@ namespace Hackzilla\Bundle\TicketBundle; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketRole { const ADMIN = 'ROLE_TICKET_ADMIN'; diff --git a/TwigExtension/TicketFeatureExtension.php b/TwigExtension/TicketFeatureExtension.php index ceddbc47..6612d25f 100644 --- a/TwigExtension/TicketFeatureExtension.php +++ b/TwigExtension/TicketFeatureExtension.php @@ -6,6 +6,9 @@ use Twig\Extension\AbstractExtension; use Twig\TwigFunction; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketFeatureExtension extends AbstractExtension { private $ticketFeatures; diff --git a/TwigExtension/TicketGlobalExtension.php b/TwigExtension/TicketGlobalExtension.php index 2a25f79a..beb6ae9b 100644 --- a/TwigExtension/TicketGlobalExtension.php +++ b/TwigExtension/TicketGlobalExtension.php @@ -5,6 +5,9 @@ use Twig\Extension\AbstractExtension; use Twig\Extension\GlobalsInterface; +/** + * @final since hackzilla/ticket-bundle 3.x. + */ class TicketGlobalExtension extends AbstractExtension implements GlobalsInterface { protected $templates = [];