@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function setEventPrototype(EventInterface $prototype) |
36 | 36 | { |
37 | 37 | if (!$prototype instanceof DependencyResultEvent) { |
38 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
38 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | parent::setEventPrototype($prototype); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | protected function triggerListeners(EventInterface $event, callable $callback = null) |
56 | 56 | { |
57 | 57 | if (!$event instanceof DependencyResultEvent) { |
58 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
58 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $results = parent::triggerListeners($event, $callback); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | use ZfListenerAggregateTrait; |
52 | 52 | |
53 | - public function attach(EventManagerInterface $events, $priority=1) |
|
53 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
54 | 54 | { |
55 | 55 | return $this->attachEvents($events); |
56 | 56 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $method = $spec[1]; |
90 | 90 | $priority = isset($spec[2]) ? $spec[2] : 0; |
91 | 91 | |
92 | - $this->listeners[] = $events->attach($event, [ $this, $method ], $priority); |
|
92 | + $this->listeners[] = $events->attach($event, [$this, $method], $priority); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return $this; |
@@ -40,10 +40,10 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
43 | - * Loads module specific configuration. |
|
44 | - * |
|
45 | - * @return array |
|
46 | - */ |
|
43 | + * Loads module specific configuration. |
|
44 | + * |
|
45 | + * @return array |
|
46 | + */ |
|
47 | 47 | public function getConfig() |
48 | 48 | { |
49 | 49 | return ModuleConfigLoader::load(__DIR__ . '/../config'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function getConfig() |
54 | 54 | { |
55 | - return ModuleConfigLoader::load(__DIR__ . '/../config'); |
|
55 | + return ModuleConfigLoader::load(__DIR__.'/../config'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | public static function factory(ServiceManager $serviceManager) |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $eventManager->getSharedManager()->attach( |
69 | 69 | 'Applications', |
70 | 70 | 'application.detail.actionbuttons', |
71 | - function ($event) { |
|
71 | + function($event) { |
|
72 | 72 | return 'pdf/application/details/button'; |
73 | 73 | } |
74 | 74 | ); |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | { |
149 | 149 | $file = $e->getLastFileObject(); |
150 | 150 | // assume it is of the class Core\Entity\FileEntity |
151 | - $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL |
|
152 | - . '<div class="col-md-3">' . $file->getType() . '</div>' |
|
153 | - . '<div class="col-md-3">' . $file->prettySize . '</div>'; |
|
151 | + $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL |
|
152 | + . '<div class="col-md-3">'.$file->getType().'</div>' |
|
153 | + . '<div class="col-md-3">'.$file->prettySize.'</div>'; |
|
154 | 154 | /* |
155 | 155 | * this snippet was for direct inserting an image into the PDF |
156 | 156 | if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) { |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | // the handles are for temporary files |
252 | 252 | error_reporting(0); |
253 | - foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) { |
|
253 | + foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) { |
|
254 | 254 | $handles = array(); |
255 | 255 | try { |
256 | 256 | $pdf = new Mpdf(); |
@@ -264,8 +264,8 @@ discard block |
||
264 | 264 | if (is_array($this->appendImage) && !empty($this->appendImage)) { |
265 | 265 | foreach ($this->appendImage as $imageAttachment) { |
266 | 266 | $content = $imageAttachment->getContent(); |
267 | - $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content); |
|
268 | - $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>'; |
|
267 | + $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content); |
|
268 | + $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>'; |
|
269 | 269 | $pdf->WriteHTML($html); |
270 | 270 | } |
271 | 271 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $pagecount = $pdf->SetSourceFile($filename); |
293 | 293 | for ($pages = 0; $pages < $pagecount; $pages++) { |
294 | 294 | $pdf->AddPage(); |
295 | - $pdf->WriteHTML(' pages: ' . $pagecount); |
|
295 | + $pdf->WriteHTML(' pages: '.$pagecount); |
|
296 | 296 | $tx = $pdf->ImportPage($pages + 1); |
297 | 297 | $pdf->UseTemplate($tx); |
298 | 298 | } |
@@ -329,18 +329,18 @@ discard block |
||
329 | 329 | $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix(); |
330 | 330 | if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) { |
331 | 331 | ; |
332 | - $name .= '.pdf.' . $defaultSuffix; |
|
332 | + $name .= '.pdf.'.$defaultSuffix; |
|
333 | 333 | } else { |
334 | 334 | // TODO: replace Filename by Filename for PDF |
335 | 335 | } |
336 | 336 | |
337 | 337 | foreach ($paths as $path) { |
338 | - $file = new SplFileInfo($path . $name); |
|
338 | + $file = new SplFileInfo($path.$name); |
|
339 | 339 | if ($file->isReadable()) { |
340 | 340 | // Found! Return it. |
341 | 341 | if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') { |
342 | 342 | // Do not try to expand phar paths (realpath + phars == fail) |
343 | - $filePath = $path . $name; |
|
343 | + $filePath = $path.$name; |
|
344 | 344 | if (!file_exists($filePath)) { |
345 | 345 | break; |
346 | 346 | } |
@@ -37,8 +37,8 @@ |
||
37 | 37 | $headscript->appendFile($basepath('modules/Settings/js/forms.decfs.js')); |
38 | 38 | |
39 | 39 | return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>' |
40 | - . $this->renderCheckboxes($element->getCheckboxes()) |
|
41 | - . '</ul>'; |
|
40 | + . $this->renderCheckboxes($element->getCheckboxes()) |
|
41 | + . '</ul>'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $headscript->appendFile($basepath('modules/Settings/js/forms.decfs.js')); |
38 | 38 | |
39 | - return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>' |
|
39 | + return '<ul class="disable-elements-list" id="'.$element->getAttribute('id').'-list"'.'>' |
|
40 | 40 | . $this->renderCheckboxes($element->getCheckboxes()) |
41 | 41 | . '</ul>'; |
42 | 42 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | unset($boxes['__all__']); |
60 | 60 | } |
61 | 61 | |
62 | - $markup .= '<ul class="disable-elements">' . $this->renderCheckboxes($boxes) . '</ul>'; |
|
62 | + $markup .= '<ul class="disable-elements">'.$this->renderCheckboxes($boxes).'</ul>'; |
|
63 | 63 | } else { |
64 | 64 | $markup .= $this->renderCheckbox($boxes); |
65 | 65 | } |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | /* @var $renderer \Laminas\View\Renderer\PhpRenderer */ |
82 | 82 | $renderer = $this->getView(); |
83 | 83 | if (null !== $class) { |
84 | - $box->setAttribute('class', $box->getAttribute('class') . ' ' . $class); |
|
84 | + $box->setAttribute('class', $box->getAttribute('class').' '.$class); |
|
85 | 85 | } |
86 | 86 | $markup = $renderer->formCheckBox($box); |
87 | 87 | if ($desc = $box->getOption('description')) { |
88 | 88 | $desc = $this->getTranslator()->translate($desc, $this->getTranslatorTextDomain()); |
89 | - $markup .= '<div class="alert alert-info"><p>' . $desc . '</p></div>'; |
|
89 | + $markup .= '<div class="alert alert-info"><p>'.$desc.'</p></div>'; |
|
90 | 90 | } |
91 | 91 | return $markup; |
92 | 92 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | $fieldset->setLabel(ucfirst($label)); |
103 | 103 | } |
104 | 104 | $fieldset->setName($name) |
105 | - ->setObject($child); |
|
105 | + ->setObject($child); |
|
106 | 106 | |
107 | 107 | |
108 | 108 | $this->add($fieldset); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName; |
75 | 75 | |
76 | 76 | if (is_array($inputLabel)) { |
77 | - $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
|
77 | + $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0; |
|
78 | 78 | $inputLabel = $inputLabel[0]; |
79 | 79 | } else { |
80 | 80 | $priority = 0; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ), |
89 | 89 | ); |
90 | 90 | if (is_bool($value)) { |
91 | - $input['type']= 'Checkbox'; |
|
91 | + $input['type'] = 'Checkbox'; |
|
92 | 92 | $input['attributes']['checked'] = $value; |
93 | 93 | } else { |
94 | 94 | $input['attributes']['value'] = $value; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | foreach ($children as $name => $child) { |
100 | 100 | $objectClass = ltrim(get_class($settings), '\\'); |
101 | 101 | $moduleName = substr($objectClass, 0, strpos($objectClass, '\\')); |
102 | - $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset'; |
|
102 | + $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset'; |
|
103 | 103 | |
104 | 104 | if ($this->formManager->has($fieldsetName)) { |
105 | 105 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $fieldset->setUseAsBaseFieldset(true) |
83 | - ->setName('base'); |
|
83 | + ->setName('base'); |
|
84 | 84 | |
85 | 85 | $fieldset->setObject($object); |
86 | 86 | $this->add($fieldset); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | $this->setAttribute('method', 'post'); |
72 | 72 | $object = $this->getObject(); |
73 | - $fieldsetName = $object->getModuleName() . '/SettingsFieldset'; |
|
73 | + $fieldsetName = $object->getModuleName().'/SettingsFieldset'; |
|
74 | 74 | |
75 | 75 | if ($this->formManager->has($fieldsetName)) { |
76 | 76 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->add([ |
89 | 89 | 'type' => 'DefaultButtonsFieldset' |
90 | 90 | ]); |
91 | - $this->isBuild=true; |
|
91 | + $this->isBuild = true; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | public function setName($name) |
108 | 108 | { |
109 | - parent::setName(strtolower($name) . '-settings'); |
|
109 | + parent::setName(strtolower($name).'-settings'); |
|
110 | 110 | $urlHelper = $this->viewHelper->get('url'); |
111 | 111 | |
112 | 112 | $url = $urlHelper('lang/settings', array('module' => $name), true); |
@@ -45,6 +45,6 @@ |
||
45 | 45 | */ |
46 | 46 | public function getConfig() |
47 | 47 | { |
48 | - return include __DIR__ . '/../config/module.config.php'; |
|
48 | + return include __DIR__.'/../config/module.config.php'; |
|
49 | 49 | } |
50 | 50 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function __get($property) |
140 | 140 | { |
141 | - $getter = "get" . ucfirst($property); |
|
141 | + $getter = "get".ucfirst($property); |
|
142 | 142 | if (method_exists($this, $getter)) { |
143 | 143 | return $this->$getter(); |
144 | 144 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $this->checkWriteAccess(); |
161 | 161 | |
162 | - $setter = 'set' . ucfirst($property); |
|
162 | + $setter = 'set'.ucfirst($property); |
|
163 | 163 | if (method_exists($this, $setter)) { |
164 | 164 | $this->$setter($value); |
165 | 165 | return; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | protected function filterArrayStrings($array, $search, $replace) |
58 | 58 | { |
59 | 59 | $return = array(); |
60 | - foreach ((array)$array as $key => $value) { |
|
60 | + foreach ((array) $array as $key => $value) { |
|
61 | 61 | $key = str_replace($search, $replace, $key); |
62 | 62 | $value = is_array($value) |
63 | 63 | ? $this->filterArrayStrings($value, $search, $replace) |