Fixed some inspection issues

This commit is contained in:
Jan Böhmer 2023-02-05 03:01:25 +01:00
parent a5cbe59a7c
commit ba5ae35809
20 changed files with 35 additions and 36 deletions

View file

@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* A attachment attached to a currency element.
* An attachment attached to a currency element.
*
* @ORM\Entity()
* @UniqueEntity({"name", "attachment_type", "element"})

View file

@ -149,7 +149,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
}
//If the parent element is equal to the element we want to compare, return true
if ($this->getParent()->getID() === null || $this->getParent()->getID() === null) {
if ($this->getParent()->getID() === null) {
//If the IDs are not yet defined, we have to compare the objects itself
if ($this->getParent() === $another_element) {
return true;

View file

@ -199,7 +199,7 @@ class LabelOptions
}
/**
* Gets additional CSS (it will simply be attached.
* Gets additional CSS (it will simply be attended to base CSS).
*/
public function getAdditionalCss(): string
{

View file

@ -35,7 +35,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* This entity describes a currency that can be used for price informations.
* This entity describes a currency that can be used for price information.
*
* @UniqueEntity("iso_code")
* @ORM\Entity()
@ -57,7 +57,7 @@ class Currency extends AbstractStructuralDBElement
protected ?BigDecimal $exchange_rate = null;
/**
* @var string the 3 letter ISO code of the currency
* @var string the 3-letter ISO code of the currency
* @ORM\Column(type="string")
* @Assert\Currency()
*/
@ -107,7 +107,7 @@ class Currency extends AbstractStructuralDBElement
}
/**
* Returns the 3 letter ISO code of this currency.
* Returns the 3-letter ISO code of this currency.
*
* @return string
*/

View file

@ -180,10 +180,10 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
}
/**
* Get the link to the website of the article on the suppliers website.
* Get the link to the website of the article on the supplier's website.
*
* @param bool $no_automatic_url Set this to true, if you only want to get the local set product URL for this Orderdetail
* and not a automatic generated one, based from the Supplier
* and not an automatic generated one, based from the Supplier
*
* @return string the link to the article
*/
@ -212,7 +212,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
}
/**
* Adds an pricedetail to this orderdetail.
* Adds a price detail to this orderdetail.
*
* @param Pricedetail $pricedetail The pricedetail to add
*
@ -227,7 +227,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
}
/**
* Removes an pricedetail from this orderdetail.
* Removes a price detail from this orderdetail.
*
* @return Orderdetail
*/
@ -244,7 +244,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
*
* @param float $quantity this is the quantity to choose the correct pricedetails
*
* @return Pricedetail|null: the price as a bcmath string. Null if there are no orderdetails for the given quantity
* @return Pricedetail|null the price as a bcmath string. Null if there are no orderdetails for the given quantity
*/
public function findPriceForQty(float $quantity = 1.0): ?Pricedetail
{

View file

@ -244,7 +244,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
}
/**
* Sets the currency associated with the price informations.
* Sets the currency associated with the price information.
* Set to null, to use the global base currency.
*
* @return Pricedetail

View file

@ -252,7 +252,7 @@ class Project extends AbstractStructuralDBElement
}
/**
* Checks if this project has a associated part representing the builds of this project in the stock.
* Checks if this project has an associated part representing the builds of this project in the stock.
* @return bool
*/
public function hasBuildPart(): bool

View file

@ -35,7 +35,7 @@ use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* The ProjectBOMEntry class represents a entry in a project's BOM.
* The ProjectBOMEntry class represents an entry in a project's BOM.
*
* @ORM\Table("project_bom_entries")
* @ORM\HasLifecycleCallbacks()
@ -303,7 +303,7 @@ class ProjectBOMEntry extends AbstractDBElement
->addViolation();
}
//Prices are only only allowed on non-part BOM entries
//Prices are only allowed on non-part BOM entries
if ($this->part !== null && $this->price !== null) {
$context->buildViolation('project.bom_entry.price_not_allowed_on_parts')
->atPath('price')