@@ -90,7 +90,7 @@ |
||
90 | 90 | $method = $spec[1]; |
91 | 91 | $priority = isset($spec[2]) ? $spec[2] : 0; |
92 | 92 | |
93 | - $this->listeners[] = $events->attach($event, [ $this, $method ], $priority); |
|
93 | + $this->listeners[] = $events->attach($event, [$this, $method], $priority); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | return $this->pagination([ |
46 | 46 | 'paginator' => ['Auth/User', 'as' => 'users'], |
47 | 47 | 'form' => [ |
48 | - [ 'Core/TextSearch', [ |
|
48 | + ['Core/TextSearch', [ |
|
49 | 49 | 'elements_options' => [ |
50 | 50 | 'text_placeholder' => /*@translate*/ 'Type name, email address, role, or login name', |
51 | 51 | 'button_element' => 'text', |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | return $this->pagination([ |
28 | 28 | 'form' => ['Core/TextSearch', 'as' => 'form'], |
29 | - 'paginator' => ['Orders', [ 'sort' => 'date'], 'as' => 'orders'] |
|
29 | + 'paginator' => ['Orders', ['sort' => 'date'], 'as' => 'orders'] |
|
30 | 30 | ]); |
31 | 31 | } |
32 | 32 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $order = $repository->find($id); |
45 | 45 | |
46 | 46 | if (!$order) { |
47 | - throw new \InvalidArgumentException('No order with id "' . $id . '" found.'); |
|
47 | + throw new \InvalidArgumentException('No order with id "'.$id.'" found.'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return [ |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | 'label' => $label, |
67 | 67 | ], |
68 | 68 | 'attributes' => [ |
69 | - 'class' => 'btn btn-' . ('submit' == $type ? 'primary' : 'default'), |
|
69 | + 'class' => 'btn btn-'.('submit' == $type ? 'primary' : 'default'), |
|
70 | 70 | 'type' => $type, |
71 | 71 | ], |
72 | 72 | ]; |
@@ -98,6 +98,6 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function getSpan() |
100 | 100 | { |
101 | - return $this->getOption('span') ? : 12; |
|
101 | + return $this->getOption('span') ?: 12; |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | \ No newline at end of file |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $elements = $this->elementsFieldset; |
67 | 67 | |
68 | 68 | if (!is_object($elements)) { |
69 | - $elements = ['type' => $elements, 'options' => $this->getOption('elements_options') ? : []]; |
|
69 | + $elements = ['type' => $elements, 'options' => $this->getOption('elements_options') ?: []]; |
|
70 | 70 | |
71 | 71 | } |
72 | 72 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @param array $colMap |
34 | 34 | * @return Form|string |
35 | 35 | */ |
36 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
36 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
37 | 37 | { |
38 | 38 | if (!$form) { |
39 | 39 | return $this; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return $this->render($form, $colMap); |
43 | 43 | } |
44 | 44 | |
45 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
45 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
46 | 46 | { |
47 | 47 | $headscript = $this->getView()->plugin('headscript'); |
48 | 48 | $basepath = $this->getView()->plugin('basepath'); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | if ($form instanceOf ViewPartialProviderInterface) { |
58 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
58 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $elements = $form->getElements(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | return $this->openTag($form) |
67 | 67 | . '<div class="row" style="padding: 0 15px;">' |
68 | - . $content . '</div>' . $this->closeTag(); |
|
68 | + . $content.'</div>'.$this->closeTag(); |
|
69 | 69 | |
70 | 70 | } |
71 | 71 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function renderElements($fieldset, $buttonsFieldset, $colMap = null, $buttonsSpan = null) |
78 | 78 | { |
79 | 79 | if ($fieldset instanceOf ViewPartialProviderInterface) { |
80 | - return $this->getView()->partial($fieldset->getViewPartial(), [ 'element' => $fieldset, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
80 | + return $this->getView()->partial($fieldset->getViewPartial(), ['element' => $fieldset, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | if (true !== $buttonsFieldset && null === $colMap) { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | $formElement = $this->getView()->plugin('formElement'); |
88 | - $content = ''; $buttonsRendered = false; $i=0; |
|
88 | + $content = ''; $buttonsRendered = false; $i = 0; |
|
89 | 89 | foreach ($fieldset as $element) { |
90 | 90 | if (true === $buttonsFieldset) { |
91 | 91 | $content .= $formElement($element); |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | if ($fieldset instanceOf TextSearchFormFieldset && $element->getName() == $fieldset->getButtonElement()) { |
106 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
106 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
107 | 107 | . $formElement($element) |
108 | 108 | . '<div class="input-group-btn search-form-buttons" style="width: 0px;">' |
109 | - . $this->renderElements($buttonsFieldset, true) . '</div>' |
|
109 | + . $this->renderElements($buttonsFieldset, true).'</div>' |
|
110 | 110 | . '</div>'; |
111 | 111 | $buttonsRendered = true; |
112 | 112 | } else { |
113 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
113 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
114 | 114 | . $formElement($element) |
115 | 115 | . '</div>'; |
116 | 116 | } |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | if (null === $buttonsSpan) { |
123 | 123 | $buttonsSpan = $buttonsFieldset->getSpan(); |
124 | 124 | } |
125 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
126 | - . '<div class="btn-group">' . $this->renderElements($buttonsFieldset, true) .'</div></div>'; |
|
125 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
126 | + . '<div class="btn-group">'.$this->renderElements($buttonsFieldset, true).'</div></div>'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | return $content; |
@@ -127,10 +127,10 @@ |
||
127 | 127 | { |
128 | 128 | $this->addTextElement( |
129 | 129 | $this->getOption('text_label') |
130 | - ? : /*@translate*/ 'Search', |
|
130 | + ?: /*@translate*/ 'Search', |
|
131 | 131 | $this->getOption('text_placeholder') |
132 | - ? : /*@translate*/ 'Search query', |
|
133 | - $this->getOption('text_span') ? : 12 |
|
132 | + ?: /*@translate*/ 'Search query', |
|
133 | + $this->getOption('text_span') ?: 12 |
|
134 | 134 | ); |
135 | 135 | } |
136 | 136 |
@@ -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 | $this->stack = $stack; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * |
137 | 137 | * @return self |
138 | 138 | */ |
139 | - public function params($namespace, $defaults = [ 'page' => 1 ]) |
|
139 | + public function params($namespace, $defaults = ['page' => 1]) |
|
140 | 140 | { |
141 | 141 | $this->stack['params'] = [$namespace, $defaults]; |
142 | 142 | return $this; |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | public function indexAction() |
27 | 27 | { |
28 | 28 | return $this->pagination([ |
29 | - 'params' => [ 'Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status' ] ], |
|
30 | - 'form' => [ 'as' => 'form', 'Jobs/AdminSearch' ], |
|
31 | - 'paginator' => [ 'as' => 'jobs', 'Jobs/Admin' ], |
|
29 | + 'params' => ['Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status']], |
|
30 | + 'form' => ['as' => 'form', 'Jobs/AdminSearch'], |
|
31 | + 'paginator' => ['as' => 'jobs', 'Jobs/Admin'], |
|
32 | 32 | ]); |
33 | 33 | } |
34 | 34 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $oldStatus = $job->getStatus(); |
55 | 55 | $job->changeStatus($post['status'], '[System] Status changed via Admin GUI.'); |
56 | 56 | $events = $services->get('Jobs/Events'); |
57 | - $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, [ 'job' => $job, 'status' => $oldStatus ]); |
|
57 | + $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, ['job' => $job, 'status' => $oldStatus]); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $form->bind($job); |
68 | 68 | |
69 | - return [ 'form' => $form, 'job' => $job ]; |
|
69 | + return ['form' => $form, 'job' => $job]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | } |
73 | 73 | \ No newline at end of file |