@@ -47,6 +47,9 @@ discard block |
||
| 47 | 47 | $this->buttonsIterator->isLIFO(false); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $name |
|
| 52 | + */ |
|
| 50 | 53 | public function setButtonElement($name) |
| 51 | 54 | { |
| 52 | 55 | return $this->setOption('button_element', $name); |
@@ -182,6 +185,9 @@ discard block |
||
| 182 | 185 | return $this->buttonsIterator; |
| 183 | 186 | } |
| 184 | 187 | |
| 188 | + /** |
|
| 189 | + * @param string $name |
|
| 190 | + */ |
|
| 185 | 191 | public function addButton($name, $priority = 0, $type = 'button') |
| 186 | 192 | { |
| 187 | 193 | if (is_array($name)) { |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * |
| 143 | 143 | * @return array |
| 144 | 144 | */ |
| 145 | - protected function createValueOptions(NodeInterface $node, $allowSelectNodes = false, $isRoot=true) |
|
| 145 | + protected function createValueOptions(NodeInterface $node, $allowSelectNodes = false, $isRoot = true) |
|
| 146 | 146 | { |
| 147 | 147 | $key = $isRoot ? $node->getValue() : $node->getValueWithParents(); |
| 148 | 148 | $name = $node->getName(); |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | |
| 145 | 145 | public function getValueWithParents($withRoot = false) |
| 146 | 146 | { |
| 147 | - $parts = [ $this->getValue() ]; |
|
| 147 | + $parts = [$this->getValue()]; |
|
| 148 | 148 | $item = $this; |
| 149 | 149 | |
| 150 | 150 | while ($item = $item->getParent()) { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | if (!is_array($stack)) { |
| 73 | - throw new \InvalidArgumentException('Expected argument to be of type array, but received ' . gettype($stack)); |
|
| 73 | + throw new \InvalidArgumentException('Expected argument to be of type array, but received '.gettype($stack)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $stack = array_intersect_key($stack, ['params' => true, 'form' => true, 'paginator' => true]); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @return self |
| 145 | 145 | */ |
| 146 | - public function params($namespace, $defaults = [ 'page' => 1 ]) |
|
| 146 | + public function params($namespace, $defaults = ['page' => 1]) |
|
| 147 | 147 | { |
| 148 | 148 | $this->stack['params'] = [$namespace, $defaults]; |
| 149 | 149 | return $this; |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | public function extract($value) |
| 124 | 124 | { |
| 125 | 125 | if (!$value instanceOf AbstractLeafs) { |
| 126 | - throw new \InvalidArgumentException('$value must be an instance of ' . AbstractLeafs::class); |
|
| 126 | + throw new \InvalidArgumentException('$value must be an instance of '.AbstractLeafs::class); |
|
| 127 | 127 | } |
| 128 | 128 | /* @var AbstractLeafs $value |
| 129 | 129 | * @var NodeInterface $item */ |