@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function infoURL($entity) : string |
| 62 | 62 | { |
| 63 | - if($entity instanceof Part) |
|
| 63 | + if ($entity instanceof Part) |
|
| 64 | 64 | { |
| 65 | 65 | return $this->urlGenerator->generate('part_info', ['id' => $entity->getID()]); |
| 66 | 66 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | $href = $this->infoURL($entity); |
| 82 | 82 | |
| 83 | - if($entity instanceof NamedDBElement) |
|
| 83 | + if ($entity instanceof NamedDBElement) |
|
| 84 | 84 | { |
| 85 | 85 | return sprintf('<a href="%s">%s</a>', $href, $entity->getName()); |
| 86 | 86 | } |
@@ -246,6 +246,6 @@ |
||
| 246 | 246 | */ |
| 247 | 247 | public function getIDString(): string |
| 248 | 248 | { |
| 249 | - return 'PD' . sprintf('%06d', $this->getID()); |
|
| 249 | + return 'PD'.sprintf('%06d', $this->getID()); |
|
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | \ No newline at end of file |
@@ -248,7 +248,6 @@ |
||
| 248 | 248 | * Set the supplier ID |
| 249 | 249 | * |
| 250 | 250 | * @param integer $new_supplier_id the ID of the new supplier |
| 251 | - |
|
| 252 | 251 | */ |
| 253 | 252 | public function setSupplierId(int $new_supplier_id) : self |
| 254 | 253 | { |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | */ |
| 90 | 90 | public function getIDString(): string |
| 91 | 91 | { |
| 92 | - return 'O' . sprintf('%06d', $this->getID()); |
|
| 92 | + return 'O'.sprintf('%06d', $this->getID()); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /******************************************************************************** |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | */ |
| 100 | 100 | public function getIDString(): string |
| 101 | 101 | { |
| 102 | - return 'L' . sprintf('%06d', $this->getID()); |
|
| 102 | + return 'L'.sprintf('%06d', $this->getID()); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | } |
| 106 | 106 | \ No newline at end of file |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $attachements = $this->attachments; |
| 78 | 78 | |
| 79 | 79 | foreach ($attachements as $key => $attachement) { |
| 80 | - if (($only_table_attachements && (! $attachement->getShowInTable())) |
|
| 80 | + if (($only_table_attachements && (!$attachement->getShowInTable())) |
|
| 81 | 81 | || ($type_id && ($attachement->getType()->getID() != $type_id))) { |
| 82 | 82 | unset($attachements[$key]); |
| 83 | 83 | } |
@@ -74,11 +74,11 @@ discard block |
||
| 74 | 74 | /** |
| 75 | 75 | * @var int |
| 76 | 76 | */ |
| 77 | - protected $level=0; |
|
| 77 | + protected $level = 0; |
|
| 78 | 78 | |
| 79 | 79 | /** @var string[] all names of all parent elements as a array of strings, |
| 80 | 80 | * the last array element is the name of the element itself */ |
| 81 | - private $full_path_strings = null; |
|
| 81 | + private $full_path_strings = null; |
|
| 82 | 82 | |
| 83 | 83 | /****************************************************************************** |
| 84 | 84 | * StructuralDBElement constructor. |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | */ |
| 185 | 185 | public function getFullPath(string $delimeter = self::PATH_DELIMITER_ARROW) : string |
| 186 | 186 | { |
| 187 | - if (! \is_array($this->full_path_strings)) { |
|
| 187 | + if (!\is_array($this->full_path_strings)) { |
|
| 188 | 188 | $this->full_path_strings = array(); |
| 189 | 189 | $this->full_path_strings[] = $this->getName(); |
| 190 | 190 | $element = $this; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $this->children = new \Doctrine\Common\Collections\ArrayCollection(); |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - if (! $recursive) { |
|
| 216 | + if (!$recursive) { |
|
| 217 | 217 | return $this->children; |
| 218 | 218 | } else { |
| 219 | 219 | $all_elements = array(); |
@@ -298,9 +298,9 @@ discard block |
||
| 298 | 298 | $root_name = htmlspecialchars($this->getName()); |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | - $html[] = '<option value="'. $value_prefix . $this->getID() . '">' . $root_name . '</option>'; |
|
| 301 | + $html[] = '<option value="'.$value_prefix.$this->getID().'">'.$root_name.'</option>'; |
|
| 302 | 302 | } else { |
| 303 | - $root_level = $this->getLevel() + 1; |
|
| 303 | + $root_level = $this->getLevel() + 1; |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | // get all subelements |
@@ -310,11 +310,11 @@ discard block |
||
| 310 | 310 | $level = $element->getLevel() - $root_level; |
| 311 | 311 | $selected = ($element->getID() == $selected_id) ? 'selected' : ''; |
| 312 | 312 | |
| 313 | - $html[] = '<option ' . $selected . ' value="' . $value_prefix . $element->getID() . '">'; |
|
| 313 | + $html[] = '<option '.$selected.' value="'.$value_prefix.$element->getID().'">'; |
|
| 314 | 314 | for ($i = 0; $i < $level; $i++) { |
| 315 | 315 | $html[] = ' '; |
| 316 | 316 | } |
| 317 | - $html[] = htmlspecialchars($element->getName()) . '</option>'; |
|
| 317 | + $html[] = htmlspecialchars($element->getName()).'</option>'; |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | return implode("\n", $html); |
@@ -345,8 +345,8 @@ discard block |
||
| 345 | 345 | if ($this->getParentID() == -1) { |
| 346 | 346 | if ($show_root) { |
| 347 | 347 | $tree = array( |
| 348 | - array('text' => $use_db_root_name ? htmlspecialchars($this->getName()) : $root_name , |
|
| 349 | - 'href' => $page . '?' . $parameter . '=' . $this->getID(), |
|
| 348 | + array('text' => $use_db_root_name ? htmlspecialchars($this->getName()) : $root_name, |
|
| 349 | + 'href' => $page.'?'.$parameter.'='.$this->getID(), |
|
| 350 | 350 | 'nodes' => $nodes) |
| 351 | 351 | ); |
| 352 | 352 | } else { //Dont show root node |
@@ -354,12 +354,12 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | } elseif (!empty($nodes)) { |
| 356 | 356 | $tree = array('text' => htmlspecialchars($this->getName()), |
| 357 | - 'href' => $page . '?' . $parameter . '=' . $this->getID(), |
|
| 357 | + 'href' => $page.'?'.$parameter.'='.$this->getID(), |
|
| 358 | 358 | 'nodes' => $nodes |
| 359 | 359 | ); |
| 360 | 360 | } else { |
| 361 | 361 | $tree = array('text' => htmlspecialchars($this->getName()), |
| 362 | - 'href' => $page . '?' . $parameter . '=' . $this->getID() |
|
| 362 | + 'href' => $page.'?'.$parameter.'='.$this->getID() |
|
| 363 | 363 | ); |
| 364 | 364 | } |
| 365 | 365 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $tmp = array(); |
| 397 | 397 | |
| 398 | 398 | if ($element_is_link) { |
| 399 | - $tmp[] = array('label' => $this->getName(), 'href' => $page . '?' . $parameter . '=' .$this->getID(), 'selected' => true); |
|
| 399 | + $tmp[] = array('label' => $this->getName(), 'href' => $page.'?'.$parameter.'='.$this->getID(), 'selected' => true); |
|
| 400 | 400 | } else { |
| 401 | 401 | $tmp[] = array('label' => $this->getName(), 'selected' => true); |
| 402 | 402 | } |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | /** @var StructuralDBElement $element */ |
| 407 | 407 | $element = static::getInstance($this->database, $this->current_user, $this->log, $parent_id); |
| 408 | 408 | $parent_id = $element->getParentID(); |
| 409 | - $tmp[] = array('label' => $element->getName(), 'href' => $page . '?' . $parameter . '=' . $element->getID()); |
|
| 409 | + $tmp[] = array('label' => $element->getName(), 'href' => $page.'?'.$parameter.'='.$element->getID()); |
|
| 410 | 410 | } |
| 411 | 411 | $tmp = array_reverse($tmp); |
| 412 | 412 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -namespace App\Entity;; |
|
| 24 | +namespace App\Entity; ; |
|
| 25 | 25 | |
| 26 | 26 | use Doctrine\ORM\Mapping as ORM; |
| 27 | 27 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | public function getIDString(): string |
| 147 | 147 | { |
| 148 | - return 'A' . sprintf('%09d', $this->getID()); |
|
| 148 | + return 'A'.sprintf('%09d', $this->getID()); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /***************************************************************************************************** |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function getIDString(): string |
| 82 | 82 | { |
| 83 | - return 'F' . sprintf('%06d', $this->getID()); |
|
| 83 | + return 'F'.sprintf('%06d', $this->getID()); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /**************************************** |
@@ -191,7 +191,6 @@ |
||
| 191 | 191 | * @param string $new_email_address the new e-mail address |
| 192 | 192 | * |
| 193 | 193 | * @return self |
| 194 | - |
|
| 195 | 194 | */ |
| 196 | 195 | public function setEmailAddress(string $new_email_address) : self |
| 197 | 196 | { |