Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applied fixes from StyleCI #646

Merged
merged 1 commit into from
Oct 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Binary/Loader/AbstractDoctrineLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract protected function mapPathToId($path);
abstract protected function getStreamFromImage($image);

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function find($path)
{
Expand Down
2 changes: 1 addition & 1 deletion Binary/Loader/FileSystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function find($path)
{
Expand Down
2 changes: 1 addition & 1 deletion Binary/Loader/GridFSLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(DocumentManager $dm, $class)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function find($id)
{
Expand Down
2 changes: 1 addition & 1 deletion Binary/Loader/StreamLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($wrapperPrefix, $context = null)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function find($path)
{
Expand Down
2 changes: 1 addition & 1 deletion Binary/SimpleMimeTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(SymfonyMimeTypeGuesserInterface $mimeTypeGuesser)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function guess($binary)
{
Expand Down
8 changes: 4 additions & 4 deletions Command/RemoveCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ protected function configure()
$this
->setName('liip:imagine:cache:remove')
->setDescription('Remove cache for given paths and set of filters.')
->addArgument('paths', InputArgument::OPTIONAL|InputArgument::IS_ARRAY, 'Image paths')
->addArgument('paths', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Image paths')
->addOption(
'filters',
'f',
InputOption::VALUE_OPTIONAL|InputOption::VALUE_IS_ARRAY,
InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
'Filters list'
)
->setHelp(<<<EOF
Expand All @@ -46,14 +46,14 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$paths = $input->getArgument('paths');
$filters = $input->getOption('filters');
$filters = $input->getOption('filters');

if (empty($filters)) {
$filters = null;
}

/* @var CacheManager cacheManager */
$cacheManager = $this->getContainer()->get('liip_imagine.cache.manager');
$cacheManager = $this->getContainer()->get('liip_imagine.cache.manager');

$cacheManager->remove($paths, $filters);
}
Expand Down
8 changes: 4 additions & 4 deletions Command/ResolveCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ protected function configure()
$this
->setName('liip:imagine:cache:resolve')
->setDescription('Resolve cache for given path and set of filters.')
->addArgument('paths', InputArgument::REQUIRED|InputArgument::IS_ARRAY, 'Image paths')
->addArgument('paths', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'Image paths')
->addOption(
'filters',
'f',
InputOption::VALUE_OPTIONAL|InputOption::VALUE_IS_ARRAY,
InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
'Filters list'
)->setHelp(<<<EOF
The <info>%command.name%</info> command resolves cache by specified parameters.
Expand Down Expand Up @@ -57,9 +57,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
/* @var FilterManager filterManager */
$filterManager = $this->getContainer()->get('liip_imagine.filter.manager');
/* @var CacheManager cacheManager */
$cacheManager = $this->getContainer()->get('liip_imagine.cache.manager');
$cacheManager = $this->getContainer()->get('liip_imagine.cache.manager');
/* @var DataManager dataManager */
$dataManager = $this->getContainer()->get('liip_imagine.data.manager');
$dataManager = $this->getContainer()->get('liip_imagine.data.manager');

if (empty($filters)) {
$filters = array_keys($filterManager->getFilterConfiguration()->all());
Expand Down
2 changes: 1 addition & 1 deletion Controller/ImagineController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function filterAction(Request $request, $path, $filter)
{
// decoding special characters and whitespaces from path obtained from url
$path = urldecode($path);

try {
if (!$this->cacheManager->isStored($path, $filter)) {
try {
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/FiltersCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class FiltersCompilerPass implements CompilerPassInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/LoadersCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class LoadersCompilerPass implements CompilerPassInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class PostProcessorsCompilerPass implements CompilerPassInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/ResolversCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class ResolversCompilerPass implements CompilerPassInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(array $resolversFactories, array $loadersFactories)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class FileSystemLoaderFactory implements LoaderFactoryInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function create(ContainerBuilder $container, $loaderName, array $config)
{
Expand All @@ -26,15 +26,15 @@ public function create(ContainerBuilder $container, $loaderName, array $config)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getName()
{
return 'filesystem';
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function addConfiguration(ArrayNodeDefinition $builder)
{
Expand Down
6 changes: 3 additions & 3 deletions DependencyInjection/Factory/Loader/StreamLoaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class StreamLoaderFactory implements LoaderFactoryInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function create(ContainerBuilder $container, $loaderName, array $config)
{
Expand All @@ -27,15 +27,15 @@ public function create(ContainerBuilder $container, $loaderName, array $config)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getName()
{
return 'stream';
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function addConfiguration(ArrayNodeDefinition $builder)
{
Expand Down
6 changes: 3 additions & 3 deletions DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class AwsS3ResolverFactory implements ResolverFactoryInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function create(ContainerBuilder $container, $resolverName, array $config)
{
Expand Down Expand Up @@ -72,15 +72,15 @@ public function create(ContainerBuilder $container, $resolverName, array $config
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getName()
{
return 'aws_s3';
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function addConfiguration(ArrayNodeDefinition $builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class WebPathResolverFactory implements ResolverFactoryInterface
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function create(ContainerBuilder $container, $resolverName, array $config)
{
Expand All @@ -27,15 +27,15 @@ public function create(ContainerBuilder $container, $resolverName, array $config
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getName()
{
return 'web_path';
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function addConfiguration(ArrayNodeDefinition $builder)
{
Expand Down
1 change: 0 additions & 1 deletion Exception/Imagine/Filter/NonExistingFilterException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class NonExistingFilterException extends \RuntimeException implements ExceptionInterface
{

}
10 changes: 5 additions & 5 deletions Form/Type/ImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class ImageType extends AbstractType
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['image_path'] = $options['image_path'];
$view->vars['image_path'] = $options['image_path'];
$view->vars['image_filter'] = $options['image_filter'];
$view->vars['image_attr'] = $options['image_attr'];
$view->vars['link_url'] = $options['link_url'];
$view->vars['link_filter'] = $options['link_filter'];
$view->vars['link_attr'] = $options['link_attr'];
$view->vars['image_attr'] = $options['image_attr'];
$view->vars['link_url'] = $options['link_url'];
$view->vars['link_filter'] = $options['link_filter'];
$view->vars['link_attr'] = $options['link_attr'];
}

/**
Expand Down
8 changes: 4 additions & 4 deletions Imagine/Cache/Resolver/AbstractFilesystemResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract class AbstractFilesystemResolver implements ResolverInterface, CacheMan
*/
public function __construct(Filesystem $filesystem)
{
$this->filesystem = $filesystem;
$this->filesystem = $filesystem;
}

/**
Expand Down Expand Up @@ -81,15 +81,15 @@ public function setFolderPermissions($folderPermissions)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function isStored($path, $filter)
{
return file_exists($this->getFilePath($path, $filter));
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function store(BinaryInterface $binary, $path, $filter)
{
Expand All @@ -103,7 +103,7 @@ public function store(BinaryInterface $binary, $path, $filter)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function remove(array $paths, array $filters)
{
Expand Down
18 changes: 9 additions & 9 deletions Imagine/Cache/Resolver/AmazonS3Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ public function setLogger(LoggerInterface $logger)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function isStored($path, $filter)
{
return $this->objectExists($this->getObjectPath($path, $filter));
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function resolve($path, $filter)
{
return $this->getObjectUrl($this->getObjectPath($path, $filter));
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function store(BinaryInterface $binary, $path, $filter)
{
Expand All @@ -99,7 +99,7 @@ public function store(BinaryInterface $binary, $path, $filter)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function remove(array $paths, array $filters)
{
Expand All @@ -110,8 +110,8 @@ public function remove(array $paths, array $filters)
if (empty($paths)) {
if (!$this->storage->delete_all_objects($this->bucket, sprintf('/%s/i', implode('|', $filters)))) {
$this->logError('The objects could not be deleted from Amazon S3.', array(
'filters' => implode(', ', $filters),
'bucket' => $this->bucket,
'filters' => implode(', ', $filters),
'bucket' => $this->bucket,
));
}

Expand All @@ -127,9 +127,9 @@ public function remove(array $paths, array $filters)

if (!$this->storage->delete_object($this->bucket, $objectPath)->isOK()) {
$this->logError('The objects could not be deleted from Amazon S3.', array(
'filter' => $filter,
'bucket' => $this->bucket,
'path' => $path,
'filter' => $filter,
'bucket' => $this->bucket,
'path' => $path,
));
}
}
Expand Down
Loading