@@ -2,14 +2,14 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\DependencyInjection; |
| 4 | 4 | |
| 5 | -use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor; |
|
| 6 | 5 | use Symfony\Component\Config\FileLocator; |
| 6 | +use Symfony\Component\Config\Resource\FileResource; |
|
| 7 | 7 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 8 | 8 | use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; |
| 9 | 9 | use Symfony\Component\DependencyInjection\Loader; |
| 10 | 10 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
| 11 | -use Symfony\Component\Config\Resource\FileResource; |
|
| 12 | 11 | use Symfony\Component\Yaml\Yaml; |
| 12 | +use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor; |
|
| 13 | 13 | use function array_merge; |
| 14 | 14 | |
| 15 | 15 | /** |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | - * @param $contentTypeIdentifier |
|
| 236 | + * @param string $contentTypeIdentifier |
|
| 237 | 237 | * @param array $collectedFields |
| 238 | 238 | * |
| 239 | 239 | * @return BinaryFile[]|null |
@@ -5,14 +5,14 @@ |
||
| 5 | 5 | namespace Netgen\InformationCollection\Core\Factory; |
| 6 | 6 | |
| 7 | 7 | use function array_key_exists; |
| 8 | -use eZ\Publish\API\Repository\ContentService; |
|
| 9 | -use eZ\Publish\Core\FieldType\BinaryFile\Value as BinaryFile; |
|
| 10 | -use eZ\Publish\Core\Helper\FieldHelper; |
|
| 11 | -use eZ\Publish\Core\Helper\TranslationHelper; |
|
| 12 | 8 | use Netgen\InformationCollection\API\Constants; |
| 13 | 9 | use Netgen\InformationCollection\API\Exception\MissingEmailBlockException; |
| 14 | 10 | use Netgen\InformationCollection\API\Exception\MissingValueException; |
| 15 | 11 | use Netgen\InformationCollection\API\Value\Event\InformationCollected; |
| 12 | +use eZ\Publish\API\Repository\ContentService; |
|
| 13 | +use eZ\Publish\Core\FieldType\BinaryFile\Value as BinaryFile; |
|
| 14 | +use eZ\Publish\Core\Helper\FieldHelper; |
|
| 15 | +use eZ\Publish\Core\Helper\TranslationHelper; |
|
| 16 | 16 | use function trim; |
| 17 | 17 | use Twig_Environment; |
| 18 | 18 | |
@@ -2,6 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\Command; |
| 4 | 4 | |
| 5 | +use DateInterval; |
|
| 6 | +use DateTime; |
|
| 7 | +use Exception; |
|
| 5 | 8 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
| 6 | 9 | use Symfony\Component\Console\Command\HelpCommand; |
| 7 | 10 | use Symfony\Component\Console\Input\InputDefinition; |
@@ -9,9 +12,6 @@ discard block |
||
| 9 | 12 | use Symfony\Component\Console\Input\InputOption; |
| 10 | 13 | use Symfony\Component\Console\Output\OutputInterface; |
| 11 | 14 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
| 12 | -use DateInterval; |
|
| 13 | -use DateTime; |
|
| 14 | -use Exception; |
|
| 15 | 15 | |
| 16 | 16 | class DataAnonymizerCommand extends ContainerAwareCommand |
| 17 | 17 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\DependencyInjection; |
| 4 | 4 | |
| 5 | -use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration; |
|
| 6 | -use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 7 | 5 | use Symfony\Component\Config\Definition\Builder\NodeBuilder; |
| 6 | +use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 7 | +use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * This is the class that validates and merges configuration from your app/config files. |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @param int $contentId Content id |
| 51 | 51 | * @param array $fields Fields list |
| 52 | - * @param DateTime|null $date Anonymize collections older that this date |
|
| 52 | + * @param null|\DateTimeImmutable $date Anonymize collections older that this date |
|
| 53 | 53 | * |
| 54 | 54 | * @return int |
| 55 | 55 | */ |
@@ -73,9 +73,8 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Map field id's to list of field identifiers. |
| 75 | 75 | * |
| 76 | - * @param int $content |
|
| 77 | 76 | * @param array $fieldIdentifiers |
| 78 | - * @param mixed $contentId |
|
| 77 | + * @param integer $contentId |
|
| 79 | 78 | * |
| 80 | 79 | * @return array |
| 81 | 80 | */ |
@@ -93,6 +92,9 @@ discard block |
||
| 93 | 92 | return $ids; |
| 94 | 93 | } |
| 95 | 94 | |
| 95 | + /** |
|
| 96 | + * @param integer $contentId |
|
| 97 | + */ |
|
| 96 | 98 | private function getCollections($contentId, \DateTimeImmutable $date = null) |
| 97 | 99 | { |
| 98 | 100 | if (null === $date) { |
@@ -41,8 +41,6 @@ |
||
| 41 | 41 | * |
| 42 | 42 | * @param FormFactoryInterface $formFactory |
| 43 | 43 | * @param ContentTypeService $contentTypeService |
| 44 | - * @param RouterInterface $router |
|
| 45 | - * @param bool $useCsrf |
|
| 46 | 44 | */ |
| 47 | 45 | public function __construct(FormFactoryInterface $formFactory, ContentTypeService $contentTypeService) |
| 48 | 46 | { |
@@ -4,8 +4,6 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace Netgen\InformationCollection\Form\Builder; |
| 6 | 6 | |
| 7 | -use eZ\Publish\API\Repository\ContentTypeService; |
|
| 8 | -use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 9 | 7 | use Netgen\InformationCollection\API\Form\DynamicFormBuilderInterface; |
| 10 | 8 | use Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionMapper; |
| 11 | 9 | use Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionType; |
@@ -13,6 +11,8 @@ discard block |
||
| 13 | 11 | use Symfony\Component\Form\FormFactoryInterface; |
| 14 | 12 | use Symfony\Component\Form\FormInterface; |
| 15 | 13 | use Symfony\Component\Routing\RouterInterface; |
| 14 | +use eZ\Publish\API\Repository\ContentTypeService; |
|
| 15 | +use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 16 | 16 | |
| 17 | 17 | class FormBuilder implements DynamicFormBuilderInterface |
| 18 | 18 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * Displays individual collection details |
| 134 | 134 | * |
| 135 | - * @param int $collectionId |
|
| 135 | + * @param int $collection |
|
| 136 | 136 | * |
| 137 | 137 | * @return \Symfony\Component\HttpFoundation\Response |
| 138 | 138 | */ |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | * |
| 320 | 320 | * @param string $messageType |
| 321 | 321 | * @param string $message |
| 322 | - * @param string $count |
|
| 322 | + * @param integer $count |
|
| 323 | 323 | * @param array $parameters |
| 324 | 324 | */ |
| 325 | 325 | protected function addFlashMessage($messageType, $message, $count = 1, array $parameters = array()) |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | * Returns configured instance of Pagerfanta |
| 340 | 340 | * |
| 341 | 341 | * @param \Pagerfanta\Adapter\AdapterInterface $adapter |
| 342 | - * @param $currentPage |
|
| 342 | + * @param integer $currentPage |
|
| 343 | 343 | * |
| 344 | 344 | * @return \Pagerfanta\Pagerfanta |
| 345 | 345 | */ |
@@ -2,11 +2,6 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\Controller\Admin; |
| 4 | 4 | |
| 5 | -use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 6 | -use eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute; |
|
| 7 | -use eZ\Bundle\EzPublishCoreBundle\Controller; |
|
| 8 | -use eZ\Publish\API\Repository\ContentService; |
|
| 9 | -use eZ\Publish\Core\MVC\ConfigResolverInterface; |
|
| 10 | 5 | use Netgen\InformationCollection\API\Persistence\Anonymizer\Anonymizer; |
| 11 | 6 | use Netgen\InformationCollection\API\Service\InformationCollection; |
| 12 | 7 | use Netgen\InformationCollection\API\Value\Collection; |
@@ -22,6 +17,11 @@ discard block |
||
| 22 | 17 | use Pagerfanta\Adapter\AdapterInterface; |
| 23 | 18 | use Pagerfanta\Pagerfanta; |
| 24 | 19 | use Symfony\Component\HttpFoundation\Request; |
| 20 | +use eZ\Bundle\EzPublishCoreBundle\Controller; |
|
| 21 | +use eZ\Publish\API\Repository\ContentService; |
|
| 22 | +use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 23 | +use eZ\Publish\Core\MVC\ConfigResolverInterface; |
|
| 24 | +use eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute; |
|
| 25 | 25 | |
| 26 | 26 | class AdminController extends Controller |
| 27 | 27 | { |
@@ -4,10 +4,10 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Netgen\InformationCollection\API\Value; |
| 6 | 6 | |
| 7 | +use Netgen\InformationCollection\Doctrine\Entity\EzInfoCollectionAttribute; |
|
| 8 | +use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition; |
|
| 7 | 9 | use eZ\Publish\API\Repository\Values\Content\Content; |
| 8 | 10 | use eZ\Publish\API\Repository\Values\Content\Field; |
| 9 | -use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition; |
|
| 10 | -use Netgen\InformationCollection\Doctrine\Entity\EzInfoCollectionAttribute; |
|
| 11 | 11 | |
| 12 | 12 | final class Attribute extends ValueObject |
| 13 | 13 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * @return int |
|
| 78 | + * @return DateTimeInterface |
|
| 79 | 79 | */ |
| 80 | 80 | public function getCreated(): DateTimeInterface |
| 81 | 81 | { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * @return int |
|
| 86 | + * @return DateTimeInterface |
|
| 87 | 87 | */ |
| 88 | 88 | public function getModified(): DateTimeInterface |
| 89 | 89 | { |