Fixed typos

This commit is contained in:
Jan Böhmer 2023-04-15 23:14:53 +02:00
parent 63df16a369
commit d04d743520
144 changed files with 263 additions and 265 deletions

View file

@ -269,7 +269,6 @@ abstract class BaseAdminController extends AbstractController
protected function _new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AbstractNamedDBElement $entity = null)
{
$master_picture_backup = null;
if (null === $entity) {
/** @var AbstractStructuralDBElement|User $new_entity */
$new_entity = new $this->entity_class();
@ -390,7 +389,7 @@ abstract class BaseAdminController extends AbstractController
foreach ($errors as $error) {
if ($error['entity'] instanceof AbstractStructuralDBElement) {
$this->addFlash('error', $error['entity']->getFullPath().':'.$error['violations']);
} else { //When we dont have a structural element, we can only show the name
} else { //When we don't have a structural element, we can only show the name
$this->addFlash('error', $error['entity']->getName().':'.$error['violations']);
}
}
@ -413,11 +412,11 @@ abstract class BaseAdminController extends AbstractController
}
/**
* Performs checks if the element can be deleted safely. Otherwise an flash message is added.
* Performs checks if the element can be deleted safely. Otherwise, a flash message is added.
*
* @param AbstractNamedDBElement $entity the element that should be checked
*
* @return bool True if the the element can be deleted, false if not
* @return bool True if the element can be deleted, false if not
*/
protected function deleteCheck(AbstractNamedDBElement $entity): bool
{

View file

@ -395,7 +395,7 @@ class PartController extends AbstractController
}
err:
//If an redirect was passed, then redirect there
//If a redirect was passed, then redirect there
if($request->request->get('_redirect')) {
return $this->redirect($request->request->get('_redirect'));
}

View file

@ -49,7 +49,7 @@ class RedirectController extends AbstractController
*/
public function addLocalePart(Request $request): RedirectResponse
{
//By default we use the global default locale
//By default, we use the global default locale
$locale = $this->default_locale;
//Check if a user has set a preferred language setting:

View file

@ -95,7 +95,7 @@ class TypeaheadController extends AbstractController
}
/**
* This functions map the parameter type to the class, so we can access its repository
* This function map the parameter type to the class, so we can access its repository
* @param string $type
* @return class-string
*/

View file

@ -61,11 +61,11 @@ class UserController extends AdminPages\BaseAdminController
protected function additionalActionEdit(FormInterface $form, AbstractNamedDBElement $entity): bool
{
//Check if we editing a user and if we need to change the password of it
//Check if we're editing a user and if we need to change the password of it
if ($entity instanceof User && !empty($form['new_password']->getData())) {
$password = $this->passwordEncoder->hashPassword($entity, $form['new_password']->getData());
$entity->setPassword($password);
//By default the user must change the password afterwards
//By default, the user must change the password afterward
$entity->setNeedPwChange(true);
$event = new SecurityEvent($entity);
@ -141,7 +141,7 @@ class UserController extends AdminPages\BaseAdminController
if ($entity instanceof User && !empty($form['new_password']->getData())) {
$password = $this->passwordEncoder->hashPassword($entity, $form['new_password']->getData());
$entity->setPassword($password);
//By default the user must change the password afterwards
//By default, the user must change the password afterward
$entity->setNeedPwChange(true);
}

View file

@ -261,7 +261,7 @@ class UserSettingsController extends AbstractController
$page_need_reload = true;
}
/** @var Form $form We need an form implementation for the next calls */
/** @var Form $form We need a form implementation for the next calls */
if ($form->getClickedButton() && 'remove_avatar' === $form->getClickedButton()->getName()) {
//Remove the avatar attachment from the user if requested
if ($user->getMasterPictureAttachment() !== null) {
@ -327,7 +327,7 @@ class UserSettingsController extends AbstractController
$pw_form->handleRequest($request);
//Check if password if everything was correct, then save it to User and DB
//Check if everything was correct, then save it to User and DB
if (!$this->demo_mode && $pw_form->isSubmitted() && $pw_form->isValid()) {
$password = $passwordEncoder->hashPassword($user, $pw_form['new_password']->getData());
$user->setPassword($password);