cs: Second part - ignore test/app subdirectory.

This commit is contained in:
Pol Dellaiera
2021-11-23 14:34:34 +01:00
parent 5f37304796
commit 3ea35682eb
72 changed files with 326 additions and 365 deletions

View File

@@ -206,6 +206,7 @@ class ExportController extends AbstractController
*
* @param string $alias
* @param array $data the data from previous step. Required for steps 'formatter' and 'generate_formatter'
* @param mixed $step
*
* @return \Symfony\Component\Form\Form
*/

View File

@@ -35,8 +35,7 @@ class NotificationController extends AbstractController
NotificationRepository $notificationRepository,
NotificationRenderer $notificationRenderer,
PaginatorFactory $paginatorFactory
)
{
) {
$currentUser = $this->security->getUser();
$notificationsNbr = $notificationRepository->countAllForAttendee(($currentUser));

View File

@@ -358,19 +358,19 @@ class PermissionsGroupController extends AbstractController
usort(
$roleScopes,
function (RoleScope $a, RoleScope $b) use ($translatableStringHelper) {
if ($a->getScope() === null) {
return 1;
}
if ($a->getScope() === null) {
return 1;
}
if ($b->getScope() === null) {
return +1;
}
if ($b->getScope() === null) {
return +1;
}
return strcmp(
$translatableStringHelper->localize($a->getScope()->getName()),
$translatableStringHelper->localize($b->getScope()->getName())
);
}
return strcmp(
$translatableStringHelper->localize($a->getScope()->getName()),
$translatableStringHelper->localize($b->getScope()->getName())
);
}
);
// sort role scope by title
@@ -526,8 +526,7 @@ class PermissionsGroupController extends AbstractController
private function createDeleteRoleScopeForm(
PermissionsGroup $permissionsGroup,
RoleScope $roleScope
)
{
) {
return $this->createFormBuilder()
->setAction($this->generateUrl(
'admin_permissionsgroup_delete_role_scope',
@@ -571,12 +570,12 @@ class PermissionsGroupController extends AbstractController
$expandedRoles[$roleScope->getRole()] =
array_map(
function (Role $role) {
return $role->getRole();
},
return $role->getRole();
},
$this->roleHierarchy
->getReachableRoles(
[new Role($roleScope->getRole())]
)
->getReachableRoles(
[new Role($roleScope->getRole())]
)
);
}
}

View File

@@ -51,15 +51,15 @@ class PostalCodeController extends AbstractController
$query = $this->getDoctrine()->getManager()
->createQuery(
sprintf(
'SELECT p.id AS id, p.name AS name, p.code AS code, '
'SELECT p.id AS id, p.name AS name, p.code AS code, '
. 'country.name AS country_name, '
. 'country.countryCode AS country_code '
. 'FROM %s p '
. 'JOIN p.country country '
. 'WHERE LOWER(p.name) LIKE LOWER(:pattern) OR LOWER(p.code) LIKE LOWER(:pattern) '
. 'ORDER BY code',
PostalCode::class
)
PostalCode::class
)
)
->setParameter('pattern', '%' . $pattern . '%')
->setMaxResults(30);