@@ -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 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function editURL($entity) : string |
73 | 73 | { |
74 | - if($entity instanceof Part) |
|
74 | + if ($entity instanceof Part) |
|
75 | 75 | { |
76 | 76 | return $this->urlGenerator->generate('part_edit', ['id' => $entity->getID()]); |
77 | 77 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | public function createURL($entity) : string |
84 | 84 | { |
85 | - if($entity instanceof Part) |
|
85 | + if ($entity instanceof Part) |
|
86 | 86 | { |
87 | 87 | return $this->urlGenerator->generate('part_new'); |
88 | 88 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $href = $this->infoURL($entity); |
103 | 103 | |
104 | - if($entity instanceof NamedDBElement) |
|
104 | + if ($entity instanceof NamedDBElement) |
|
105 | 105 | { |
106 | 106 | return sprintf('<a href="%s">%s</a>', $href, $entity->getName()); |
107 | 107 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function generateEntityURL(DBElement $entity, string $method = 'info') : string |
63 | 63 | { |
64 | - switch($method) { |
|
64 | + switch ($method) { |
|
65 | 65 | case 'info': |
66 | 66 | return $this->entityURLGenerator->infoURL($entity); |
67 | 67 | case 'edit': |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | |
76 | 76 | public function parseBBCode(string $bbcode) : string |
77 | 77 | { |
78 | - if($bbcode === '') return ''; |
|
78 | + if ($bbcode === '') return ''; |
|
79 | 79 | |
80 | - $item = $this->cache->getItem('bbcode_' . md5($bbcode)); |
|
81 | - if(!$item->isHit()) { |
|
80 | + $item = $this->cache->getItem('bbcode_'.md5($bbcode)); |
|
81 | + if (!$item->isHit()) { |
|
82 | 82 | $xml = TextFormatter::parse($bbcode); |
83 | 83 | $item->set(TextFormatter::render($xml)); |
84 | 84 | $this->cache->save($item); |
@@ -75,7 +75,9 @@ |
||
75 | 75 | |
76 | 76 | public function parseBBCode(string $bbcode) : string |
77 | 77 | { |
78 | - if($bbcode === '') return ''; |
|
78 | + if($bbcode === '') { |
|
79 | + return ''; |
|
80 | + } |
|
79 | 81 | |
80 | 82 | $item = $this->cache->getItem('bbcode_' . md5($bbcode)); |
81 | 83 | if(!$item->isHit()) { |