Skip to content

Commit

Permalink
Merge branch '3.x' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Jul 10, 2019
2 parents 8687d3c + f1bf151 commit 2bbc8cd
Show file tree
Hide file tree
Showing 68 changed files with 62 additions and 446 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -28,6 +28,7 @@ $rules = [
],
'no_extra_blank_lines' => true,
'no_php4_constructor' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
Expand Down
1 change: 0 additions & 1 deletion src/Admin/BaseMediaAdmin.php
Expand Up @@ -42,7 +42,6 @@ abstract class BaseMediaAdmin extends AbstractAdmin
* @param string $code
* @param string $class
* @param string $baseControllerName
* @param Pool $pool
* @param CategoryManagerInterface $categoryManager
*/
public function __construct($code, $class, $baseControllerName, Pool $pool, CategoryManagerInterface $categoryManager = null)
Expand Down
1 change: 0 additions & 1 deletion src/Admin/GalleryAdmin.php
Expand Up @@ -34,7 +34,6 @@ class GalleryAdmin extends AbstractAdmin
* @param string $code
* @param string $class
* @param string $baseControllerName
* @param Pool $pool
*/
public function __construct($code, $class, $baseControllerName, Pool $pool)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Block/GalleryBlockService.php
Expand Up @@ -51,10 +51,7 @@ class GalleryBlockService extends AbstractAdminBlockService
protected $galleryManager;

/**
* @param string $name
* @param EngineInterface $templating
* @param ContainerInterface $container
* @param ManagerInterface $galleryManager
* @param string $name
*/
public function __construct($name, EngineInterface $templating, ContainerInterface $container, ManagerInterface $galleryManager)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Block/GalleryListBlockService.php
Expand Up @@ -41,10 +41,7 @@ class GalleryListBlockService extends AbstractAdminBlockService
protected $pool;

/**
* @param string $name
* @param EngineInterface $templating
* @param GalleryManagerInterface $galleryManager
* @param Pool $pool
* @param string $name
*/
public function __construct($name, EngineInterface $templating, GalleryManagerInterface $galleryManager, Pool $pool)
{
Expand Down
9 changes: 1 addition & 8 deletions src/Block/MediaBlockService.php
Expand Up @@ -49,10 +49,7 @@ class MediaBlockService extends AbstractAdminBlockService
protected $mediaManager;

/**
* @param string $name
* @param EngineInterface $templating
* @param ContainerInterface $container
* @param ManagerInterface $mediaManager
* @param string $name
*/
public function __construct($name, EngineInterface $templating, ContainerInterface $container, ManagerInterface $mediaManager)
{
Expand Down Expand Up @@ -203,8 +200,6 @@ public function getBlockMetadata($code = null)
}

/**
* @param MediaInterface|null $media
*
* @return array
*/
protected function getFormatChoices(MediaInterface $media = null)
Expand All @@ -225,8 +220,6 @@ protected function getFormatChoices(MediaInterface $media = null)
}

/**
* @param FormMapper $formMapper
*
* @return FormBuilder
*/
protected function getMediaBuilder(FormMapper $formMapper)
Expand Down
1 change: 0 additions & 1 deletion src/CDN/CDNInterface.php
Expand Up @@ -52,7 +52,6 @@ public function flushByString($string);
/**
* Flush a set of resources matching the paths in provided array.
*
* @param array $paths
*
* @return void|string
*/
Expand Down
3 changes: 0 additions & 3 deletions src/CDN/CloudFront.php
Expand Up @@ -150,8 +150,6 @@ public function flushPaths(array $paths)

