diff --git a/src/Command/Migrations/ConvertBBCodeCommand.php b/src/Command/Migrations/ConvertBBCodeCommand.php
index 6b2b3fd7..3b861b49 100644
--- a/src/Command/Migrations/ConvertBBCodeCommand.php
+++ b/src/Command/Migrations/ConvertBBCodeCommand.php
@@ -45,12 +45,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use function count;
/**
- * This command converts the BBCode used by old Part-DB versions (<1.0), to the current used markdown format.
+ * This command converts the BBCode used by old Part-DB versions (<1.0), to the current used Markdown format.
*/
class ConvertBBCodeCommand extends Command
{
/**
- * @var string The LIKE criteria used to detect on SQL server if a entry contains BBCode
+ * @var string The LIKE criteria used to detect on SQL server if an entry contains BBCode
*/
protected const BBCODE_CRITERIA = '%[%]%[/%]%';
/**
diff --git a/src/Controller/AdminPages/BaseAdminController.php b/src/Controller/AdminPages/BaseAdminController.php
index 0921d42a..d5f00767 100644
--- a/src/Controller/AdminPages/BaseAdminController.php
+++ b/src/Controller/AdminPages/BaseAdminController.php
@@ -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
{
diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php
index 8913911c..019855b9 100644
--- a/src/Controller/PartController.php
+++ b/src/Controller/PartController.php
@@ -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'));
}
diff --git a/src/Controller/RedirectController.php b/src/Controller/RedirectController.php
index 022c1286..811ab135 100644
--- a/src/Controller/RedirectController.php
+++ b/src/Controller/RedirectController.php
@@ -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:
diff --git a/src/Controller/TypeaheadController.php b/src/Controller/TypeaheadController.php
index 37ff6ec1..c5d440d2 100644
--- a/src/Controller/TypeaheadController.php
+++ b/src/Controller/TypeaheadController.php
@@ -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
*/
diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php
index 1c8cc130..9669a3a6 100644
--- a/src/Controller/UserController.php
+++ b/src/Controller/UserController.php
@@ -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);
}
diff --git a/src/Controller/UserSettingsController.php b/src/Controller/UserSettingsController.php
index b4ac5953..c1c38d6b 100644
--- a/src/Controller/UserSettingsController.php
+++ b/src/Controller/UserSettingsController.php
@@ -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);
diff --git a/src/DataTables/Column/LocaleDateTimeColumn.php b/src/DataTables/Column/LocaleDateTimeColumn.php
index 76515a25..733c0b6c 100644
--- a/src/DataTables/Column/LocaleDateTimeColumn.php
+++ b/src/DataTables/Column/LocaleDateTimeColumn.php
@@ -31,7 +31,7 @@ use Omines\DataTablesBundle\Column\AbstractColumn;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
- * Similar to the built in DateTimeColumn, but the datetime is formatted using a IntlDateFormatter,
+ * Similar to the built-in DateTimeColumn, but the datetime is formatted using a IntlDateFormatter,
* to get prettier locale based formatting.
*/
class LocaleDateTimeColumn extends AbstractColumn
diff --git a/src/DataTables/Filters/Constraints/InstanceOfConstraint.php b/src/DataTables/Filters/Constraints/InstanceOfConstraint.php
index 6efe8cce..e339ecc1 100644
--- a/src/DataTables/Filters/Constraints/InstanceOfConstraint.php
+++ b/src/DataTables/Filters/Constraints/InstanceOfConstraint.php
@@ -98,7 +98,7 @@ class InstanceOfConstraint extends AbstractConstraint
if ($this->operator === 'ANY' || $this->operator === 'NONE') {
foreach($this->value as $value) {
- //We cannnot use an paramater here, as this is the only way to pass the FCQN to the query (via binded params, we would need to use ClassMetaData). See: https://github.com/doctrine/orm/issues/4462
+ //We can not use a parameter here, as this is the only way to pass the FCQN to the query (via binded params, we would need to use ClassMetaData). See: https://github.com/doctrine/orm/issues/4462
$expressions[] = ($queryBuilder->expr()->isInstanceOf($this->property, $value));
}
diff --git a/src/DataTables/Filters/Constraints/TextConstraint.php b/src/DataTables/Filters/Constraints/TextConstraint.php
index 3cd53973..2b4ecea4 100644
--- a/src/DataTables/Filters/Constraints/TextConstraint.php
+++ b/src/DataTables/Filters/Constraints/TextConstraint.php
@@ -101,7 +101,7 @@ class TextConstraint extends AbstractConstraint
return;
}
- //The CONTAINS, LIKE, STARTS and ENDS operators use the LIKE operator but we have to build the value string differently
+ //The CONTAINS, LIKE, STARTS and ENDS operators use the LIKE operator, but we have to build the value string differently
$like_value = null;
if ($this->operator === 'LIKE') {
$like_value = $this->value;
diff --git a/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php b/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php
index 0ff670ba..20632b56 100644
--- a/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php
+++ b/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php
@@ -24,7 +24,7 @@ use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\Middleware;
/**
- * This class wraps the Doctrine DBAL driver and wraps it into an Midleware driver so we can change the SQL mode
+ * This class wraps the Doctrine DBAL driver and wraps it into a Midleware driver, so we can change the SQL mode
*/
class SetSQLModeMiddlewareWrapper implements Middleware
{
diff --git a/src/Entity/Attachments/Attachment.php b/src/Entity/Attachments/Attachment.php
index 442e1caf..35c07571 100644
--- a/src/Entity/Attachments/Attachment.php
+++ b/src/Entity/Attachments/Attachment.php
@@ -59,7 +59,7 @@ abstract class Attachment extends AbstractNamedDBElement
/**
* A list of file extensions, that browsers can show directly as image.
* Based on: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types
- * It will be used to determine if a attachment is a picture and therefore will be shown to user as preview.
+ * It will be used to determine if an attachment is a picture and therefore will be shown to user as preview.
*/
public const PICTURE_EXTS = ['apng', 'bmp', 'gif', 'ico', 'cur', 'jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp', 'png',
'svg', 'webp', ];
@@ -70,7 +70,7 @@ abstract class Attachment extends AbstractNamedDBElement
public const MODEL_EXTS = ['x3d'];
/**
- * When the path begins with one of this placeholders.
+ * When the path begins with one of the placeholders.
*/
public const INTERNAL_PLACEHOLDER = ['%BASE%', '%MEDIA%', '%SECURE%'];
@@ -105,7 +105,7 @@ abstract class Attachment extends AbstractNamedDBElement
protected string $name = '';
/**
- * ORM mapping is done in sub classes (like PartAttachment).
+ * ORM mapping is done in subclasses (like PartAttachment).
*/
protected ?AttachmentContainingDBElement $element = null;
@@ -153,7 +153,7 @@ abstract class Attachment extends AbstractNamedDBElement
*/
public function isPicture(): bool
{
- //We can not check if a external link is a picture, so just assume this is false
+ //We can not check if an external link is a picture, so just assume this is false
if ($this->isExternal()) {
return true;
}
@@ -215,7 +215,7 @@ abstract class Attachment extends AbstractNamedDBElement
* Checks if the attachment file is using a builtin file. (see BUILTIN_PLACEHOLDERS const for possible placeholders)
* If a file is built in, the path is shown to user in url field (no sensitive infos are provided).
*
- * @return bool true if the attachment is using an builtin file
+ * @return bool true if the attachment is using a builtin file
*/
public function isBuiltIn(): bool
{
@@ -259,7 +259,7 @@ abstract class Attachment extends AbstractNamedDBElement
}
/**
- * The URL to the external file, or the path to the built in file.
+ * The URL to the external file, or the path to the built-in file.
* Returns null, if the file is not external (and not builtin).
*/
public function getURL(): ?string
@@ -455,9 +455,9 @@ abstract class Attachment extends AbstractNamedDBElement
* @param string $string The string which should be checked
* @param bool $path_required If true, the string must contain a path to be valid. (e.g. foo.bar would be invalid, foo.bar/test.php would be valid).
* @param bool $only_http Set this to true, if only HTTPS or HTTP schemata should be allowed.
- * *Caution: When this is set to false, a attacker could use the file:// schema, to get internal server files, like /etc/passwd.*
+ * *Caution: When this is set to false, an attacker could use the file:// schema, to get internal server files, like /etc/passwd.*
*
- * @return bool True if the string is a valid URL. False, if the string is not an URL or invalid.
+ * @return bool True if the string is a valid URL. False, if the string is not a URL or invalid.
*/
public static function isValidURL(string $string, bool $path_required = true, bool $only_http = true): bool
{
diff --git a/src/Entity/Attachments/AttachmentType.php b/src/Entity/Attachments/AttachmentType.php
index de67e8d9..683c7be5 100644
--- a/src/Entity/Attachments/AttachmentType.php
+++ b/src/Entity/Attachments/AttachmentType.php
@@ -99,7 +99,7 @@ class AttachmentType extends AbstractStructuralDBElement
}
/**
- * Gets an filter, which file types are allowed for attachment files.
+ * Gets a filter, which file types are allowed for attachment files.
* Must be in the format of accept attribute
* (See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers).
*/
diff --git a/src/Entity/Attachments/CategoryAttachment.php b/src/Entity/Attachments/CategoryAttachment.php
index b9945211..bfc54af0 100644
--- a/src/Entity/Attachments/CategoryAttachment.php
+++ b/src/Entity/Attachments/CategoryAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a category element.
+ * An attachment attached to a category element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/FootprintAttachment.php b/src/Entity/Attachments/FootprintAttachment.php
index 6d0e4608..7eb65db1 100644
--- a/src/Entity/Attachments/FootprintAttachment.php
+++ b/src/Entity/Attachments/FootprintAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a footprint element.
+ * An attachment attached to a footprint element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/GroupAttachment.php b/src/Entity/Attachments/GroupAttachment.php
index babe85cf..b6ab93f4 100644
--- a/src/Entity/Attachments/GroupAttachment.php
+++ b/src/Entity/Attachments/GroupAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a Group element.
+ * An attachment attached to a Group element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/ManufacturerAttachment.php b/src/Entity/Attachments/ManufacturerAttachment.php
index 09aa79e7..25451b7c 100644
--- a/src/Entity/Attachments/ManufacturerAttachment.php
+++ b/src/Entity/Attachments/ManufacturerAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a manufacturer element.
+ * An attachment attached to a manufacturer element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/MeasurementUnitAttachment.php b/src/Entity/Attachments/MeasurementUnitAttachment.php
index a0e9465c..8a007101 100644
--- a/src/Entity/Attachments/MeasurementUnitAttachment.php
+++ b/src/Entity/Attachments/MeasurementUnitAttachment.php
@@ -28,7 +28,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a measurement unit element.
+ * An attachment attached to a measurement unit element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/StorelocationAttachment.php b/src/Entity/Attachments/StorelocationAttachment.php
index 53926156..71e5672e 100644
--- a/src/Entity/Attachments/StorelocationAttachment.php
+++ b/src/Entity/Attachments/StorelocationAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a measurement unit element.
+ * An attachment attached to a measurement unit element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Attachments/UserAttachment.php b/src/Entity/Attachments/UserAttachment.php
index eeeff0b8..65cd8730 100644
--- a/src/Entity/Attachments/UserAttachment.php
+++ b/src/Entity/Attachments/UserAttachment.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a user element.
+ * An attachment attached to a user element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})
diff --git a/src/Entity/Base/AbstractStructuralDBElement.php b/src/Entity/Base/AbstractStructuralDBElement.php
index 2ac874ca..1353448d 100644
--- a/src/Entity/Base/AbstractStructuralDBElement.php
+++ b/src/Entity/Base/AbstractStructuralDBElement.php
@@ -81,7 +81,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
protected int $level = 0;
/**
- * We can not define the mapping here or we will get an exception. Unfortunately we have to do the mapping in the
+ * We can not define the mapping here, or we will get an exception. Unfortunately we have to do the mapping in the
* subclasses.
*
* @var AbstractStructuralDBElement[]|Collection
@@ -96,7 +96,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
*/
protected ?AbstractStructuralDBElement $parent = null;
- /** @var string[] all names of all parent elements as a array of strings,
+ /** @var string[] all names of all parent elements as an array of strings,
* the last array element is the name of the element itself
*/
private array $full_path_strings = [];
@@ -167,7 +167,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
/**
* Checks if this element is an root element (has no parent).
*
- * @return bool true if the this element is an root element
+ * @return bool true if this element is a root element
*/
public function isRoot(): bool
{
diff --git a/src/Entity/Base/MasterAttachmentTrait.php b/src/Entity/Base/MasterAttachmentTrait.php
index 96890a8f..b6c5657f 100644
--- a/src/Entity/Base/MasterAttachmentTrait.php
+++ b/src/Entity/Base/MasterAttachmentTrait.php
@@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
- * A entity with this class has a master attachment, which is used as a preview image for this object.
+ * An entity with this class has a master attachment, which is used as a preview image for this object.
*/
trait MasterAttachmentTrait
{
diff --git a/src/Entity/Contracts/TimeTravelInterface.php b/src/Entity/Contracts/TimeTravelInterface.php
index 6324d75f..22841cc8 100644
--- a/src/Entity/Contracts/TimeTravelInterface.php
+++ b/src/Entity/Contracts/TimeTravelInterface.php
@@ -27,9 +27,9 @@ use DateTime;
interface TimeTravelInterface
{
/**
- * Checks if this entry has informations which data has changed.
+ * Checks if this entry has information which data has changed.
*
- * @return bool true if this entry has informations about the changed data
+ * @return bool true if this entry has information about the changed data
*/
public function hasOldDataInformations(): bool;
@@ -39,7 +39,7 @@ interface TimeTravelInterface
public function getOldData(): array;
/**
- * Returns the the timestamp associated with this change.
+ * Returns the timestamp associated with this change.
*/
public function getTimestamp(): DateTime;
}
diff --git a/src/Entity/LogSystem/AbstractLogEntry.php b/src/Entity/LogSystem/AbstractLogEntry.php
index 2c7c7e40..703049e8 100644
--- a/src/Entity/LogSystem/AbstractLogEntry.php
+++ b/src/Entity/LogSystem/AbstractLogEntry.php
@@ -48,7 +48,7 @@ use InvalidArgumentException;
use Psr\Log\LogLevel;
/**
- * This entity describes a entry in the event log.
+ * This entity describes an entry in the event log.
*
* @ORM\Entity(repositoryClass="App\Repository\LogEntryRepository")
* @ORM\Table("log", indexes={
@@ -340,7 +340,7 @@ abstract class AbstractLogEntry extends AbstractDBElement
/**
* Returns the class name of the target element associated with this log entry.
- * Returns null, if this log entry is not associated with an log entry.
+ * Returns null, if this log entry is not associated with a log entry.
*
* @return string|null the class name of the target class
*/
@@ -355,7 +355,7 @@ abstract class AbstractLogEntry extends AbstractDBElement
/**
* Returns the ID of the target element associated with this log entry.
- * Returns null, if this log entry is not associated with an log entry.
+ * Returns null, if this log entry is not associated with a log entry.
*
* @return int|null the ID of the associated element
*/
@@ -451,7 +451,7 @@ abstract class AbstractLogEntry extends AbstractDBElement
}
/**
- * Converts an target type id to an full qualified class name.
+ * Converts a target type id to a full qualified class name.
*
* @param int $type_id The target type ID
*/
diff --git a/src/Entity/LogSystem/CollectionElementDeleted.php b/src/Entity/LogSystem/CollectionElementDeleted.php
index c1f6ae80..9e646cca 100644
--- a/src/Entity/LogSystem/CollectionElementDeleted.php
+++ b/src/Entity/LogSystem/CollectionElementDeleted.php
@@ -86,7 +86,7 @@ use InvalidArgumentException;
/**
* @ORM\Entity()
- * This log entry is created when an element is deleted, that is used in a collection of an other entity.
+ * This log entry is created when an element is deleted, that is used in a collection of another entity.
* This is needed to signal time travel, that it has to undelete the deleted entity.
*/
class CollectionElementDeleted extends AbstractLogEntry implements LogWithEventUndoInterface
diff --git a/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php b/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php
index 9c600365..0f85ba11 100644
--- a/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php
+++ b/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php
@@ -43,7 +43,7 @@ class DatabaseUpdatedLogEntry extends AbstractLogEntry
*/
public function isSuccessful(): bool
{
- //We dont save unsuccessful updates now, so just assume it to save space.
+ //We don't save unsuccessful updates now, so just assume it to save space.
return $this->extra['s'] ?? true;
}
diff --git a/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php b/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php
index 35d58592..9af3dd69 100644
--- a/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php
+++ b/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php
@@ -56,7 +56,7 @@ class LegacyInstockChangedLogEntry extends AbstractLogEntry
}
/**
- * Returns the price that has to be payed for the change (in the base currency).
+ * Returns the price that has to be paid for the change (in the base currency).
*
* @param bool $absolute Set this to true, if you want only get the absolute value of the price (without minus)
*/
@@ -92,9 +92,9 @@ class LegacyInstockChangedLogEntry extends AbstractLogEntry
}
/**
- * Checks if the Change was an withdrawal of parts.
+ * Checks if the Change was a withdrawal of parts.
*
- * @return bool true if the change was an withdrawal, false if not
+ * @return bool true if the change was a withdrawal, false if not
*/
public function isWithdrawal(): bool
{
diff --git a/src/Entity/LogSystem/SecurityEventLogEntry.php b/src/Entity/LogSystem/SecurityEventLogEntry.php
index 095996c2..9503e023 100644
--- a/src/Entity/LogSystem/SecurityEventLogEntry.php
+++ b/src/Entity/LogSystem/SecurityEventLogEntry.php
@@ -117,7 +117,7 @@ class SecurityEventLogEntry extends AbstractLogEntry
}
/**
- * Return the (anonymized) IP address used to login the user.
+ * Return the (anonymized) IP address used to log in the user.
*/
public function getIPAddress(): string
{
@@ -125,9 +125,9 @@ class SecurityEventLogEntry extends AbstractLogEntry
}
/**
- * Sets the IP address used to login the user.
+ * Sets the IP address used to log in the user.
*
- * @param string $ip the IP address used to login the user
+ * @param string $ip the IP address used to log in the user
* @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant
*
* @return $this
diff --git a/src/Entity/LogSystem/UserLoginLogEntry.php b/src/Entity/LogSystem/UserLoginLogEntry.php
index 5d1733ac..d1acaa6e 100644
--- a/src/Entity/LogSystem/UserLoginLogEntry.php
+++ b/src/Entity/LogSystem/UserLoginLogEntry.php
@@ -42,7 +42,7 @@ class UserLoginLogEntry extends AbstractLogEntry
}
/**
- * Return the (anonymized) IP address used to login the user.
+ * Return the (anonymized) IP address used to log in the user.
*/
public function getIPAddress(): string
{
@@ -50,9 +50,9 @@ class UserLoginLogEntry extends AbstractLogEntry
}
/**
- * Sets the IP address used to login the user.
+ * Sets the IP address used to log in the user.
*
- * @param string $ip the IP address used to login the user
+ * @param string $ip the IP address used to log in the user
* @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant
*
* @return $this
diff --git a/src/Entity/LogSystem/UserLogoutLogEntry.php b/src/Entity/LogSystem/UserLogoutLogEntry.php
index d3abb931..43a98fb6 100644
--- a/src/Entity/LogSystem/UserLogoutLogEntry.php
+++ b/src/Entity/LogSystem/UserLogoutLogEntry.php
@@ -40,7 +40,7 @@ class UserLogoutLogEntry extends AbstractLogEntry
}
/**
- * Return the (anonymized) IP address used to login the user.
+ * Return the (anonymized) IP address used to log in the user.
*/
public function getIPAddress(): string
{
@@ -48,9 +48,9 @@ class UserLogoutLogEntry extends AbstractLogEntry
}
/**
- * Sets the IP address used to login the user.
+ * Sets the IP address used to log in the user.
*
- * @param string $ip the IP address used to login the user
+ * @param string $ip the IP address used to log in the user
* @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant
*
* @return $this
diff --git a/src/Entity/Parameters/AbstractParameter.php b/src/Entity/Parameters/AbstractParameter.php
index 922bb43e..9281970c 100644
--- a/src/Entity/Parameters/AbstractParameter.php
+++ b/src/Entity/Parameters/AbstractParameter.php
@@ -139,7 +139,7 @@ abstract class AbstractParameter extends AbstractNamedDBElement
protected string $group = '';
/**
- * Mapping is done in sub classes.
+ * Mapping is done in subclasses.
*
* @var AbstractDBElement|null the element to which this parameter belongs to
*/
diff --git a/src/Entity/Parameters/CurrencyParameter.php b/src/Entity/Parameters/CurrencyParameter.php
index 9f99310e..cb5fad26 100644
--- a/src/Entity/Parameters/CurrencyParameter.php
+++ b/src/Entity/Parameters/CurrencyParameter.php
@@ -47,7 +47,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
- * A attachment attached to a category element.
+ * An attachment attached to a category element.
*
* @ORM\Entity(repositoryClass="App\Repository\ParameterRepository")
* @UniqueEntity(fields={"name", "group", "element"})
diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php
index f65b8222..d9b7e601 100644
--- a/src/Entity/Parts/Part.php
+++ b/src/Entity/Parts/Part.php
@@ -46,7 +46,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
* Part class.
*
* The class properties are split over various traits in directory PartTraits.
- * Otherwise this class would be too big, to be maintained.
+ * Otherwise, this class would be too big, to be maintained.
*
* @ORM\Entity(repositoryClass="App\Repository\PartRepository")
* @ORM\Table("`parts`", indexes={
diff --git a/src/Entity/Parts/PartLot.php b/src/Entity/Parts/PartLot.php
index 32db4828..cd69651f 100644
--- a/src/Entity/Parts/PartLot.php
+++ b/src/Entity/Parts/PartLot.php
@@ -130,7 +130,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
/**
* Check if the current part lot is expired.
- * This is the case, if the expiration date is greater the the current date.
+ * This is the case, if the expiration date is greater the current date.
*
* @return bool|null True, if the part lot is expired. Returns null, if no expiration date was set.
*
@@ -195,7 +195,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
}
/**
- * Sets the expiration date for the part lot. Set to null, if the part lot does not expires.
+ * Sets the expiration date for the part lot. Set to null, if the part lot does not expire.
*
* @param DateTime|null $expiration_date
*
diff --git a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php
index 32d364d6..f675dc72 100644
--- a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php
+++ b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php
@@ -46,7 +46,7 @@ trait BasicPropertyTrait
protected string $comment = '';
/**
- * @var bool Kept for compatibility (it is not used now, and I dont think it was used in old versions)
+ * @var bool Kept for compatibility (it is not used now, and I don't think it was used in old versions)
* @ORM\Column(type="boolean")
*/
protected bool $visible = true;
@@ -136,7 +136,7 @@ trait BasicPropertyTrait
/**
* Gets the Footprint of this part (e.g. DIP8).
*
- * @return Footprint|null The footprint of this part. Null if this part should no have a footprint.
+ * @return Footprint|null The footprint of this part. Null if this part should not have a footprint.
*/
public function getFootprint(): ?Footprint
{
diff --git a/src/Entity/Parts/PartTraits/InstockTrait.php b/src/Entity/Parts/PartTraits/InstockTrait.php
index d7b59469..29d04c89 100644
--- a/src/Entity/Parts/PartTraits/InstockTrait.php
+++ b/src/Entity/Parts/PartTraits/InstockTrait.php
@@ -122,7 +122,7 @@ trait InstockTrait
/**
* Get the count of parts which must be in stock at least.
- * If a integer-based part unit is selected, the value will be rounded to integers.
+ * If an integer-based part unit is selected, the value will be rounded to integers.
*
* @return float count of parts which must be in stock at least
*/
@@ -171,7 +171,7 @@ trait InstockTrait
//TODO: Find a method to do this natively in SQL, the current method could be a bit slow
$sum = 0;
foreach ($this->getPartLots() as $lot) {
- //Dont use the instock value, if it is unkown
+ //Don't use the in stock value, if it is unknown
if ($lot->isInstockUnknown() || $lot->isExpired() ?? false) {
continue;
}
diff --git a/src/Entity/Parts/PartTraits/ProjectTrait.php b/src/Entity/Parts/PartTraits/ProjectTrait.php
index 58697427..e0d646d2 100644
--- a/src/Entity/Parts/PartTraits/ProjectTrait.php
+++ b/src/Entity/Parts/PartTraits/ProjectTrait.php
@@ -41,7 +41,7 @@ trait ProjectTrait
}
/**
- * Returns the project that this part represents the builds of, or null if it doesnt
+ * Returns the project that this part represents the builds of, or null if it doesn't
* @return Project|null
*/
public function getBuiltProject(): ?Project
diff --git a/src/Entity/PriceInformations/Pricedetail.php b/src/Entity/PriceInformations/Pricedetail.php
index b1ac5155..49d01730 100644
--- a/src/Entity/PriceInformations/Pricedetail.php
+++ b/src/Entity/PriceInformations/Pricedetail.php
@@ -266,9 +266,9 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
*
* @param BigDecimal $new_price the new price as a float number
*
- * * This is the price for "price_related_quantity" parts!!
- * * Example: if "price_related_quantity" is '10',
- * you have to set here the price for 10 parts!
+ * This is the price for "price_related_quantity" parts!!
+ * Example: if "price_related_quantity" is 10,
+ * you have to set here the price for 10 parts!
*
* @return $this
*/
diff --git a/src/Entity/UserSystem/Group.php b/src/Entity/UserSystem/Group.php
index 08976c30..d0af9f99 100644
--- a/src/Entity/UserSystem/Group.php
+++ b/src/Entity/UserSystem/Group.php
@@ -34,7 +34,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
- * This entity represents an user group.
+ * This entity represents a user group.
*
* @ORM\Entity()
* @ORM\Table("`groups`", indexes={
@@ -64,7 +64,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
protected Collection $users;
/**
- * @var bool If true all users associated with this group must have enabled some kind of 2 factor authentication
+ * @var bool If true all users associated with this group must have enabled some kind of two-factor authentication
* @ORM\Column(type="boolean", name="enforce_2fa")
* @Groups({"extended", "full", "import"})
*/
diff --git a/src/Entity/UserSystem/PermissionData.php b/src/Entity/UserSystem/PermissionData.php
index 90fe3289..bac73282 100644
--- a/src/Entity/UserSystem/PermissionData.php
+++ b/src/Entity/UserSystem/PermissionData.php
@@ -57,7 +57,7 @@ final class PermissionData implements \JsonSerializable
/**
* Creates a new Permission Data Instance using the given data.
- * By default, a empty array is used, meaning
+ * By default, an empty array is used, meaning
*/
public function __construct(array $data = [])
{
diff --git a/src/Entity/UserSystem/User.php b/src/Entity/UserSystem/User.php
index b809d717..7c271c6c 100644
--- a/src/Entity/UserSystem/User.php
+++ b/src/Entity/UserSystem/User.php
@@ -53,7 +53,7 @@ use Jbtronics\TFAWebauthn\Model\TwoFactorInterface as WebauthnTwoFactorInterface
/**
* This entity represents a user, which can log in and have permissions.
- * Also this entity is able to save some informations about the user, like the names, email-address and other info.
+ * Also, this entity is able to save some information about the user, like the names, email-address and other info.
*
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
* @ORM\Table("`users`", indexes={
@@ -130,7 +130,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
* @var Group|null the group this user belongs to
- * DO NOT PUT A fetch eager here! Otherwise you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions.
+ * DO NOT PUT A fetch eager here! Otherwise, you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions.
* @ORM\ManyToOne(targetEntity="Group", inversedBy="users")
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* @Selectable()
@@ -139,7 +139,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
protected ?Group $group = null;
/**
- * @var string|null The secret used for google authenticator
+ * @var string|null The secret used for Google authenticator
* @ORM\Column(name="google_authenticator_secret", type="string", nullable=true)
*/
protected ?string $googleAuthenticatorSecret = null;
@@ -409,7 +409,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
}
/**
- * Checks if this user is disabled (user cannot login any more).
+ * Checks if this user is disabled (user cannot log in any more).
*
* @return bool true, if the user is disabled
*/
@@ -516,7 +516,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
public function getFullName(bool $including_username = false): string
{
$tmp = $this->getFirstName();
- //Dont add a space, if the name has only one part (it would look strange)
+ //Don't add a space, if the name has only one part (it would look strange)
if (!empty($this->getFirstName()) && !empty($this->getLastName())) {
$tmp .= ' ';
}
@@ -683,9 +683,9 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
- * Gets the language the user prefers (as 2 letter ISO code).
+ * Gets the language the user prefers (as 2-letter ISO code).
*
- * @return string|null The 2 letter ISO code of the preferred language (e.g. 'en' or 'de').
+ * @return string|null The 2-letter ISO code of the preferred language (e.g. 'en' or 'de').
* If null is returned, the user has not specified a language and the server wide language should be used.
*/
public function getLanguage(): ?string
@@ -696,8 +696,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
* Change the language the user prefers.
*
- * @param string|null $language The new language as 2 letter ISO code (e.g. 'en' or 'de').
- * Set to null, to use the system wide language.
+ * @param string|null $language The new language as 2-letter ISO code (e.g. 'en' or 'de').
+ * Set to null, to use the system-wide language.
*
* @return User
*/
@@ -744,8 +744,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
* Change the theme the user wants to see.
*
- * @param string|null $theme The name of the theme (See See self::AVAILABLE_THEMES for valid values). Set to null
- * if the system wide theme should be used.
+ * @param string|null $theme The name of the theme (See self::AVAILABLE_THEMES for valid values). Set to null
+ * if the system-wide theme should be used.
*
* @return $this
*/
@@ -789,7 +789,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
}
/**
- * Return the user name that should be shown in Google Authenticator.
+ * Return the username that should be shown in Google Authenticator.
*/
public function getGoogleAuthenticatorUsername(): string
{
@@ -893,7 +893,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
* Invalidate all trusted device tokens at once, by incrementing the token version.
- * You have to flush the changes to database afterwards.
+ * You have to flush the changes to database afterward.
*/
public function invalidateTrustedDeviceTokens(): void
{
diff --git a/src/EntityListeners/AttachmentDeleteListener.php b/src/EntityListeners/AttachmentDeleteListener.php
index e3051342..84d588c7 100644
--- a/src/EntityListeners/AttachmentDeleteListener.php
+++ b/src/EntityListeners/AttachmentDeleteListener.php
@@ -37,7 +37,7 @@ use SplFileInfo;
/**
* This listener watches for changes on attachments and deletes the files associated with an attachment, that are not
- * used any more. This can happens after an attachment is delteted or the path is changed.
+ * used anymore. This can happen after an attachment is deleted or the path is changed.
*/
class AttachmentDeleteListener
{
diff --git a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php
index 29a1af07..d9c1173d 100644
--- a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php
+++ b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php
@@ -47,12 +47,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\Serializer\SerializerInterface;
/**
- * This event subscriber write to event log when entities are changed, removed, created.
+ * This event subscriber writes to the event log when entities are changed, removed, created.
*/
class EventLoggerSubscriber implements EventSubscriber
{
/**
- * @var array The given fields will not be saved, because they contain sensitive informations
+ * @var array The given fields will not be saved, because they contain sensitive information
*/
protected const FIELD_BLACKLIST = [
User::class => ['password', 'need_pw_change', 'googleAuthenticatorSecret', 'backupCodes', 'trustedDeviceCookieVersion', 'pw_reset_token', 'backupCodesGenerationDate'],
@@ -128,7 +128,7 @@ class EventLoggerSubscriber implements EventSubscriber
public function postPersist(LifecycleEventArgs $args): void
{
- //Create an log entry, we have to do this post persist, cause we have to know the ID
+ //Create a log entry, we have to do this post persist, because we have to know the ID
/** @var AbstractDBElement $entity */
$entity = $args->getObject();
@@ -158,7 +158,7 @@ class EventLoggerSubscriber implements EventSubscriber
{
$em = $args->getObjectManager();
$uow = $em->getUnitOfWork();
- // If the we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
+ // If we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
$uow->computeChangeSets();
if ($uow->hasPendingInsertions() || !empty($uow->getScheduledEntityUpdates())) {
$em->flush();
@@ -196,7 +196,7 @@ class EventLoggerSubscriber implements EventSubscriber
}
}
- //By default allow every field.
+ //By default, allow every field.
return true;
}
diff --git a/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php b/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php
index a2b9f1ff..45dbe61b 100644
--- a/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php
+++ b/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php
@@ -49,7 +49,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
/**
- * Write to event log when a user tries to access an forbidden page and recevies an 403 Access Denied message.
+ * Write to event log when a user tries to access a forbidden page and receives an 403 Access Denied message.
*/
class LogAccessDeniedSubscriber implements EventSubscriberInterface
{
diff --git a/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php b/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php
index 78402633..88eeef2c 100644
--- a/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php
+++ b/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php
@@ -49,7 +49,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RequestStack;
/**
- * This subscriber writes entries to log if an security related event happens (e.g. the user changes its password).
+ * This subscriber writes entries to log if a security related event happens (e.g. the user changes its password).
*/
final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
{
@@ -133,7 +133,7 @@ final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
$ip = $request->getClientIp() ?? 'unknown';
} else {
$ip = 'Console';
- //Dont try to apply IP filter rules to non numeric string
+ //Don't try to apply IP filter rules to non-numeric string
$anonymize = false;
}
diff --git a/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php b/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php
index f6f4fc25..d2aab142 100644
--- a/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php
+++ b/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php
@@ -26,7 +26,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
/**
- * This subscriber sets an Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
+ * This subscriber sets a Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
*/
final class SymfonyDebugToolbarSubscriber implements EventSubscriberInterface
{
diff --git a/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php b/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php
index 8d8746b8..0587ff29 100644
--- a/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php
+++ b/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php
@@ -33,7 +33,7 @@ use Symfony\Component\Security\Http\SecurityEvents;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
- * This event listener shows an login successful flash to the user after login and write the login to event log.
+ * This event listener shows a login successful flash to the user after login and write the login to event log.
*/
final class LoginSuccessSubscriber implements EventSubscriberInterface
{
diff --git a/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php b/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php
index 2ab3f8f7..a668828c 100644
--- a/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php
+++ b/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php
@@ -31,8 +31,8 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Security;
/**
- * This subscriber is used to log out a disabled user, as soon as he to do an request.
- * It is not possible for him to login again, afterwards.
+ * This subscriber is used to log out a disabled user, as soon as he to do a request.
+ * It is not possible for him to login again, afterward.
*/
final class LogoutDisabledUserSubscriber implements EventSubscriberInterface
{
@@ -50,7 +50,7 @@ final class LogoutDisabledUserSubscriber implements EventSubscriberInterface
{
$user = $this->security->getUser();
if ($user instanceof User && $user->isDisabled()) {
- //Redirect to login
+ //Redirect to log in
$response = new RedirectResponse($this->urlGenerator->generate('logout'));
$event->setResponse($response);
}
diff --git a/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php b/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php
index 039b73fb..b38f0dfe 100644
--- a/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php
+++ b/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php
@@ -31,7 +31,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Security\Core\Security;
/**
- * The purpose of this event subscriber is to check if the permission schema of the current user is up to date and upgrade it automatically if needed.
+ * The purpose of this event subscriber is to check if the permission schema of the current user is up-to-date and upgrade it automatically if needed.
*/
class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface
{
diff --git a/src/Events/SecurityEvent.php b/src/Events/SecurityEvent.php
index bf8056d3..68f277c5 100644
--- a/src/Events/SecurityEvent.php
+++ b/src/Events/SecurityEvent.php
@@ -46,7 +46,7 @@ use Symfony\Contracts\EventDispatcher\Event;
/**
* This event is triggered when something security related to a user happens.
- * For example when the password is reset or the an two factor authentication method was disabled.
+ * For example when the password is reset or the two-factor authentication method was disabled.
*/
class SecurityEvent extends Event
{
diff --git a/src/Form/CollectionTypeExtension.php b/src/Form/CollectionTypeExtension.php
index c02364c1..1c0c8d63 100644
--- a/src/Form/CollectionTypeExtension.php
+++ b/src/Form/CollectionTypeExtension.php
@@ -166,7 +166,7 @@ class CollectionTypeExtension extends AbstractTypeExtension
/**
* Set the option of the form.
- * This a bit hacky cause we access private properties....
+ * This a bit hacky because we access private properties....
*
*/
public function setOption(FormConfigInterface $builder, string $option, $value): void
@@ -175,7 +175,7 @@ class CollectionTypeExtension extends AbstractTypeExtension
throw new \RuntimeException('This method only works with FormConfigBuilder instances.');
}
- //We have to use FormConfigBuilder::class here, because options is private and not available in sub classes
+ //We have to use FormConfigBuilder::class here, because options is private and not available in subclasses
$reflection = new ReflectionClass(FormConfigBuilder::class);
$property = $reflection->getProperty('options');
$property->setAccessible(true);
diff --git a/src/Form/Filters/Constraints/NumberConstraintType.php b/src/Form/Filters/Constraints/NumberConstraintType.php
index cbfd6897..a04fc9a1 100644
--- a/src/Form/Filters/Constraints/NumberConstraintType.php
+++ b/src/Form/Filters/Constraints/NumberConstraintType.php
@@ -47,7 +47,7 @@ class NumberConstraintType extends AbstractType
$resolver->setDefaults([
'compound' => true,
'data_class' => NumberConstraint::class,
- 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units
+ 'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units
'min' => null,
'max' => null,
diff --git a/src/Form/Filters/Constraints/ParameterConstraintType.php b/src/Form/Filters/Constraints/ParameterConstraintType.php
index aa8c75b1..10c58429 100644
--- a/src/Form/Filters/Constraints/ParameterConstraintType.php
+++ b/src/Form/Filters/Constraints/ParameterConstraintType.php
@@ -68,7 +68,6 @@ class ParameterConstraintType extends AbstractType
* Ensure that the data is never null, but use an empty ParameterConstraint instead
*/
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
- $form = $event->getForm();
$data = $event->getData();
if ($data === null) {
diff --git a/src/Form/Filters/Constraints/StructuralEntityConstraintType.php b/src/Form/Filters/Constraints/StructuralEntityConstraintType.php
index c9d6f25a..1ef6a333 100644
--- a/src/Form/Filters/Constraints/StructuralEntityConstraintType.php
+++ b/src/Form/Filters/Constraints/StructuralEntityConstraintType.php
@@ -36,7 +36,7 @@ class StructuralEntityConstraintType extends AbstractType
$resolver->setDefaults([
'compound' => true,
'data_class' => EntityConstraint::class,
- 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units
+ 'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units
]);
$resolver->setRequired('entity_class');
diff --git a/src/Form/Filters/Constraints/UserEntityConstraintType.php b/src/Form/Filters/Constraints/UserEntityConstraintType.php
index 33a6e5a2..86c9eb97 100644
--- a/src/Form/Filters/Constraints/UserEntityConstraintType.php
+++ b/src/Form/Filters/Constraints/UserEntityConstraintType.php
@@ -36,7 +36,7 @@ class UserEntityConstraintType extends AbstractType
$resolver->setDefaults([
'compound' => true,
'data_class' => EntityConstraint::class,
- 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units
+ 'text_suffix' => '', //A suffix which is attached as text-append to the input group. This can for example be used for units
]);
}
diff --git a/src/Form/Type/CurrencyEntityType.php b/src/Form/Type/CurrencyEntityType.php
index ffc7180a..46aeac66 100644
--- a/src/Form/Type/CurrencyEntityType.php
+++ b/src/Form/Type/CurrencyEntityType.php
@@ -63,7 +63,7 @@ class CurrencyEntityType extends StructuralEntityType
});
$resolver->setDefault('empty_message', function (Options $options) {
- //By default we use the global base currency:
+ //By default, we use the global base currency:
$iso_code = $this->base_currency;
if ($options['base_currency']) { //Allow to override it
@@ -75,7 +75,7 @@ class CurrencyEntityType extends StructuralEntityType
$resolver->setDefault('used_to_select_parent', false);
- //If short is set to true, then the name of the entity will only shown in the dropdown list not in the selected value.
+ //If short is set to true, then the name of the entity will only show in the dropdown list not in the selected value.
$resolver->setDefault('short', false);
}
}
diff --git a/src/Form/Type/Helper/StructuralEntityChoiceHelper.php b/src/Form/Type/Helper/StructuralEntityChoiceHelper.php
index d2be4588..da52b83e 100644
--- a/src/Form/Type/Helper/StructuralEntityChoiceHelper.php
+++ b/src/Form/Type/Helper/StructuralEntityChoiceHelper.php
@@ -147,8 +147,8 @@ class StructuralEntityChoiceHelper
/**
* Do not change the structure below, even when inspection says it can be replaced with a null coalescing operator.
- * It is important that the value returned here for a existing element is an int, and for a new element a string.
- * I dont really understand why, but it seems to be important for the choice_loader to work correctly.
+ * It is important that the value returned here for an existing element is an int, and for a new element a string.
+ * I don't really understand why, but it seems to be important for the choice_loader to work correctly.
* So please do not change this!
*/
if ($element->getID() === null) {
diff --git a/src/Form/Type/PartSelectType.php b/src/Form/Type/PartSelectType.php
index 1795a9c0..08cf688c 100644
--- a/src/Form/Type/PartSelectType.php
+++ b/src/Form/Type/PartSelectType.php
@@ -35,7 +35,7 @@ class PartSelectType extends AbstractType implements DataMapperInterface
public function buildForm(FormBuilderInterface $builder, array $options)
{
- //At initialization we have to fill the form element with our selected data, so the user can see it
+ //At initialization, we have to fill the form element with our selected data, so the user can see it
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (PreSetDataEvent $event) {
$form = $event->getForm();
$config = $form->getConfig()->getOptions();
diff --git a/src/Form/Type/StructuralEntityType.php b/src/Form/Type/StructuralEntityType.php
index fa48e21d..9c489b47 100644
--- a/src/Form/Type/StructuralEntityType.php
+++ b/src/Form/Type/StructuralEntityType.php
@@ -118,7 +118,7 @@ class StructuralEntityType extends AbstractType
'choice_translation_domain' => false, //Don't translate the entity names
]);
- //Set the constraints for the case that allow add is enabled (we then have to check that the new element is valid)
+ //Set the constraints for the case that allow to add is enabled (we then have to check that the new element is valid)
$resolver->setNormalizer('constraints', function (Options $options, $value) {
if ($options['allow_add']) {
$value[] = new Valid();
@@ -159,8 +159,8 @@ class StructuralEntityType extends AbstractType
public function modelReverseTransform($value, array $options)
{
/* This step is important in combination with the caching!
- The elements deserialized from cache, are not known to Doctrinte ORM any more, so doctrine thinks,
- that the entity has changed (and so throws an exception about non-persited entities).
+ The elements deserialized from cache, are not known to Doctrine ORM anymore, so doctrine thinks,
+ that the entity has changed (and so throws an exception about non-persisted entities).
This function just retrieves a fresh copy of the entity from database, so doctrine detect correctly that no
change happened.
The performance impact of this should be very small in comparison of the boost, caused by the caching.
diff --git a/src/Helpers/Projects/ProjectBuildRequest.php b/src/Helpers/Projects/ProjectBuildRequest.php
index 093581f4..4cb942d1 100644
--- a/src/Helpers/Projects/ProjectBuildRequest.php
+++ b/src/Helpers/Projects/ProjectBuildRequest.php
@@ -175,7 +175,7 @@ final class ProjectBuildRequest
/**
* Returns the amount of parts that should be withdrawn from the given lot for the corresponding BOM entry.
- * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdraw amount should be get
+ * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdrawal amount should be got
* @return float
*/
public function getLotWithdrawAmount($lot): float
@@ -197,7 +197,7 @@ final class ProjectBuildRequest
/**
* Sets the amount of parts that should be withdrawn from the given lot for the corresponding BOM entry.
- * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdraw amount should be get
+ * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdrawal amount should be got
* @param float $amount
* @return $this
*/
@@ -267,7 +267,7 @@ final class ProjectBuildRequest
}
/**
- * Returns the list of all bom entries that have to be build.
+ * Returns the list of all bom entries that have to be built.
* @return ProjectBOMEntry[]
*/
public function getBomEntries(): array
@@ -276,7 +276,7 @@ final class ProjectBuildRequest
}
/**
- * Returns the all part bom entries that have to be build.
+ * Returns the all part bom entries that have to be built.
* @return ProjectBOMEntry[]
*/
public function getPartBomEntries(): array
diff --git a/src/Migration/AbstractMultiPlatformMigration.php b/src/Migration/AbstractMultiPlatformMigration.php
index ab7e5977..324eeb8d 100644
--- a/src/Migration/AbstractMultiPlatformMigration.php
+++ b/src/Migration/AbstractMultiPlatformMigration.php
@@ -76,7 +76,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
}
/**
- * Gets the legacy Part-DB version number. Returns 0, if target database is not an legacy Part-DB database.
+ * Gets the legacy Part-DB version number. Returns 0, if target database is not a legacy Part-DB database.
*/
public function getOldDBVersion(): int
{
@@ -111,7 +111,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
}
}
- //As we dont have access to container, just use the default PHP pw hash function
+ //As we don't have access to container, just use the default PHP pw hash function
return password_hash($this->admin_pw, PASSWORD_DEFAULT);
}
diff --git a/src/Repository/AttachmentRepository.php b/src/Repository/AttachmentRepository.php
index 9ad9191b..69842352 100644
--- a/src/Repository/AttachmentRepository.php
+++ b/src/Repository/AttachmentRepository.php
@@ -61,7 +61,7 @@ class AttachmentRepository extends DBElementRepository
}
/**
- * Gets the count of all external attachments (attachments only containing an URL).
+ * Gets the count of all external attachments (attachments only containing a URL).
*
* @throws NoResultException
* @throws NonUniqueResultException
@@ -80,7 +80,7 @@ class AttachmentRepository extends DBElementRepository
}
/**
- * Gets the count of all attachments where an user uploaded an file.
+ * Gets the count of all attachments where a user uploaded a file.
*
* @throws NoResultException
* @throws NonUniqueResultException
diff --git a/src/Repository/LogEntryRepository.php b/src/Repository/LogEntryRepository.php
index 857aac5b..16ada41b 100644
--- a/src/Repository/LogEntryRepository.php
+++ b/src/Repository/LogEntryRepository.php
@@ -100,7 +100,7 @@ class LogEntryRepository extends DBElementRepository
* Gets all log entries that are related to time travelling.
*
* @param AbstractDBElement $element The element for which the time travel data should be retrieved
- * @param DateTime $until Back to which timestamp should the data be get (including the timestamp)
+ * @param DateTime $until Back to which timestamp should the data be got (including the timestamp)
*
* @return AbstractLogEntry[]
*/
diff --git a/src/Repository/NamedDBElementRepository.php b/src/Repository/NamedDBElementRepository.php
index 8387d47c..8485d50a 100644
--- a/src/Repository/NamedDBElementRepository.php
+++ b/src/Repository/NamedDBElementRepository.php
@@ -47,7 +47,7 @@ class NamedDBElementRepository extends DBElementRepository
if ($entity instanceof User) {
if ($entity->isDisabled()) {
- //If this is an user, then add a badge when it is disabled
+ //If this is a user, then add a badge when it is disabled
$node->setIcon('fa-fw fa-treeview fa-solid fa-user-lock text-muted');
}
if ($entity->isSamlUser()) {
diff --git a/src/Repository/PartRepository.php b/src/Repository/PartRepository.php
index 5dfb8f45..fff8461a 100644
--- a/src/Repository/PartRepository.php
+++ b/src/Repository/PartRepository.php
@@ -30,7 +30,7 @@ use Doctrine\ORM\QueryBuilder;
class PartRepository extends NamedDBElementRepository
{
/**
- * Gets the summed up instock of all parts (only parts without an measurent unit).
+ * Gets the summed up instock of all parts (only parts without a measurement unit).
*
* @throws NoResultException
* @throws NonUniqueResultException
@@ -49,7 +49,7 @@ class PartRepository extends NamedDBElementRepository
}
/**
- * Gets the number of parts that has price informations.
+ * Gets the number of parts that has price information.
*
* @throws NoResultException
* @throws NonUniqueResultException
diff --git a/src/Repository/StructuralDBElementRepository.php b/src/Repository/StructuralDBElementRepository.php
index d7dae474..442c5860 100644
--- a/src/Repository/StructuralDBElementRepository.php
+++ b/src/Repository/StructuralDBElementRepository.php
@@ -88,7 +88,7 @@ class StructuralDBElementRepository extends NamedDBElementRepository
$recursiveIterator = new RecursiveIteratorIterator($elementIterator, RecursiveIteratorIterator::SELF_FIRST);
//$result = iterator_to_array($recursiveIterator);
- //We can not use iterator_to_array here or we get only the parent elements
+ //We can not use iterator_to_array here, or we get only the parent elements
foreach ($recursiveIterator as $item) {
$result[] = $item;
}
diff --git a/src/Security/UserChecker.php b/src/Security/UserChecker.php
index c1b44fa5..f64fb50e 100644
--- a/src/Security/UserChecker.php
+++ b/src/Security/UserChecker.php
@@ -59,7 +59,7 @@ final class UserChecker implements UserCheckerInterface
return;
}
- //Check if user is disabled. Then dont allow login
+ //Check if user is disabled. Then don't allow login
if ($user->isDisabled()) {
//throw new DisabledException();
throw new CustomUserMessageAccountStatusException($this->translator->trans('user.login_error.user_disabled', [], 'security'));
diff --git a/src/Security/Voter/StructureVoter.php b/src/Security/Voter/StructureVoter.php
index df88e113..a37083ea 100644
--- a/src/Security/Voter/StructureVoter.php
+++ b/src/Security/Voter/StructureVoter.php
@@ -69,7 +69,7 @@ class StructureVoter extends ExtendedVoter
}
/**
- * Maps a instance type to the permission name.
+ * Maps an instance type to the permission name.
*
* @param object|string $subject The subject for which the permission name should be generated
*
diff --git a/src/Security/Voter/UserVoter.php b/src/Security/Voter/UserVoter.php
index a311e4db..5e34b8cc 100644
--- a/src/Security/Voter/UserVoter.php
+++ b/src/Security/Voter/UserVoter.php
@@ -80,7 +80,7 @@ class UserVoter extends ExtendedVoter
}
}
- //Else just check users permission:
+ //Else just check user permission:
if ($this->resolver->isValidOperation('users', $attribute)) {
return $this->resolver->inherit($user, 'users', $attribute) ?? false;
}
diff --git a/src/Serializer/StructuralElementDenormalizer.php b/src/Serializer/StructuralElementDenormalizer.php
index 8e56c981..c4cfb09d 100644
--- a/src/Serializer/StructuralElementDenormalizer.php
+++ b/src/Serializer/StructuralElementDenormalizer.php
@@ -46,7 +46,7 @@ class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface
{
return is_array($data)
&& is_subclass_of($type, AbstractStructuralDBElement::class)
- //Only denormalize if we are doing an file import operation
+ //Only denormalize if we are doing a file import operation
&& in_array('import', $context['groups'] ?? [], true);
}
@@ -69,7 +69,7 @@ class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface
//Check if we have created the entity in this request before (so we don't create multiple entities for the same path)
//Entities get saved in the cache by type and path
- //We use a different cache for this then the objects created by a string value (saved in repo). However that should not be a problem
+ //We use a different cache for this then the objects created by a string value (saved in repo). However, that should not be a problem
//unless the user data has mixed structure between json data and a string path
if (isset($this->object_cache[$type][$path])) {
return $this->object_cache[$type][$path];
diff --git a/src/Serializer/StructuralElementFromNameDenormalizer.php b/src/Serializer/StructuralElementFromNameDenormalizer.php
index 7fe6c57d..8516c951 100644
--- a/src/Serializer/StructuralElementFromNameDenormalizer.php
+++ b/src/Serializer/StructuralElementFromNameDenormalizer.php
@@ -69,7 +69,7 @@ class StructuralElementFromNameDenormalizer implements DenormalizerInterface, Ca
public function hasCacheableSupportsMethod(): bool
{
- //Must be false, because we do a is_string check on data in supportsDenormalization
+ //Must be false, because we do an is_string check on data in supportsDenormalization
return false;
}
}
\ No newline at end of file
diff --git a/src/Services/Attachments/AttachmentManager.php b/src/Services/Attachments/AttachmentManager.php
index bddea30b..81b1334f 100644
--- a/src/Services/Attachments/AttachmentManager.php
+++ b/src/Services/Attachments/AttachmentManager.php
@@ -140,7 +140,7 @@ class AttachmentManager
}
/**
- * Returns a human readable version of the attachment file size.
+ * Returns a human-readable version of the attachment file size.
* For external attachments, null is returned.
*
* @param int $decimals The number of decimals numbers that should be printed
diff --git a/src/Services/Attachments/AttachmentReverseSearch.php b/src/Services/Attachments/AttachmentReverseSearch.php
index 34a6b929..efcbb5bd 100644
--- a/src/Services/Attachments/AttachmentReverseSearch.php
+++ b/src/Services/Attachments/AttachmentReverseSearch.php
@@ -30,7 +30,7 @@ use SplFileInfo;
use Symfony\Component\Filesystem\Filesystem;
/**
- * This service provides functions to find attachments via an reverse search based on a file.
+ * This service provides functions to find attachments via a reverse search based on a file.
*/
class AttachmentReverseSearch
{
@@ -53,7 +53,7 @@ class AttachmentReverseSearch
*
* @param SplFileInfo $file The file for which is searched
*
- * @return Attachment[] an list of attachments that use the given file
+ * @return Attachment[] a list of attachments that use the given file
*/
public function findAttachmentsByFile(SplFileInfo $file): array
{
@@ -75,11 +75,11 @@ class AttachmentReverseSearch
* @param SplFileInfo $file The file that should be removed
* @param int $threshold the threshold used, to determine if a file should be deleted or not
*
- * @return bool True, if the file was delete. False if not.
+ * @return bool True, if the file was deleted. False if not.
*/
public function deleteIfNotUsed(SplFileInfo $file, int $threshold = 1): bool
{
- /* When the file is used more then $threshold times, don't delete it */
+ /* When the file is used more than $threshold times, don't delete it */
if (count($this->findAttachmentsByFile($file)) > $threshold) {
return false;
}
diff --git a/src/Services/Attachments/AttachmentSubmitHandler.php b/src/Services/Attachments/AttachmentSubmitHandler.php
index db88154d..4dca3c4c 100644
--- a/src/Services/Attachments/AttachmentSubmitHandler.php
+++ b/src/Services/Attachments/AttachmentSubmitHandler.php
@@ -108,7 +108,7 @@ class AttachmentSubmitHandler
*/
public function isValidFileExtension(AttachmentType $attachment_type, UploadedFile $uploadedFile): bool
{
- //Only validate if the attachment type has specified an filetype filter:
+ //Only validate if the attachment type has specified a filetype filter:
if (empty($attachment_type->getFiletypeFilter())) {
return true;
}
@@ -121,10 +121,10 @@ class AttachmentSubmitHandler
/**
* Generates a filename for the given attachment and extension.
- * The filename contains a random id, so every time this function is called you get an unique name.
+ * The filename contains a random id, so every time this function is called you get a unique name.
*
* @param Attachment $attachment The attachment that should be used for generating an attachment
- * @param string $extension The extension that the new file should have (must only contain chars allowed in pathes)
+ * @param string $extension The extension that the new file should have (must only contain chars allowed in paths)
*
* @return string the new filename
*/
@@ -136,7 +136,7 @@ class AttachmentSubmitHandler
$extension
);
- //Use the (sanatized) attachment name as an filename part
+ //Use the (sanatized) attachment name as a filename part
$safeName = transliterator_transliterate(
'Any-Latin; Latin-ASCII; [^A-Za-z0-9_] remove; Lower()',
$attachment->getName()
@@ -177,12 +177,12 @@ class AttachmentSubmitHandler
}
/**
- * Handle the submit of an attachment form.
+ * Handle submission of an attachment form.
* This function will move the uploaded file or download the URL file to server, if needed.
*
* @param Attachment $attachment the attachment that should be used for handling
* @param UploadedFile|null $file If given, that file will be moved to the right location
- * @param array $options The options to use with the upload. Here you can specify that an URL should be downloaded,
+ * @param array $options The options to use with the upload. Here you can specify that a URL should be downloaded,
* or an file should be moved to a secure location.
*
* @return Attachment The attachment with the new filename (same instance as passed $attachment)
@@ -219,7 +219,7 @@ class AttachmentSubmitHandler
}
/**
- * Rename attachments with an unsafe extension (meaning files which would be runned by a to a safe one.
+ * Rename attachments with an unsafe extension (meaning files which would be run by a to a safe one).
* @param Attachment $attachment
* @return Attachment
*/
@@ -261,7 +261,7 @@ class AttachmentSubmitHandler
$resolver->setDefaults([
//If no preview image was set yet, the new uploaded file will become the preview image
'become_preview_if_empty' => true,
- //When an URL is given download the URL
+ //When a URL is given download the URL
'download_url' => false,
'secure_attachment' => false,
]);
@@ -357,17 +357,17 @@ class AttachmentSubmitHandler
//File download should be finished here, so determine the new filename and extension
$headers = $response->getHeaders();
- //Try to determine an filename
+ //Try to determine a filename
$filename = '';
- //If an content disposition header was set try to extract the filename out of it
+ //If a content disposition header was set try to extract the filename out of it
if (isset($headers['content-disposition'])) {
$tmp = [];
preg_match('/[^;\\n=]*=([\'\"])*(.*)(?(1)\1|)/', $headers['content-disposition'][0], $tmp);
$filename = $tmp[2];
}
- //If we dont know filename yet, try to determine it out of url
+ //If we don't know filename yet, try to determine it out of url
if ('' === $filename) {
$filename = basename(parse_url($url, PHP_URL_PATH));
}
@@ -375,7 +375,7 @@ class AttachmentSubmitHandler
//Set original file
$attachment->setFilename($filename);
- //Check if we have a extension given
+ //Check if we have an extension given
$pathinfo = pathinfo($filename);
if (!empty($pathinfo['extension'])) {
$new_ext = $pathinfo['extension'];
diff --git a/src/Services/Attachments/AttachmentURLGenerator.php b/src/Services/Attachments/AttachmentURLGenerator.php
index 6a7d72db..742cce81 100644
--- a/src/Services/Attachments/AttachmentURLGenerator.php
+++ b/src/Services/Attachments/AttachmentURLGenerator.php
@@ -57,7 +57,7 @@ class AttachmentURLGenerator
}
/**
- * Converts the absolute file path to a version relative to the public folder, that can be passed to asset
+ * Converts the absolute file path to a version relative to the public folder, that can be passed to the
* Asset Component functions.
*
* @param string $absolute_path the absolute path that should be converted
@@ -77,7 +77,7 @@ class AttachmentURLGenerator
$public_path = $this->public_path;
}
- //Our absolute path must begin with public path or we can not use it for asset pathes.
+ //Our absolute path must begin with public path, or we can not use it for asset pathes.
if (0 !== strpos($absolute_path, $public_path)) {
return null;
}
@@ -87,7 +87,7 @@ class AttachmentURLGenerator
}
/**
- * Converts a placeholder path to a path to a image path.
+ * Converts a placeholder path to a path to an image path.
*
* @param string $placeholder_path the placeholder path that should be converted
*/
@@ -120,7 +120,7 @@ class AttachmentURLGenerator
}
/**
- * Returns a URL to an thumbnail of the attachment file.
+ * Returns a URL to a thumbnail of the attachment file.
* @return string|null The URL or null if the attachment file is not existing
*/
public function getThumbnailURL(Attachment $attachment, string $filter_name = 'thumbnail_sm'): ?string
@@ -155,7 +155,7 @@ class AttachmentURLGenerator
//So we remove the schema manually
return preg_replace('/^https?:/', '', $tmp);
} catch (\Imagine\Exception\RuntimeException $e) {
- //If the filter fails, we can not serve the thumbnail and fall back to the original image and log an warning
+ //If the filter fails, we can not serve the thumbnail and fall back to the original image and log a warning
$this->logger->warning('Could not open thumbnail for attachment with ID ' . $attachment->getID() . ': ' . $e->getMessage());
return $this->assets->getUrl($asset_path);
}
diff --git a/src/Services/Attachments/FileTypeFilterTools.php b/src/Services/Attachments/FileTypeFilterTools.php
index bf44cbe1..6fc0a162 100644
--- a/src/Services/Attachments/FileTypeFilterTools.php
+++ b/src/Services/Attachments/FileTypeFilterTools.php
@@ -29,7 +29,7 @@ use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\ItemInterface;
/**
- * An servive that helps working with filetype filters (based on the format accept uses.
+ * A service that helps to work with filetype filters (based on the format accept uses).
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers for
* more details.
*/
diff --git a/src/Services/ElementTypeNameGenerator.php b/src/Services/ElementTypeNameGenerator.php
index be325320..12c7f0d0 100644
--- a/src/Services/ElementTypeNameGenerator.php
+++ b/src/Services/ElementTypeNameGenerator.php
@@ -80,7 +80,7 @@ class ElementTypeNameGenerator
}
/**
- * Gets an localized label for the type of the entity.
+ * Gets a localized label for the type of the entity.
* A part element becomes "Part" ("Bauteil" in german) and a category object becomes "Category".
* Useful when the type should be shown to user.
* Throws an exception if the class is not supported.
@@ -95,7 +95,7 @@ class ElementTypeNameGenerator
{
$class = is_string($entity) ? $entity : get_class($entity);
- //Check if we have an direct array entry for our entity class, then we can use it
+ //Check if we have a direct array entry for our entity class, then we can use it
if (isset($this->mapping[$class])) {
return $this->mapping[$class];
}
diff --git a/src/Services/Formatters/AmountFormatter.php b/src/Services/Formatters/AmountFormatter.php
index 57162e9f..ccc4c4b3 100644
--- a/src/Services/Formatters/AmountFormatter.php
+++ b/src/Services/Formatters/AmountFormatter.php
@@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
- * This service formats an part amout using a Measurement Unit.
+ * This service formats a part amount using a Measurement Unit.
*/
class AmountFormatter
{
@@ -76,7 +76,7 @@ class AmountFormatter
//Otherwise just output it
if (!empty($options['unit'])) {
$format_string = '%.'.$options['decimals'].'f '.$options['unit'];
- } else { //Dont add space after number if no unit was specified
+ } else { //Don't add space after number if no unit was specified
$format_string = '%.'.$options['decimals'].'f';
}
@@ -126,7 +126,7 @@ class AmountFormatter
$resolver->setAllowedTypes('decimals', 'int');
$resolver->setNormalizer('decimals', static function (Options $options, $value) {
- // If the unit is integer based, then dont show any decimals
+ // If the unit is integer based, then don't show any decimals
if ($options['is_integer']) {
return 0;
}
diff --git a/src/Services/Formatters/MarkdownParser.php b/src/Services/Formatters/MarkdownParser.php
index 805fd4bf..1c1d8ff8 100644
--- a/src/Services/Formatters/MarkdownParser.php
+++ b/src/Services/Formatters/MarkdownParser.php
@@ -25,7 +25,7 @@ namespace App\Services\Formatters;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
- * This class allows you to convert markdown text to HTML.
+ * This class allows you to convert Markdown text to HTML.
*/
class MarkdownParser
{
@@ -40,7 +40,7 @@ class MarkdownParser
* Mark the markdown for rendering.
* The rendering of markdown is done on client side.
*
- * @param string $markdown the markdown text that should be parsed to html
+ * @param string $markdown the Markdown text that should be parsed to html
* @param bool $inline_mode When true, p blocks will have no margins behind them
*
* @return string the markdown in a version that can be parsed on client side
diff --git a/src/Services/Formatters/MoneyFormatter.php b/src/Services/Formatters/MoneyFormatter.php
index ee8a189a..1907fe90 100644
--- a/src/Services/Formatters/MoneyFormatter.php
+++ b/src/Services/Formatters/MoneyFormatter.php
@@ -38,7 +38,7 @@ class MoneyFormatter
}
/**
- * Format the the given value in the given currency.
+ * Format the given value in the given currency.
*
* @param string|float $value the value that should be formatted
* @param Currency|null $currency The currency that should be used for formatting. If null the global one is used
diff --git a/src/Services/Formatters/SIFormatter.php b/src/Services/Formatters/SIFormatter.php
index 288641a3..619c2de3 100644
--- a/src/Services/Formatters/SIFormatter.php
+++ b/src/Services/Formatters/SIFormatter.php
@@ -45,7 +45,7 @@ class SIFormatter
*
* @param int $magnitude the magnitude for which the prefix should be determined
*
- * @return array A array, containing the divisor in first element, and the prefix symbol in second. For example, [1000, "k"].
+ * @return array An array, containing the divisor in first element, and the prefix symbol in second. For example, [1000, "k"].
*/
public function getPrefixByMagnitude(int $magnitude): array
{
diff --git a/src/Services/ImportExportSystem/EntityExporter.php b/src/Services/ImportExportSystem/EntityExporter.php
index e68a264a..a4825869 100644
--- a/src/Services/ImportExportSystem/EntityExporter.php
+++ b/src/Services/ImportExportSystem/EntityExporter.php
@@ -74,7 +74,6 @@ class EntityExporter
}
//Ensure that all entities are of type AbstractNamedDBElement
- $entity_type = null;
foreach ($entities as $entity) {
if (!$entity instanceof AbstractNamedDBElement) {
throw new InvalidArgumentException('All entities must be of type AbstractNamedDBElement!');
diff --git a/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php b/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php
index 8941502f..a5006f51 100644
--- a/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php
+++ b/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php
@@ -50,7 +50,7 @@ trait PKImportHelperTrait
*/
protected function convertAttachmentDataToEntity(array $attachment_row, string $target_class, string $type): Attachment
{
- //By default we use the cached version
+ //By default, we use the cached version
if (!$this->import_attachment_type) {
//Get the import attachment type
$this->import_attachment_type = $this->em->getRepository(AttachmentType::class)->findOneBy([
@@ -103,7 +103,7 @@ trait PKImportHelperTrait
/**
* Imports the attachments from the given data
* @param array $data The PartKeepr database
- * @param string $table_name The table name for the attachments (if it contain "image", it will be treated as an image)
+ * @param string $table_name The table name for the attachments (if it contains "image", it will be treated as an image)
* @param string $target_class The target class (e.g. Part)
* @param string $target_id_field The field name where the target ID is stored
* @param string $attachment_class The attachment class (e.g. PartAttachment)
diff --git a/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php b/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php
index a19422e1..4d3af4f4 100644
--- a/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php
+++ b/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php
@@ -30,7 +30,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
/**
- * This service is used to other non mandatory data from a PartKeepr export.
+ * This service is used to other non-mandatory data from a PartKeepr export.
* You have to import the datastructures and parts first to use project import!
*/
class PKOptionalImporter
diff --git a/src/Services/LabelSystem/LabelGenerator.php b/src/Services/LabelSystem/LabelGenerator.php
index 3244875f..4afb20ae 100644
--- a/src/Services/LabelSystem/LabelGenerator.php
+++ b/src/Services/LabelSystem/LabelGenerator.php
@@ -106,7 +106,7 @@ final class LabelGenerator
}
/**
- * Converts width and height given in mm to an size array, that can be used by DOMPDF for page size.
+ * Converts width and height given in mm to a size array, that can be used by DOMPDF for page size.
*
* @param float $width The width of the paper
* @param float $height The height of the paper
diff --git a/src/Services/LabelSystem/LabelProfileDropdownHelper.php b/src/Services/LabelSystem/LabelProfileDropdownHelper.php
index 662922f6..8245c062 100644
--- a/src/Services/LabelSystem/LabelProfileDropdownHelper.php
+++ b/src/Services/LabelSystem/LabelProfileDropdownHelper.php
@@ -70,7 +70,7 @@ final class LabelProfileDropdownHelper
$repo = $this->entityManager->getRepository(LabelProfile::class);
return $this->cache->get($key, function (ItemInterface $item) use ($repo, $type, $secure_class_name) {
- // Invalidate when groups, a element with the class or the user changes
+ // Invalidate when groups, an element with the class or the user changes
$item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]);
return $repo->getDropdownProfiles($type);
diff --git a/src/Services/LogSystem/EventLogger.php b/src/Services/LogSystem/EventLogger.php
index 8155819b..0216cc3a 100644
--- a/src/Services/LogSystem/EventLogger.php
+++ b/src/Services/LogSystem/EventLogger.php
@@ -101,12 +101,12 @@ class EventLogger
return true;
}
- //If the normal log function does not added the log entry, we just do nothing
+ //If the normal log function does not get added to the log entry, we just do nothing
return false;
}
/**
- * Adds the given log entry to the Log, if the entry fullfills the global configured criterias and flush afterwards.
+ * Adds the given log entry to the Log, if the entry fulfills the global configured criteria and flush afterward.
*
* @return bool returns true, if the event was added to log
*/
@@ -129,12 +129,12 @@ class EventLogger
$blacklist = $blacklist ?? $this->blacklist;
$whitelist = $whitelist ?? $this->whitelist;
- //Dont add the entry if it does not reach the minimum level
+ //Don't add the entry if it does not reach the minimum level
if ($logEntry->getLevel() > $minimum_log_level) {
return false;
}
- //Check if the event type is black listed
+ //Check if the event type is blacklisted
if (!empty($blacklist) && $this->isObjectClassInArray($logEntry, $blacklist)) {
return false;
}
@@ -144,7 +144,7 @@ class EventLogger
return false;
}
- // By default all things should be added
+ // By default, all things should be added
return true;
}
diff --git a/src/Services/LogSystem/EventUndoHelper.php b/src/Services/LogSystem/EventUndoHelper.php
index 3dd65eb1..f2328cbc 100644
--- a/src/Services/LogSystem/EventUndoHelper.php
+++ b/src/Services/LogSystem/EventUndoHelper.php
@@ -91,7 +91,7 @@ class EventUndoHelper
}
/**
- * Clear the currently the set undone event.
+ * Clear the currently set undone event.
*/
public function clearUndoneEvent(): void
{
@@ -99,7 +99,7 @@ class EventUndoHelper
}
/**
- * Check if a event is undone.
+ * Check if an event is undone.
*/
public function isUndo(): bool
{
diff --git a/src/Services/LogSystem/LogEntryExtraFormatter.php b/src/Services/LogSystem/LogEntryExtraFormatter.php
index 74eded48..2950842b 100644
--- a/src/Services/LogSystem/LogEntryExtraFormatter.php
+++ b/src/Services/LogSystem/LogEntryExtraFormatter.php
@@ -58,7 +58,7 @@ class LogEntryExtraFormatter
}
/**
- * Return an user viewable representation of the extra data in a log entry, styled for console output.
+ * Return a user viewable representation of the extra data in a log entry, styled for console output.
*/
public function formatConsole(AbstractLogEntry $logEntry): string
{
@@ -81,7 +81,7 @@ class LogEntryExtraFormatter
}
/**
- * Return a HTML formatted string containing a user viewable form of the Extra data.
+ * Return an HTML formatted string containing a user viewable form of the Extra data.
*/
public function format(AbstractLogEntry $context): string
{
diff --git a/src/Services/LogSystem/TimeTravel.php b/src/Services/LogSystem/TimeTravel.php
index f981e08a..99bda007 100644
--- a/src/Services/LogSystem/TimeTravel.php
+++ b/src/Services/LogSystem/TimeTravel.php
@@ -136,7 +136,7 @@ class TimeTravel
continue;
}
- //Revert many to one association (one element in property)
+ //Revert many-to-one association (one element in property)
if (
ClassMetadataInfo::MANY_TO_ONE === $mapping['type']
|| ClassMetadataInfo::ONE_TO_ONE === $mapping['type']
@@ -156,7 +156,7 @@ class TimeTravel
}
foreach ($target_elements as $target_element) {
if (null !== $target_element && $element->getLastModified() >= $timestamp) {
- //Remove the element from collection, if it did not existed at $timestamp
+ //Remove the element from collection, if it did not exist at $timestamp
if (!$this->repo->getElementExistedAtTimestamp(
$target_element,
$timestamp
diff --git a/src/Services/Parameters/ParameterExtractor.php b/src/Services/Parameters/ParameterExtractor.php
index de5ecb51..a5c6a0c0 100644
--- a/src/Services/Parameters/ParameterExtractor.php
+++ b/src/Services/Parameters/ParameterExtractor.php
@@ -93,7 +93,7 @@ class ParameterExtractor
[, $name, $value] = $matches;
$value = trim($value);
- //Dont allow empty names or values (these are a sign of an invalid extracted string)
+ //Don't allow empty names or values (these are a sign of an invalid extracted string)
if (empty($name) || empty($value)) {
return null;
}
diff --git a/src/Services/Parts/PricedetailHelper.php b/src/Services/Parts/PricedetailHelper.php
index f9902a98..a270c622 100644
--- a/src/Services/Parts/PricedetailHelper.php
+++ b/src/Services/Parts/PricedetailHelper.php
@@ -153,13 +153,13 @@ class PricedetailHelper
foreach ($orderdetails as $orderdetail) {
$pricedetail = $orderdetail->findPriceForQty($amount);
- //When we dont have informations about this amount, ignore it
+ //When we don't have information about this amount, ignore it
if (null === $pricedetail) {
continue;
}
$converted = $this->convertMoneyToCurrency($pricedetail->getPricePerUnit(), $pricedetail->getCurrency(), $currency);
- //Ignore price informations that can not be converted to base currency.
+ //Ignore price information that can not be converted to base currency.
if (null !== $converted) {
$avg = $avg->plus($converted);
++$count;
diff --git a/src/Services/ProjectSystem/ProjectBuildHelper.php b/src/Services/ProjectSystem/ProjectBuildHelper.php
index 8eee0772..0e091547 100644
--- a/src/Services/ProjectSystem/ProjectBuildHelper.php
+++ b/src/Services/ProjectSystem/ProjectBuildHelper.php
@@ -79,7 +79,7 @@ class ProjectBuildHelper
}
/**
- * Checks if the given project can be build with the current stock.
+ * Checks if the given project can be built with the current stock.
* This means that the maximum buildable count is greater or equal than the requested $number_of_projects
* @param Project $project
* @parm int $number_of_builds
@@ -91,7 +91,7 @@ class ProjectBuildHelper
}
/**
- * Check if the given BOM entry can be build with the current stock.
+ * Check if the given BOM entry can be built with the current stock.
* This means that the maximum buildable count is greater or equal than the requested $number_of_projects
* @param ProjectBOMEntry $bom_entry
* @param int $number_of_builds
@@ -137,7 +137,7 @@ class ProjectBuildHelper
/**
* Withdraw the parts from the stock using the given ProjectBuildRequest and create the build parts entries, if needed.
* The ProjectBuildRequest has to be validated before!!
- * You have to flush changes to DB afterwards
+ * You have to flush changes to DB afterward
* @param ProjectBuildRequest $buildRequest
* @return void
*/
diff --git a/src/Services/Tools/StatisticsHelper.php b/src/Services/Tools/StatisticsHelper.php
index 60ed568d..f31cb440 100644
--- a/src/Services/Tools/StatisticsHelper.php
+++ b/src/Services/Tools/StatisticsHelper.php
@@ -93,7 +93,7 @@ class StatisticsHelper
}
/**
- * Returns the number of all parts which have price informations.
+ * Returns the number of all parts which have price information.
*
* @throws NoResultException
* @throws NonUniqueResultException
@@ -147,7 +147,7 @@ class StatisticsHelper
}
/**
- * Gets the count of all external (only containing an URL) attachments.
+ * Gets the count of all external (only containing a URL) attachments.
*
* @throws NoResultException
* @throws NonUniqueResultException
@@ -158,7 +158,7 @@ class StatisticsHelper
}
/**
- * Gets the count of all attachments where the user uploaded an file.
+ * Gets the count of all attachments where the user uploaded a file.
*
* @throws NoResultException
* @throws NonUniqueResultException
diff --git a/src/Services/Tools/TagFinder.php b/src/Services/Tools/TagFinder.php
index aa0d02bd..d52b3008 100644
--- a/src/Services/Tools/TagFinder.php
+++ b/src/Services/Tools/TagFinder.php
@@ -59,7 +59,7 @@ class TagFinder
$options = $resolver->resolve($options);
- //If the keyword is too short we will get to much results, which takes too much time...
+ //If the keyword is too short we will get too much results, which takes too much time...
if (mb_strlen($keyword) < $options['min_keyword_length']) {
return [];
}
diff --git a/src/Services/TranslationExtractor/PermissionExtractor.php b/src/Services/TranslationExtractor/PermissionExtractor.php
index 4994e054..03acd5db 100644
--- a/src/Services/TranslationExtractor/PermissionExtractor.php
+++ b/src/Services/TranslationExtractor/PermissionExtractor.php
@@ -81,7 +81,7 @@ final class PermissionExtractor implements ExtractorInterface
}
/**
- * Sets the prefix that should be used for new found messages.
+ * Sets the prefix that should be used for new-found messages.
*
* @param string $prefix The prefix
*/
diff --git a/src/Services/Trees/NodesListBuilder.php b/src/Services/Trees/NodesListBuilder.php
index a7b70793..66ec2d40 100644
--- a/src/Services/Trees/NodesListBuilder.php
+++ b/src/Services/Trees/NodesListBuilder.php
@@ -62,7 +62,7 @@ class NodesListBuilder
$key = 'list_'.$this->keyGenerator->generateKey().'_'.$secure_class_name.$parent_id;
return $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) {
- // Invalidate when groups, a element with the class or the user changes
+ // Invalidate when groups, an element with the class or the user changes
$item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]);
/** @var StructuralDBElementRepository $repo */
$repo = $this->em->getRepository($class_name);
diff --git a/src/Services/Trees/StructuralElementRecursionHelper.php b/src/Services/Trees/StructuralElementRecursionHelper.php
index 4038798f..3096740c 100644
--- a/src/Services/Trees/StructuralElementRecursionHelper.php
+++ b/src/Services/Trees/StructuralElementRecursionHelper.php
@@ -35,7 +35,7 @@ class StructuralElementRecursionHelper
}
/**
- * Executes an function (callable) recursivly for $element and every of its children.
+ * Executes a function (callable) recursivly for $element and every of its children.
*
* @param AbstractStructuralDBElement $element The element on which the func should be executed
* @param callable $func The function which should be executed for each element.
diff --git a/src/Services/Trees/ToolsTreeBuilder.php b/src/Services/Trees/ToolsTreeBuilder.php
index d3dbbf54..b146d694 100644
--- a/src/Services/Trees/ToolsTreeBuilder.php
+++ b/src/Services/Trees/ToolsTreeBuilder.php
@@ -45,7 +45,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
/**
* This Service generates the tree structure for the tools.
- * Whenever you change something here, you has to clear the cache, because the results are cached for performance reasons.
+ * Whenever you change something here, you have to clear the cache, because the results are cached for performance reasons.
*/
class ToolsTreeBuilder
{
@@ -70,7 +70,7 @@ class ToolsTreeBuilder
}
/**
- * Generates the tree for the tools menu.
+ * Generates the tree for the tools' menu.
* The result is cached.
*
* @return TreeViewNode[] the array containing all Nodes for the tools menu
diff --git a/src/Services/Trees/TreeViewGenerator.php b/src/Services/Trees/TreeViewGenerator.php
index 949d6470..29d09f9b 100644
--- a/src/Services/Trees/TreeViewGenerator.php
+++ b/src/Services/Trees/TreeViewGenerator.php
@@ -209,7 +209,7 @@ class TreeViewGenerator
/** @var StructuralDBElementRepository $repo */
$repo = $this->em->getRepository($class);
- //If we just want a part of a tree, dont cache it
+ //If we just want a part of a tree, don't cache it
if (null !== $parent) {
return $repo->getGenericNodeTree($parent);
}
@@ -218,7 +218,7 @@ class TreeViewGenerator
$key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name;
return $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) {
- // Invalidate when groups, a element with the class or the user changes
+ // Invalidate when groups, an element with the class or the user changes
$item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]);
return $repo->getGenericNodeTree($parent);
diff --git a/src/Services/UserSystem/PermissionManager.php b/src/Services/UserSystem/PermissionManager.php
index 618e473a..1e3209fa 100644
--- a/src/Services/UserSystem/PermissionManager.php
+++ b/src/Services/UserSystem/PermissionManager.php
@@ -114,7 +114,7 @@ class PermissionManager
/** @var Group $parent */
$parent = $user->getGroup();
while (null !== $parent) { //The top group, has parent == null
- //Check if our current element gives a info about disallow/allow
+ //Check if our current element gives an info about disallow/allow
$allowed = $this->dontInherit($parent, $permission, $operation);
if (null !== $allowed) {
return $allowed;
@@ -123,7 +123,7 @@ class PermissionManager
$parent = $parent->getParent();
}
- return null; //The inherited value is never resolved. Should be treat as false, in Voters.
+ return null; //The inherited value is never resolved. Should be treated as false, in Voters.
}
/**
@@ -150,7 +150,7 @@ class PermissionManager
/**
* Lists the names of all operations that is supported for the given permission.
*
- * If the Permission is not existing at all, a exception is thrown.
+ * If the Permission is not existing at all, an exception is thrown.
*
* This function is useful for the support() function of the voters.
*
@@ -203,7 +203,6 @@ class PermissionManager
{
//If we have changed anything on the permission structure due to the alsoSet value, this becomes true, so we
//redo the whole process, to ensure that all alsoSet values are set recursively.
- $anything_changed = false;
do {
$anything_changed = false; //Reset the variable for the next iteration
diff --git a/src/Services/UserSystem/PermissionPresetsHelper.php b/src/Services/UserSystem/PermissionPresetsHelper.php
index 3340f9bb..7f7dc405 100644
--- a/src/Services/UserSystem/PermissionPresetsHelper.php
+++ b/src/Services/UserSystem/PermissionPresetsHelper.php
@@ -48,7 +48,7 @@ class PermissionPresetsHelper
*/
public function applyPreset(HasPermissionsInterface $perm_holder, string $preset_name): HasPermissionsInterface
{
- //We need to reset the permission data first (afterwards all values are inherit)
+ //We need to reset the permission data first (afterward all values are inherit)
$perm_holder->getPermissions()->resetPermissions();
switch($preset_name) {
diff --git a/src/Services/UserSystem/TFA/BackupCodeGenerator.php b/src/Services/UserSystem/TFA/BackupCodeGenerator.php
index bc47cab8..942dd050 100644
--- a/src/Services/UserSystem/TFA/BackupCodeGenerator.php
+++ b/src/Services/UserSystem/TFA/BackupCodeGenerator.php
@@ -26,7 +26,7 @@ use Exception;
use RuntimeException;
/**
- * This class generates random backup codes for two factor authentication.
+ * This class generates random backup codes for two-factor authentication.
*/
class BackupCodeGenerator
{
diff --git a/src/Services/UserSystem/TFA/BackupCodeManager.php b/src/Services/UserSystem/TFA/BackupCodeManager.php
index 9a422aa3..fb98a33e 100644
--- a/src/Services/UserSystem/TFA/BackupCodeManager.php
+++ b/src/Services/UserSystem/TFA/BackupCodeManager.php
@@ -25,7 +25,7 @@ namespace App\Services\UserSystem\TFA;
use App\Entity\UserSystem\User;
/**
- * This services offers methods to manage backup codes for two factor authentication.
+ * This services offers methods to manage backup codes for two-factor authentication.
*/
class BackupCodeManager
{
@@ -38,7 +38,7 @@ class BackupCodeManager
/**
* Enable backup codes for the given user, by generating a set of backup codes.
- * If the backup codes were already enabled before, they a.
+ * If the backup codes were already enabled before, nothing happens.
*/
public function enableBackupCodes(User $user): void
{
@@ -48,7 +48,7 @@ class BackupCodeManager
}
/**
- * Disable (remove) the backup codes when no other 2 factor authentication methods are enabled.
+ * Disable (remove) the backup codes when no other two-factor authentication methods are enabled.
*/
public function disableBackupCodesIfUnused(User $user): void
{
diff --git a/src/Twig/FormatExtension.php b/src/Twig/FormatExtension.php
index ac23f0ec..775a3fe4 100644
--- a/src/Twig/FormatExtension.php
+++ b/src/Twig/FormatExtension.php
@@ -63,7 +63,7 @@ final class FormatExtension extends AbstractExtension
new TwigFilter('format_si', [$this, 'siFormat']),
/** Format the given amount using the given MeasurementUnit */
new TwigFilter('format_amount', [$this, 'amountFormat']),
- /** Format the given number of bytes as human readable number */
+ /** Format the given number of bytes as human-readable number */
new TwigFilter('format_bytes', [$this, 'formatBytes']),
];
}
diff --git a/src/Twig/Sandbox/InheritanceSecurityPolicy.php b/src/Twig/Sandbox/InheritanceSecurityPolicy.php
index 052366c0..b70be7a5 100644
--- a/src/Twig/Sandbox/InheritanceSecurityPolicy.php
+++ b/src/Twig/Sandbox/InheritanceSecurityPolicy.php
@@ -112,7 +112,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface
if ($obj instanceof $class) {
$allowed = in_array($method, $methods, true);
- //CHANGED: Only break if we the method is allowed, otherwise try it on the other methods
+ //CHANGED: Only break if the method is allowed, otherwise try it on the other methods
if ($allowed) {
break;
}
@@ -133,7 +133,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface
if ($obj instanceof $class) {
$allowed = in_array($property, is_array($properties) ? $properties : [$properties], true);
- //CHANGED: Only break if we the method is allowed, otherwise try it on the other methods
+ //CHANGED: Only break if the method is allowed, otherwise try it on the other methods
if ($allowed) {
break;
}
diff --git a/src/Twig/UserExtension.php b/src/Twig/UserExtension.php
index 869bea84..3b0ec75c 100644
--- a/src/Twig/UserExtension.php
+++ b/src/Twig/UserExtension.php
@@ -75,7 +75,7 @@ final class UserExtension extends AbstractExtension
}
/**
- * This function/filter generates an path.
+ * This function/filter generates a path.
*/
public function removeLocaleFromPath(string $path): string
{
diff --git a/src/Validator/Constraints/NoLockoutValidator.php b/src/Validator/Constraints/NoLockoutValidator.php
index 4622d7fe..fece2852 100644
--- a/src/Validator/Constraints/NoLockoutValidator.php
+++ b/src/Validator/Constraints/NoLockoutValidator.php
@@ -68,7 +68,7 @@ class NoLockoutValidator extends ConstraintValidator
$user = $this->entityManager->getRepository(User::class)->getAnonymousUser();
}
- //Check if we the change_permission permission has changed from allow to disallow
+ //Check if the change_permission permission has changed from allow to disallow
if (($user instanceof User) && false === ($this->resolver->inherit(
$user,
'users',
diff --git a/src/Validator/Constraints/NoneOfItsChildren.php b/src/Validator/Constraints/NoneOfItsChildren.php
index 15d98a2a..b8e92faa 100644
--- a/src/Validator/Constraints/NoneOfItsChildren.php
+++ b/src/Validator/Constraints/NoneOfItsChildren.php
@@ -25,7 +25,7 @@ namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
- * Constraints the parent property on StructuralDBElement objects in the way, that neither the object self or any
+ * Constraints the parent property on StructuralDBElement objects in the way, that neither the object self nor any
* of its children can be assigned.
*
* @Annotation
@@ -33,7 +33,7 @@ use Symfony\Component\Validator\Constraint;
class NoneOfItsChildren extends Constraint
{
/**
- * @var string The message used if it is tried to assign a object as its own parent
+ * @var string The message used if it is tried to assign an object as its own parent
*/
public string $self_message = 'validator.noneofitschild.self';
/**
diff --git a/src/Validator/Constraints/UrlOrBuiltin.php b/src/Validator/Constraints/UrlOrBuiltin.php
index 5f68d5f4..20b71871 100644
--- a/src/Validator/Constraints/UrlOrBuiltin.php
+++ b/src/Validator/Constraints/UrlOrBuiltin.php
@@ -26,7 +26,7 @@ use App\Entity\Attachments\Attachment;
use Symfony\Component\Validator\Constraints\Url;
/**
- * Constraints the field that way that the content is either a url or a path to a builtin ressource (like %FOOTPRINTS%).
+ * Constraints the field that way that the content is either an url or a path to a builtin ressource (like %FOOTPRINTS%).
*
* @Annotation
*/
diff --git a/tests/Controller/AdminPages/AbstractAdminControllerTest.php b/tests/Controller/AdminPages/AbstractAdminControllerTest.php
index 92ba0027..ef0195c6 100644
--- a/tests/Controller/AdminPages/AbstractAdminControllerTest.php
+++ b/tests/Controller/AdminPages/AbstractAdminControllerTest.php
@@ -76,7 +76,7 @@ abstract class AbstractAdminControllerTest extends WebTestCase
/**
* @dataProvider readDataProvider
* @group slow
- * Tests if it possible to access an specific entity. Checks if permissions are working.
+ * Tests if it is possible to access a specific entity. Checks if permissions are working.
*/
public function testReadEntity(string $user, bool $read): void
{
diff --git a/tests/Controller/RedirectControllerTest.php b/tests/Controller/RedirectControllerTest.php
index bb4543b6..70dd6f14 100644
--- a/tests/Controller/RedirectControllerTest.php
+++ b/tests/Controller/RedirectControllerTest.php
@@ -89,7 +89,7 @@ class RedirectControllerTest extends WebTestCase
['en', '/', '/en/'],
['en', '/category/new', '/en/category/new'],
['en_US', '/part/3', '/en_US/part/3'],
- //Without an explicit set value, the user should be redirect to english version
+ //Without an explicit set value, the user should be redirected to english version
[null, '/', '/en/'],
['en_US', '/part/3', '/en_US/part/3'],
//Test that query parameters work
diff --git a/tests/Entity/Attachments/AttachmentTest.php b/tests/Entity/Attachments/AttachmentTest.php
index 4a90ac3a..3ef8f4da 100644
--- a/tests/Entity/Attachments/AttachmentTest.php
+++ b/tests/Entity/Attachments/AttachmentTest.php
@@ -105,7 +105,7 @@ class AttachmentTest extends TestCase
}
/**
- * Test that all attachment subclasses like PartAttachment or similar returns an exception, when an not allowed
+ * Test that all attachment subclasses like PartAttachment or similar returns an exception, when a not allowed
* element is passed.
*
* @dataProvider subClassesDataProvider
diff --git a/tests/Entity/Base/AbstractStructuralDBElementTest.php b/tests/Entity/Base/AbstractStructuralDBElementTest.php
index 6ff643e2..dca3f25b 100644
--- a/tests/Entity/Base/AbstractStructuralDBElementTest.php
+++ b/tests/Entity/Base/AbstractStructuralDBElementTest.php
@@ -151,7 +151,7 @@ class AbstractStructuralDBElementTest extends TestCase
$this->assertSame([$this->child1_1, $this->child1_2], $this->child1->getSubelements()->toArray());
$this->assertSame([], $this->child1_1->getSubelements()->toArray());
- //If a element is set as its own parent, it should not be returned as a subelement
+ //If an element is set as its own parent, it should not be returned as a subelement
$this->child1->setParent($this->child1);
$this->assertSame([], $this->child1->getSubelements()->toArray());
}
diff --git a/tests/Entity/LogSystem/AbstractLogEntryTest.php b/tests/Entity/LogSystem/AbstractLogEntryTest.php
index 243895aa..cc1dc74b 100644
--- a/tests/Entity/LogSystem/AbstractLogEntryTest.php
+++ b/tests/Entity/LogSystem/AbstractLogEntryTest.php
@@ -166,7 +166,7 @@ class AbstractLogEntryTest extends TestCase
{
$log = new UserLoginLogEntry('1.1.1.1');
- //By default no no CLI username is set
+ //By default, no CLI username is set
$this->assertNull($log->getCLIUsername());
$this->assertFalse($log->isCLIEntry());
diff --git a/tests/Entity/Parts/PartTest.php b/tests/Entity/Parts/PartTest.php
index 11a9ae19..2adc264c 100644
--- a/tests/Entity/Parts/PartTest.php
+++ b/tests/Entity/Parts/PartTest.php
@@ -53,11 +53,11 @@ class PartTest extends TestCase
$part = new Part();
$measurement_unit = new MeasurementUnit();
- //Without an set measurement unit the part must return an int
+ //Without a set measurement unit the part must return an int
$part->setMinAmount(1.345);
$this->assertSame(1.0, $part->getMinAmount());
- //If an non int-based unit is assigned, an float is returned
+ //If a non-int-based unit is assigned, a float is returned
$part->setPartUnit($measurement_unit);
$this->assertSame(1.345, $part->getMinAmount());
diff --git a/tests/Entity/PriceSystem/CurrencyTest.php b/tests/Entity/PriceSystem/CurrencyTest.php
index 0274e5a0..0058d501 100644
--- a/tests/Entity/PriceSystem/CurrencyTest.php
+++ b/tests/Entity/PriceSystem/CurrencyTest.php
@@ -32,7 +32,7 @@ class CurrencyTest extends TestCase
{
$currency = new Currency();
- //By default the inverse exchange rate is not set:
+ //By default, the inverse exchange rate is not set:
$this->assertNull($currency->getInverseExchangeRate());
$currency->setExchangeRate(BigDecimal::zero());
diff --git a/tests/Entity/PriceSystem/PricedetailTest.php b/tests/Entity/PriceSystem/PricedetailTest.php
index 75009029..dd5abb25 100644
--- a/tests/Entity/PriceSystem/PricedetailTest.php
+++ b/tests/Entity/PriceSystem/PricedetailTest.php
@@ -69,7 +69,7 @@ class PricedetailTest extends TestCase
$pricedetail->setPriceRelatedQuantity(0.23);
$this->assertSame(1.0, $pricedetail->getPriceRelatedQuantity());
- //With an part that has an float amount unit, also values like 0.23 can be returned
+ //With a part that has a float amount unit, also values like 0.23 can be returned
$pricedetail->setOrderdetail($orderdetail2);
$this->assertSame(0.23, $pricedetail->getPriceRelatedQuantity());
}
@@ -97,7 +97,7 @@ class PricedetailTest extends TestCase
$pricedetail->setMinDiscountQuantity(0.23);
$this->assertSame(1.0, $pricedetail->getMinDiscountQuantity());
- //With an part that has an float amount unit, also values like 0.23 can be returned
+ //With a part that has a float amount unit, also values like 0.23 can be returned
$pricedetail->setOrderdetail($orderdetail2);
$this->assertSame(0.23, $pricedetail->getMinDiscountQuantity());
}
diff --git a/tests/Entity/UserSystem/UserTest.php b/tests/Entity/UserSystem/UserTest.php
index c0890ecf..822e09b0 100644
--- a/tests/Entity/UserSystem/UserTest.php
+++ b/tests/Entity/UserSystem/UserTest.php
@@ -106,12 +106,12 @@ class UserTest extends TestCase
//Ensure the code is valid
$this->assertTrue($user->isBackupCode('aaaa'));
$this->assertTrue($user->isBackupCode('bbbb'));
- //Invalidate code, afterwards the code has to be invalid!
+ //Invalidate code, afterward the code has to be invalid!
$user->invalidateBackupCode('bbbb');
$this->assertFalse($user->isBackupCode('bbbb'));
$this->assertTrue($user->isBackupCode('aaaa'));
- //No exception must happen, when we try to invalidate an not existing backup key!
+ //No exception must happen, when we try to invalidate a not existing backup key!
$user->invalidateBackupCode('zzzz');
}
diff --git a/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php b/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php
index 7d97261d..5cdca507 100644
--- a/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php
+++ b/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php
@@ -45,15 +45,15 @@ class PasswordChangeNeededSubscriberTest extends TestCase
$user->setGroup($group);
$this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
- //The user must be redirected if the group enforces 2FA and it does not have a method
+ //The user must be redirected if the group enforces 2FA, and it does not have a method
$group->setEnforce2FA(true);
$this->assertTrue(PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
- //User must not be redirect if google authenticator is setup
+ //User must not be redirect if google authenticator is set up
$user->setGoogleAuthenticatorSecret('abcd');
$this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
- //User must not be redirect if 2FA is setup
+ //User must not be redirect if 2FA is set up
$user->setGoogleAuthenticatorSecret(null);
$user->addWebauthnKey(new WebauthnKey(
"Test",
diff --git a/tests/Security/SamlUserFactoryTest.php b/tests/Security/SamlUserFactoryTest.php
index f83eade6..cb6fbfac 100644
--- a/tests/Security/SamlUserFactoryTest.php
+++ b/tests/Security/SamlUserFactoryTest.php
@@ -79,7 +79,7 @@ class SamlUserFactoryTest extends WebTestCase
$this->assertSame(2, $this->service->mapSAMLRolesToLocalGroupID(['does_not_matter', 'admin', 'employee'], $mapping));
$this->assertSame(1, $this->service->mapSAMLRolesToLocalGroupID(['employee', 'does_not_matter', 'manager'], $mapping));
$this->assertSame(3, $this->service->mapSAMLRolesToLocalGroupID(['administrator', 'does_not_matter', 'manager'], $mapping));
- //Test if mapping is case sensitive
+ //Test if mapping is case-sensitive
$this->assertEquals(4, $this->service->mapSAMLRolesToLocalGroupID(['ADMIN'], $mapping));
//Test that wildcard mapping works
diff --git a/tests/Security/UserCheckerTest.php b/tests/Security/UserCheckerTest.php
index 53ae7d71..35c2e1e5 100644
--- a/tests/Security/UserCheckerTest.php
+++ b/tests/Security/UserCheckerTest.php
@@ -42,10 +42,10 @@ class UserCheckerTest extends WebTestCase
$user = new User();
$user->setDisabled(false);
- //An user that is not disabled should not throw an exception
+ //A user that is not disabled should not throw an exception
$this->service->checkPostAuth($user);
- //An disabled user must throw an exception
+ //A disabled user must throw an exception
$user->setDisabled(true);
$this->expectException(CustomUserMessageAccountStatusException::class);
$this->service->checkPostAuth($user);
diff --git a/tests/Serializer/PartNormalizerTest.php b/tests/Serializer/PartNormalizerTest.php
index 5333fb2b..e9abca16 100644
--- a/tests/Serializer/PartNormalizerTest.php
+++ b/tests/Serializer/PartNormalizerTest.php
@@ -35,7 +35,7 @@ class PartNormalizerTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PartNormalizer::class);
}
diff --git a/tests/Serializer/StructuralElementDenormalizerTest.php b/tests/Serializer/StructuralElementDenormalizerTest.php
index f1fcb943..d9000fb9 100644
--- a/tests/Serializer/StructuralElementDenormalizerTest.php
+++ b/tests/Serializer/StructuralElementDenormalizerTest.php
@@ -33,7 +33,7 @@ class StructuralElementDenormalizerTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(StructuralElementDenormalizer::class);
}
diff --git a/tests/Serializer/StructuralElementFromNameDenormalizerTest.php b/tests/Serializer/StructuralElementFromNameDenormalizerTest.php
index abf7583c..f4b4b7d5 100644
--- a/tests/Serializer/StructuralElementFromNameDenormalizerTest.php
+++ b/tests/Serializer/StructuralElementFromNameDenormalizerTest.php
@@ -33,7 +33,7 @@ class StructuralElementFromNameDenormalizerTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(StructuralElementFromNameDenormalizer::class);
}
@@ -108,7 +108,7 @@ class StructuralElementFromNameDenormalizerTest extends WebTestCase
$this->assertNotNull($category->getID());
$this->assertNotNull($category->getParent()->getID());
- //Test with non existing category
+ //Test with non-existing category
$category = $this->service->denormalize('New category', Category::class, null, $context);
$this->assertNull($category);
diff --git a/tests/Services/Attachments/AttachmentPathResolverTest.php b/tests/Services/Attachments/AttachmentPathResolverTest.php
index a3f1595f..6827e90a 100644
--- a/tests/Services/Attachments/AttachmentPathResolverTest.php
+++ b/tests/Services/Attachments/AttachmentPathResolverTest.php
@@ -42,7 +42,7 @@ class AttachmentPathResolverTest extends WebTestCase
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->projectDir_orig = realpath(self::$kernel->getProjectDir());
@@ -117,7 +117,7 @@ class AttachmentPathResolverTest extends WebTestCase
//Every kind of absolute path, that is not based with our placeholder dirs must be invald
['/etc/passwd', null],
['C:\\not\\existing.txt', null],
- //More then one placeholder is not allowed
+ //More than one placeholder is not allowed
[$this->footprint_path.'/test/'.$this->footprint_path, null],
//Path must begin with path
['/not/root'.$this->footprint_path, null],
diff --git a/tests/Services/Attachments/AttachmentURLGeneratorTest.php b/tests/Services/Attachments/AttachmentURLGeneratorTest.php
index 1588a951..9fac356f 100644
--- a/tests/Services/Attachments/AttachmentURLGeneratorTest.php
+++ b/tests/Services/Attachments/AttachmentURLGeneratorTest.php
@@ -33,7 +33,7 @@ class AttachmentURLGeneratorTest extends WebTestCase
public static function setUpBeforeClass(): void
{
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
self::$service = self::getContainer()->get(AttachmentURLGenerator::class);
}
diff --git a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php
index 597b05ca..2ba317ed 100644
--- a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php
+++ b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php
@@ -38,7 +38,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase
public static function setUpBeforeClass(): void
{
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
self::$service = self::getContainer()->get(BuiltinAttachmentsFinder::class);
}
diff --git a/tests/Services/Formatters/AmountFormatterTest.php b/tests/Services/Formatters/AmountFormatterTest.php
index 40df0af7..62ded8fe 100644
--- a/tests/Services/Formatters/AmountFormatterTest.php
+++ b/tests/Services/Formatters/AmountFormatterTest.php
@@ -38,7 +38,7 @@ class AmountFormatterTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(AmountFormatter::class);
}
diff --git a/tests/Services/ImportExportSystem/BOMImporterTest.php b/tests/Services/ImportExportSystem/BOMImporterTest.php
index 96473e96..2a0013e5 100644
--- a/tests/Services/ImportExportSystem/BOMImporterTest.php
+++ b/tests/Services/ImportExportSystem/BOMImporterTest.php
@@ -38,14 +38,14 @@ class BOMImporterTest extends WebTestCase
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(BOMImporter::class);
}
public function testImportFileIntoProject(): void
{
- $inpute = $input = <<service = self::getContainer()->get(EntityImporter::class);
}
@@ -112,7 +112,7 @@ EOT;
$parent = new AttachmentType();
$results = $this->service->massCreation($input, AttachmentType::class, $parent, $errors);
- //We have 7 elements, an now errros
+ //We have 7 elements, and 0 errors
$this->assertCount(0, $errors);
$this->assertCount(7, $results);
diff --git a/tests/Services/LabelSystem/LabelTextReplacerTest.php b/tests/Services/LabelSystem/LabelTextReplacerTest.php
index dd2e7c7b..e965fcc1 100644
--- a/tests/Services/LabelSystem/LabelTextReplacerTest.php
+++ b/tests/Services/LabelSystem/LabelTextReplacerTest.php
@@ -62,7 +62,7 @@ class LabelTextReplacerTest extends WebTestCase
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(LabelTextReplacer::class);
diff --git a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php
index 4716f8ec..1d65d382 100644
--- a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php
+++ b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php
@@ -139,5 +139,7 @@ class SandboxedTwigProviderTest extends WebTestCase
'lot' => new PartLot(),
'location' => new Storelocation(),
]);
+
+ $this->assertIsString($str);
}
}
diff --git a/tests/Services/LogSystem/EventCommentHelperTest.php b/tests/Services/LogSystem/EventCommentHelperTest.php
index 4cab7bb4..62cca6a2 100644
--- a/tests/Services/LogSystem/EventCommentHelperTest.php
+++ b/tests/Services/LogSystem/EventCommentHelperTest.php
@@ -55,7 +55,7 @@ class EventCommentHelperTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EventCommentHelper::class);
}
diff --git a/tests/Services/LogSystem/EventLoggerTest.php b/tests/Services/LogSystem/EventLoggerTest.php
index 77be97db..0c94d8c7 100644
--- a/tests/Services/LogSystem/EventLoggerTest.php
+++ b/tests/Services/LogSystem/EventLoggerTest.php
@@ -58,7 +58,7 @@ class EventLoggerTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EventLogger::class);
}
diff --git a/tests/Services/Misc/FAIconGeneratorTest.php b/tests/Services/Misc/FAIconGeneratorTest.php
index b2da6a58..34806bf9 100644
--- a/tests/Services/Misc/FAIconGeneratorTest.php
+++ b/tests/Services/Misc/FAIconGeneratorTest.php
@@ -36,7 +36,7 @@ class FAIconGeneratorTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(FAIconGenerator::class);
}
diff --git a/tests/Services/Parameters/ParameterExtractorTest.php b/tests/Services/Parameters/ParameterExtractorTest.php
index ceb28456..98393674 100644
--- a/tests/Services/Parameters/ParameterExtractorTest.php
+++ b/tests/Services/Parameters/ParameterExtractorTest.php
@@ -52,7 +52,7 @@ class ParameterExtractorTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(ParameterExtractor::class);
}
diff --git a/tests/Services/Parts/PartLotWithdrawAddHelperTest.php b/tests/Services/Parts/PartLotWithdrawAddHelperTest.php
index f95b49b5..269a06f9 100644
--- a/tests/Services/Parts/PartLotWithdrawAddHelperTest.php
+++ b/tests/Services/Parts/PartLotWithdrawAddHelperTest.php
@@ -47,7 +47,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PartLotWithdrawAddHelper::class);
diff --git a/tests/Services/Parts/PricedetailHelperTest.php b/tests/Services/Parts/PricedetailHelperTest.php
index aff0fdba..89931acf 100644
--- a/tests/Services/Parts/PricedetailHelperTest.php
+++ b/tests/Services/Parts/PricedetailHelperTest.php
@@ -39,7 +39,7 @@ class PricedetailHelperTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PricedetailHelper::class);
}
diff --git a/tests/Services/Trees/TreeViewGeneratorTest.php b/tests/Services/Trees/TreeViewGeneratorTest.php
index c43fe680..92ba196d 100644
--- a/tests/Services/Trees/TreeViewGeneratorTest.php
+++ b/tests/Services/Trees/TreeViewGeneratorTest.php
@@ -44,7 +44,7 @@ class TreeViewGeneratorTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(TreeViewGenerator::class);
$this->em = self::getContainer()->get(EntityManagerInterface::class);
@@ -99,7 +99,7 @@ class TreeViewGeneratorTest extends WebTestCase
//First element should link to new category
$this->assertStringContainsStringIgnoringCase('New', $tree[0]->getText());
$this->assertSame('/en/category/new', $tree[0]->getHref());
- //By default the new element node is selected
+ //By default, the new element node is selected
$this->assertTrue($tree[0]->getState()->getSelected());
//Next element is spacing
diff --git a/tests/Services/UserSystem/PermissionManagerTest.php b/tests/Services/UserSystem/PermissionManagerTest.php
index b6ed5668..8e90715e 100644
--- a/tests/Services/UserSystem/PermissionManagerTest.php
+++ b/tests/Services/UserSystem/PermissionManagerTest.php
@@ -45,7 +45,7 @@ class PermissionManagerTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(PermissionManager::class);
@@ -155,7 +155,7 @@ class PermissionManagerTest extends WebTestCase
public function testInherit(): void
{
- //Not inherited values should be same as dont inherit:
+ //Not inherited values should be same as don't inherit:
$this->assertTrue($this->service->inherit($this->user, 'parts', 'read'));
$this->assertFalse($this->service->inherit($this->user, 'parts', 'edit'));
//When thing can not be resolved null should be returned
diff --git a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php
index 530a4b67..8fe99b50 100644
--- a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php
+++ b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php
@@ -90,7 +90,7 @@ class PermissionSchemaUpdaterTest extends WebTestCase
$perm_data->setPermissionValue('parts', 'edit', PermissionData::ALLOW);
$user = new TestPermissionHolder($perm_data);
- //Do an upgrade and afterwards the move, add, and withdraw permissions should be set to ALLOW
+ //Do an upgrade and afterward the move, add, and withdraw permissions should be set to ALLOW
self::assertTrue($this->service->upgradeSchema($user, 1));
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move'));
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add'));
diff --git a/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php b/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php
index 6e2b744a..35b7f4f8 100644
--- a/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php
+++ b/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php
@@ -68,7 +68,7 @@ class BackupCodeManagerTest extends WebTestCase
{
$user = new User();
- //By default nothing other 2FA is activated, so the backup codes should be disabled
+ //By default, nothing other 2FA is activated, so the backup codes should be disabled
$codes = ['aaaa', 'bbbb'];
$user->setBackupCodes($codes);
$this->service->disableBackupCodesIfUnused($user);
diff --git a/tests/Twig/EntityExtensionTest.php b/tests/Twig/EntityExtensionTest.php
index 7ea9c029..122165bc 100644
--- a/tests/Twig/EntityExtensionTest.php
+++ b/tests/Twig/EntityExtensionTest.php
@@ -45,7 +45,7 @@ class EntityExtensionTest extends WebTestCase
{
parent::setUp(); // TODO: Change the autogenerated stub
- //Get an service instance.
+ //Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(EntityExtension::class);
}