@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function load(array $configs, ContainerBuilder $container) |
| 28 | 28 | { |
| 29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
| 29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
| 30 | 30 | |
| 31 | 31 | $loader->load('services.yml'); |
| 32 | 32 | $loader->load('helpers.yml'); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | 'mapped' => false, |
| 92 | 92 | 'required' => false |
| 93 | 93 | ]) |
| 94 | - ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($options) { |
|
| 94 | + ->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) use ($options) { |
|
| 95 | 95 | // ensure all locales have a display name |
| 96 | 96 | /** @var CategoryEntity $category */ |
| 97 | 97 | $category = $event->getData(); |
@@ -109,10 +109,10 @@ discard block |
||
| 109 | 109 | $builder->get('name') |
| 110 | 110 | ->addModelTransformer(new CallbackTransformer( |
| 111 | 111 | // remove slash from name before persistence to prevent issues with path |
| 112 | - function ($string) { |
|
| 112 | + function($string) { |
|
| 113 | 113 | return $string; |
| 114 | 114 | }, |
| 115 | - function ($string) { |
|
| 115 | + function($string) { |
|
| 116 | 116 | return str_replace('/', '/', $string); |
| 117 | 117 | } |
| 118 | 118 | )) |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; |
| 17 | 17 | use Symfony\Component\Form\Extension\Core\Type\CollectionType; |
| 18 | 18 | use Symfony\Component\Form\Extension\Core\Type\HiddenType; |
| 19 | -use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
| 20 | 19 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
| 20 | +use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
| 21 | 21 | use Symfony\Component\Form\FormBuilderInterface; |
| 22 | 22 | use Symfony\Component\Form\FormEvent; |
| 23 | 23 | use Symfony\Component\Form\FormEvents; |
@@ -57,10 +57,10 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | /** @var CategoryRegistryEntity[] $registries */ |
| 59 | 59 | foreach ($registries as $registry) { |
| 60 | - $queryBuilderClosure = function (CategoryRepositoryInterface $repo) use ($registry, $options) { |
|
| 60 | + $queryBuilderClosure = function(CategoryRepositoryInterface $repo) use ($registry, $options) { |
|
| 61 | 61 | return $repo->getChildrenQueryBuilder($registry->getCategory(), $options['direct']); |
| 62 | 62 | }; |
| 63 | - $choiceLabelClosure = function (CategoryEntity $category) use ($registry) { |
|
| 63 | + $choiceLabelClosure = function(CategoryEntity $category) use ($registry) { |
|
| 64 | 64 | $indent = str_repeat('--', $category->getLvl() - $registry->getCategory()->getLvl() - 1); |
| 65 | 65 | |
| 66 | 66 | return (!empty($indent) ? '|' : '') . $indent . $category->getName(); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $resolver->setAllowedTypes('entityCategoryClass', 'string'); |
| 120 | 120 | $resolver->setAllowedTypes('em', [ObjectManager::class, 'null']); |
| 121 | 121 | |
| 122 | - $resolver->addAllowedValues('entityCategoryClass', function ($value) { |
|
| 122 | + $resolver->addAllowedValues('entityCategoryClass', function($value) { |
|
| 123 | 123 | return is_subclass_of($value, AbstractCategoryAssignment::class); |
| 124 | 124 | }); |
| 125 | 125 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $newCategory->setName($category->getName() . 'copy'); |
| 55 | 55 | $displayNames = []; |
| 56 | 56 | foreach ($newCategory->getDisplay_name() as $locale => $displayName) { |
| 57 | - $displayNames[$locale] = $displayName . ' ' .$this->__('copy'); |
|
| 57 | + $displayNames[$locale] = $displayName . ' ' . $this->__('copy'); |
|
| 58 | 58 | } |
| 59 | 59 | $newCategory->setDisplay_name($displayNames); |
| 60 | 60 | $action = 'edit'; |
@@ -70,7 +70,8 @@ |
||
| 70 | 70 | $parent = $repo->find($parentId); |
| 71 | 71 | $category->setParent($parent); |
| 72 | 72 | $category->setRoot($parent->getRoot()); |
| 73 | - } elseif (empty($parent) && $request->request->has('after')) { // sibling of top-level child |
|
| 73 | + } elseif (empty($parent) && $request->request->has('after')) { |
|
| 74 | +// sibling of top-level child |
|
| 74 | 75 | $sibling = $repo->find($request->request->get('after')); |
| 75 | 76 | $category->setParent($sibling->getParent()); |
| 76 | 77 | $category->setRoot($sibling->getRoot()); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | return [ |
| 80 | 80 | 'decorate' => true, |
| 81 | 81 | 'html' => true, |
| 82 | - 'childOpen' => function ($node) { |
|
| 82 | + 'childOpen' => function($node) { |
|
| 83 | 83 | $jsTreeData = []; |
| 84 | 84 | $jsTreeData['disabled'] = $node['status'] != 'A'; |
| 85 | 85 | $jsTreeData['type'] = $node['is_leaf'] ? 'leaf' : 'default'; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | return '<li ' . $jsTreeData . 'class="jstree-open" id="' . $this->domTreeNodePrefix . $node['id'] . '">'; |
| 89 | 89 | }, |
| 90 | - 'nodeDecorator' => function ($node) use ($locale) { |
|
| 90 | + 'nodeDecorator' => function($node) use ($locale) { |
|
| 91 | 91 | $displayName = isset($node['display_name'][$locale]) ? $node['display_name'][$locale] : $node['name']; |
| 92 | 92 | $title = ' title="' . $this->createTitleAttribute($node, $displayName, $locale) . '"'; |
| 93 | 93 | $classes = []; |
@@ -49,7 +49,6 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * InstallerListener constructor. |
| 51 | 51 | * |
| 52 | - * @param ObjectManager $objectManager |
|
| 53 | 52 | */ |
| 54 | 53 | public function __construct( |
| 55 | 54 | CacheClearer $cacheClearer, |
@@ -63,8 +63,8 @@ |
||
| 63 | 63 | { |
| 64 | 64 | $entity = $this->entityRef; |
| 65 | 65 | |
| 66 | - list($controller, ) = $this->sanitizeHelper->sanitizeController($entity['controller']); |
|
| 67 | - list($action, ) = $this->sanitizeHelper->sanitizeAction($entity['action']); |
|
| 66 | + list($controller,) = $this->sanitizeHelper->sanitizeController($entity['controller']); |
|
| 67 | + list($action,) = $this->sanitizeHelper->sanitizeAction($entity['action']); |
|
| 68 | 68 | |
| 69 | 69 | $entity['controller'] = $controller; |
| 70 | 70 | $entity['action'] = $action; |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | |
| 15 | 15 | use Symfony\Component\Routing\RouteCollection; |
| 16 | 16 | use Zikula\RoutesModule\Entity\RouteEntity; |
| 17 | -use Zikula\RoutesModule\Helper\SanitizeHelper; |
|
| 18 | 17 | use Zikula\RoutesModule\Form\Handler\Route\Base\AbstractEditHandler; |
| 18 | +use Zikula\RoutesModule\Helper\SanitizeHelper; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * This handler class handles the page events of the Form called by the zikulaRoutesModule_route_edit() function. |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | /** |
| 80 | 80 | * Returns a list of custom Twig functions. |
| 81 | 81 | * |
| 82 | - * @return array |
|
| 82 | + * @return \Twig_SimpleFunction[] |
|
| 83 | 83 | */ |
| 84 | 84 | public function getFunctions() |
| 85 | 85 | { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | /** |
| 97 | 97 | * Returns a list of custom Twig filters. |
| 98 | 98 | * |
| 99 | - * @return array |
|
| 99 | + * @return \Twig_SimpleFilter[] |
|
| 100 | 100 | */ |
| 101 | 101 | public function getFilters() |
| 102 | 102 | { |
@@ -203,9 +203,9 @@ |
||
| 203 | 203 | /** |
| 204 | 204 | * Determine if a $currentVersion value is between $requiredMin and $requiredMax. |
| 205 | 205 | * |
| 206 | - * @param $requiredMin |
|
| 207 | - * @param $requiredMax |
|
| 208 | - * @param $currentVersion |
|
| 206 | + * @param string $requiredMin |
|
| 207 | + * @param string $requiredMax |
|
| 208 | + * @param string $currentVersion |
|
| 209 | 209 | * @return bool |
| 210 | 210 | */ |
| 211 | 211 | private function meetsVersionRequirements($requiredMin, $requiredMax, $currentVersion) |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | * @param ExtensionDependencyEntity $dependency |
| 159 | 159 | * @return bool |
| 160 | 160 | */ |
| 161 | - private function bundleDependencySatisfied(ExtensionDependencyEntity &$dependency) |
|
| 161 | + private function bundleDependencySatisfied(ExtensionDependencyEntity & $dependency) |
|
| 162 | 162 | { |
| 163 | 163 | if ($dependency->getModname() == "php") { |
| 164 | 164 | // Do not use PHP_VERSION constant, because it might throw off the semver parser. |
@@ -17,8 +17,8 @@ |
||
| 17 | 17 | use Zikula\ExtensionsModule\Constant; |
| 18 | 18 | use Zikula\ExtensionsModule\Entity\ExtensionDependencyEntity; |
| 19 | 19 | use Zikula\ExtensionsModule\Entity\ExtensionEntity; |
| 20 | -use Zikula\ExtensionsModule\Entity\Repository\ExtensionDependencyRepository; |
|
| 21 | 20 | use Zikula\ExtensionsModule\Entity\RepositoryInterface\ExtensionRepositoryInterface; |
| 21 | +use Zikula\ExtensionsModule\Entity\Repository\ExtensionDependencyRepository; |
|
| 22 | 22 | use Zikula\ExtensionsModule\Exception\ExtensionDependencyException; |
| 23 | 23 | |
| 24 | 24 | class ExtensionDependencyHelper |