/**
* For testing only.
*
* @param CloudFrontClient $client
*/
public function setClient(CloudFrontClient $client): void
{
Expand Down Expand Up @@ -195,7 +193,6 @@ public static function getStatusList()
/**
* Generates a valid caller reference from given paths regardless its order.
*
* @param array $paths
*
* @return string a md5 representation
*/
Expand Down
4 changes: 0 additions & 4 deletions src/CDN/Fallback.php
Expand Up @@ -25,10 +25,6 @@ class Fallback implements CDNInterface
*/
protected $fallback;

/**
* @param CDNInterface $cdn
* @param CDNInterface $fallback
*/
public function __construct(CDNInterface $cdn, CDNInterface $fallback)
{
$this->cdn = $cdn;
Expand Down
7 changes: 0 additions & 7 deletions src/Command/AddMassMediaCommand.php
Expand Up @@ -72,9 +72,6 @@ public function execute(InputInterface $input, OutputInterface $output): void
}

/**
* @param InputInterface $input
* @param OutputInterface $output
*
* @return resource
*/
protected function getFilePointer(InputInterface $input, OutputInterface $output)
Expand All @@ -90,10 +87,6 @@ protected function getFilePointer(InputInterface $input, OutputInterface $output
return fopen($input->getOption('file'), 'r');
}

/**
* @param array $data
* @param OutputInterface $output
*/
protected function insertMedia(array $data, OutputInterface $output): void
{
$media = $this->getMediaManager()->create();
Expand Down
9 changes: 3 additions & 6 deletions src/Command/RemoveThumbsCommand.php
Expand Up @@ -173,8 +173,7 @@ public function getContext()
}

/**
* @param MediaProviderInterface $provider
* @param string $context
* @param string $context
*
* @return string
*/
Expand Down Expand Up @@ -203,10 +202,8 @@ public function getFormat(MediaProviderInterface $provider, $context)
}

/**
* @param MediaInterface $media
* @param MediaProviderInterface $provider
* @param string $context
* @param string $format
* @param string $context
* @param string $format
*
* @return bool
*/
Expand Down
7 changes: 0 additions & 7 deletions src/Consumer/CreateThumbnailConsumer.php
Expand Up @@ -38,11 +38,6 @@ class CreateThumbnailConsumer implements ConsumerInterface
*/
protected $container;

/**
* @param ManagerInterface $mediaManager
* @param Pool $pool
* @param ContainerInterface $container
*/
public function __construct(ManagerInterface $mediaManager, Pool $pool, ContainerInterface $container)
{
$this->mediaManager = $mediaManager;
Expand Down Expand Up @@ -78,8 +73,6 @@ public function process(ConsumerEvent $event): void
}

