@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function supports($class) |
| 41 | 41 | { |
| 42 | - return $class == ParentItem::class; |
|
| 42 | + return $class == ParentItem::class; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use eXpansion\Bundle\Menu\Services\ItemBuilder; |
| 8 | 8 | use eXpansion\Bundle\Menu\Services\ItemFactoryInterface; |
| 9 | 9 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 10 | -use FML\Controls\Quad; |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * Class ItemParentFactory |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * @return ParentItem|null |
|
| 50 | + * @return ItemInterface|null |
|
| 51 | 51 | */ |
| 52 | 52 | public function getRootItem() |
| 53 | 53 | { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string $path |
| 31 | 31 | * @param string $labelId |
| 32 | 32 | * @param AdminGroups $adminGroups |
| 33 | - * @param null $permission |
|
| 33 | + * @param string $permission |
|
| 34 | 34 | */ |
| 35 | 35 | public function __construct( |
| 36 | 36 | ItemBuilder $itemBuilder, |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * @param string $login |
| 139 | 139 | * |
| 140 | - * @return bool|mixed |
|
| 140 | + * @return boolean |
|
| 141 | 141 | */ |
| 142 | 142 | public function isVisibleFor($login) |
| 143 | 143 | { |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 6 | 6 | use eXpansion\Framework\Core\Model\Gui\ManialinkInterface; |
| 7 | 7 | use eXpansion\Framework\Core\Plugins\Gui\ManialinkFactory; |
| 8 | -use FML\Controls\Quad; |
|
| 9 | 8 | |
| 10 | 9 | /** |
| 11 | 10 | * Class ParentItem |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return ItemInterface |
| 72 | 72 | */ |
| 73 | - public function addChild($class, $id, $label, $permission, $options =[]) |
|
| 73 | + public function addChild($class, $id, $label, $permission, $options = []) |
|
| 74 | 74 | { |
| 75 | 75 | if (is_string($id)) { |
| 76 | 76 | $id = explode('/', $id); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $item = $this->itemBuilder->create( |
| 81 | 81 | $class, |
| 82 | 82 | $id[0], |
| 83 | - $this->getPath() . '/' . $id[0], |
|
| 83 | + $this->getPath().'/'.$id[0], |
|
| 84 | 84 | $label, |
| 85 | 85 | $permission, |
| 86 | 86 | $options |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | * @param Manialink $manialink |
| 201 | 201 | * @param Frame $frame |
| 202 | 202 | * @param ParentItem $parentItem |
| 203 | - * @param $displayLevel |
|
| 203 | + * @param integer $displayLevel |
|
| 204 | 204 | */ |
| 205 | 205 | protected function createSubMenu(Manialink $manialink, Frame $frame, ParentItem $parentItem, $displayLevel) |
| 206 | 206 | { |
@@ -204,8 +204,8 @@ |
||
| 204 | 204 | */ |
| 205 | 205 | protected function createSubMenu(Manialink $manialink, Frame $frame, ParentItem $parentItem, $displayLevel) |
| 206 | 206 | { |
| 207 | - $posX = $displayLevel * (-160.0/3); |
|
| 208 | - $posY = ($displayLevel * (-100.0/3)) * 0.5; |
|
| 207 | + $posX = $displayLevel * (-160.0 / 3); |
|
| 208 | + $posY = ($displayLevel * (-100.0 / 3)) * 0.5; |
|
| 209 | 209 | $scale = (0.5 / ($displayLevel + 1)) + 0.5; |
| 210 | 210 | |
| 211 | 211 | $contentFrame = new Frame(); |
@@ -2,15 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Bundle\Menu\Plugins\Gui; |
| 4 | 4 | |
| 5 | -use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
|
| 6 | 5 | use eXpansion\Framework\Core\Model\Gui\ManialinkInterface; |
| 7 | -use eXpansion\Framework\Core\Model\Gui\ManiaScriptFactory; |
|
| 8 | -use eXpansion\Framework\Core\Model\Gui\Widget; |
|
| 9 | 6 | use eXpansion\Framework\Core\Model\Gui\WidgetFactoryContext; |
| 10 | 7 | use eXpansion\Framework\Core\Plugins\Gui\WidgetFactory; |
| 11 | -use FML\Controls\Frame; |
|
| 12 | -use FML\Controls\Label; |
|
| 13 | -use FML\Controls\Quad; |
|
| 14 | 8 | |
| 15 | 9 | |
| 16 | 10 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $posY, |
| 44 | 44 | WidgetFactoryContext $context, |
| 45 | 45 | MenuContentFactory $menuContentFactory |
| 46 | - ){ |
|
| 46 | + ) { |
|
| 47 | 47 | parent::__construct($name, $sizeX, $sizeY, $posX, $posY, $context); |
| 48 | 48 | |
| 49 | 49 | $this->menuContentFactory = $menuContentFactory; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use eXpansion\Bundle\Menu\Services\ItemFactoryInterface; |
| 8 | 8 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 9 | 9 | use eXpansion\Framework\Core\DataProviders\ChatCommandDataProvider; |
| 10 | -use FML\Controls\Quad; |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * Class ItemChatCommandFactory |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * |
| 36 | 36 | * @return ItemInterface |
| 37 | 37 | */ |
| 38 | - public function create($class, $id, $path, $label, $permission, $options =[]) |
|
| 38 | + public function create($class, $id, $path, $label, $permission, $options = []) |
|
| 39 | 39 | { |
| 40 | 40 | foreach ($this->itemFactories as $itemFactory) { |
| 41 | 41 | if ($itemFactory->supports($class)) { |
@@ -37,5 +37,5 @@ |
||
| 37 | 37 | * |
| 38 | 38 | * @return ItemInterface |
| 39 | 39 | */ |
| 40 | - public function build($class, $id, $path, $label, $permission, $options =[]); |
|
| 40 | + public function build($class, $id, $path, $label, $permission, $options = []); |
|
| 41 | 41 | } |
| 42 | 42 | \ No newline at end of file |