/**
* @param ConsumerEvent $event
*
* @return ThumbnailInterface
*/
protected function getThumbnail(ConsumerEvent $event)
Expand Down
12 changes: 1 addition & 11 deletions src/Controller/Api/GalleryController.php
Expand Up @@ -58,10 +58,7 @@ class GalleryController
/**
* Constructor.
*
* @param GalleryManagerInterface $galleryManager
* @param MediaManagerInterface $mediaManager
* @param FormFactoryInterface $formFactory
* @param string $galleryItemClass
* @param string $galleryItemClass
*/
public function __construct(GalleryManagerInterface $galleryManager, MediaManagerInterface $mediaManager, FormFactoryInterface $formFactory, $galleryItemClass)
{
Expand Down Expand Up @@ -109,8 +106,6 @@ public function __construct(GalleryManagerInterface $galleryManager, MediaManage
*
* @View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true)
*
* @param ParamFetcherInterface $paramFetcher
*
* @return PagerInterface
*/
public function getGalleriesAction(ParamFetcherInterface $paramFetcher)
Expand Down Expand Up @@ -423,11 +418,6 @@ public function deleteGalleryAction($id)
/**
* Write a GalleryItem, this method is used by both POST and PUT action methods.
*
* @param GalleryInterface $gallery
* @param MediaInterface $media
* @param GalleryItemInterface $galleryItem
* @param Request $request
*
* @return FormInterface
*/
protected function handleWriteGalleryItem(GalleryInterface $gallery, MediaInterface $media, GalleryItemInterface $galleryItem = null, Request $request)
Expand Down
14 changes: 2 additions & 12 deletions src/Controller/Api/MediaController.php
Expand Up @@ -57,10 +57,6 @@ class MediaController

/**
* Constructor.
*
* @param MediaManagerInterface $mediaManager
* @param Pool $mediaPool
* @param FormFactoryInterface $formFactory
*/
public function __construct(MediaManagerInterface $mediaManager, Pool $mediaPool, FormFactoryInterface $formFactory)
{
Expand All @@ -84,8 +80,6 @@ public function __construct(MediaManagerInterface $mediaManager, Pool $mediaPool
*
* @View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true)
*
* @param ParamFetcherInterface $paramFetcher
*
* @return PagerInterface
*/
public function getMediaAction(ParamFetcherInterface $paramFetcher)
Expand Down Expand Up @@ -188,9 +182,8 @@ public function getMediumFormatsAction($id)
* }
* )
*
* @param int $id The media id
* @param string $format The format
* @param Request $request
* @param int $id The media id
* @param string $format The format
*
* @return Response
*/
Expand Down Expand Up @@ -373,9 +366,6 @@ protected function getMedium($id = null)
/**
* Write a medium, this method is used by both POST and PUT action methods.
*
* @param Request $request
* @param MediaInterface $media
* @param MediaProviderInterface $provider
*
* @return View|FormInterface
*/
Expand Down
1 change: 0 additions & 1 deletion src/Controller/GalleryAdminController.php
Expand Up @@ -27,7 +27,6 @@ class GalleryAdminController extends Controller
{
/**
* @param string $view
* @param array $parameters
* @param Response $response
*
* @return Response
Expand Down
17 changes: 6 additions & 11 deletions src/Controller/MediaController.php
Expand Up @@ -25,8 +25,6 @@
class MediaController extends Controller
{
/**
* @param MediaInterface $media
*
* @return MediaProviderInterface
*/
public function getProvider(MediaInterface $media)
Expand All @@ -45,9 +43,8 @@ public function getMedia($id)
}

/**
* @param Request $request
* @param string $id
* @param string $format
* @param string $id
* @param string $format
*
* @throws NotFoundHttpException
*
Expand Down Expand Up @@ -75,9 +72,8 @@ public function downloadAction(Request $request, $id, $format = MediaProviderInt
}

/**
* @param Request $request
* @param string $id
* @param string $format
* @param string $id
* @param string $format
*
* @throws NotFoundHttpException
*
Expand Down Expand Up @@ -109,9 +105,8 @@ public function viewAction(Request $request, $id, $format = MediaProviderInterfa
* optionally saves the image and
* outputs it to the browser at the same time.
*
* @param Request $request
* @param string $path
* @param string $filter
* @param string $path
* @param string $filter
*
* @return Response
*
Expand Down
11 changes: 0 additions & 11 deletions src/DependencyInjection/Compiler/AddProviderCompilerPass.php
Expand Up @@ -50,7 +50,6 @@ public function process(ContainerBuilder $container): void
/**
* NEXT_MAJOR: Remove this method.
*
* @param ContainerBuilder $container
*
* @return array
*/
Expand All @@ -64,9 +63,6 @@ public function fixSettings(ContainerBuilder $container)
return $this->getExtensionConfig($container);
}

/**
* @param ContainerBuilder $container
*/
public function attachProviders(ContainerBuilder $container): void
{
$pool = $container->getDefinition('sonata.media.pool');
Expand All @@ -75,10 +71,6 @@ public function attachProviders(ContainerBuilder $container): void
}
}

/**
* @param ContainerBuilder $container
* @param array $settings
*/
public function attachArguments(ContainerBuilder $container, array $settings): void
{
foreach ($container->findTaggedServiceIds('sonata.media.provider') as $id => $attributes) {
Expand All @@ -103,9 +95,6 @@ public function attachArguments(ContainerBuilder $container, array $settings): v

/**
* Define the default settings to the config array.
*
* @param ContainerBuilder $container
* @param array $settings
*/
public function applyFormats(ContainerBuilder $container, array $settings): void
{
Expand Down

0 comments on commit 2bbc8cd

Please sign in to comment.