@@ -61,7 +61,7 @@ |
||
| 61 | 61 | if ($this->hasIdentity() && ($id = $this->getIdentity())) { |
| 62 | 62 | $user = $this->getRepository()->find($id, \Doctrine\ODM\MongoDB\LockMode::NONE, null, ['allowDeactivated' => true]); |
| 63 | 63 | if (!$user) { |
| 64 | - throw new \OutOfBoundsException('Unknown user id: ' . $id); |
|
| 64 | + throw new \OutOfBoundsException('Unknown user id: '.$id); |
|
| 65 | 65 | } |
| 66 | 66 | $this->user = $user; |
| 67 | 67 | } else { |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | $eventManager = $event->getTarget()->getEventManager(); |
| 127 | 127 | $results = $eventManager->trigger(MvcEvent::EVENT_DISPATCH_ERROR, $event); |
| 128 | 128 | if (count($results)) { |
| 129 | - $return = $results->last(); |
|
| 129 | + $return = $results->last(); |
|
| 130 | 130 | } else { |
| 131 | 131 | $return = $event->getParams(); |
| 132 | 132 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function getConfig() |
| 38 | 38 | { |
| 39 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
| 39 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -52,19 +52,19 @@ discard block |
||
| 52 | 52 | // This ensures the class from "addtional-providers" is loaded. |
| 53 | 53 | array( |
| 54 | 54 | 'Hybrid_Providers_XING' |
| 55 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
| 55 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
| 56 | 56 | ), |
| 57 | 57 | array( |
| 58 | 58 | 'Hybrid_Providers_Github' |
| 59 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
| 59 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
| 60 | 60 | ), |
| 61 | 61 | ), |
| 62 | 62 | 'Zend\Loader\StandardAutoloader' => array( |
| 63 | 63 | 'namespaces' => array( |
| 64 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
| 65 | - 'AuthTest' => __DIR__ . '/test/AuthTest', |
|
| 66 | - 'Acl' => __DIR__ . '/src/Acl', |
|
| 67 | - 'AclTest' => __DIR__ . '/test/AclTest', |
|
| 64 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
| 65 | + 'AuthTest' => __DIR__.'/test/AuthTest', |
|
| 66 | + 'Acl' => __DIR__.'/src/Acl', |
|
| 67 | + 'AclTest' => __DIR__.'/test/AclTest', |
|
| 68 | 68 | ), |
| 69 | 69 | ), |
| 70 | 70 | ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $eventManager->attach( |
| 82 | 82 | MvcEvent::EVENT_ROUTE, |
| 83 | - function (MvcEvent $e) use ($services) { |
|
| 83 | + function(MvcEvent $e) use ($services) { |
|
| 84 | 84 | /* @var $checkPermissionsListener \Acl\Listener\CheckPermissionsListener */ |
| 85 | 85 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
| 86 | 86 | $checkPermissionsListener->onRoute($e); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $eventManager->attach( |
| 92 | 92 | MvcEvent::EVENT_DISPATCH, |
| 93 | - function (MvcEvent $e) use ($services) { |
|
| 93 | + function(MvcEvent $e) use ($services) { |
|
| 94 | 94 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
| 95 | 95 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
| 96 | 96 | $checkPermissionsListener->onDispatch($e); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function getConfig() |
| 48 | 48 | { |
| 49 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
| 49 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public static function factory(ServiceManager $serviceManager) |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $eventManager->getSharedManager()->attach( |
| 63 | 63 | 'Applications', |
| 64 | 64 | 'application.detail.actionbuttons', |
| 65 | - function ($event) { |
|
| 65 | + function($event) { |
|
| 66 | 66 | return 'pdf/application/details/button'; |
| 67 | 67 | } |
| 68 | 68 | ); |
@@ -142,9 +142,9 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | $file = $e->getLastFileObject(); |
| 144 | 144 | // assume it is of the class Core\Entity\FileEntity |
| 145 | - $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL |
|
| 146 | - . '<div class="col-md-3">' . $file->getType() . '</div>' |
|
| 147 | - . '<div class="col-md-3">' . $file->prettySize . '</div>'; |
|
| 145 | + $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL |
|
| 146 | + . '<div class="col-md-3">'.$file->getType().'</div>' |
|
| 147 | + . '<div class="col-md-3">'.$file->prettySize.'</div>'; |
|
| 148 | 148 | /* |
| 149 | 149 | * this snippet was for direct inserting an image into the PDF |
| 150 | 150 | if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) { |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | // the handles are for temporary files |
| 246 | 246 | error_reporting(0); |
| 247 | - foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) { |
|
| 247 | + foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) { |
|
| 248 | 248 | $handles = array(); |
| 249 | 249 | try { |
| 250 | 250 | $pdf = new extern\mPDFderive(); |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | if (is_array($this->appendImage) && !empty($this->appendImage)) { |
| 259 | 259 | foreach ($this->appendImage as $imageAttachment) { |
| 260 | 260 | $content = $imageAttachment->getContent(); |
| 261 | - $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content); |
|
| 262 | - $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>'; |
|
| 261 | + $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content); |
|
| 262 | + $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>'; |
|
| 263 | 263 | $pdf->WriteHTML($html); |
| 264 | 264 | } |
| 265 | 265 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $pagecount = $pdf->SetSourceFile($filename); |
| 287 | 287 | for ($pages = 0; $pages < $pagecount; $pages++) { |
| 288 | 288 | $pdf->AddPage(); |
| 289 | - $pdf->WriteHTML(' pages: ' . $pagecount); |
|
| 289 | + $pdf->WriteHTML(' pages: '.$pagecount); |
|
| 290 | 290 | $tx = $pdf->ImportPage($pages + 1); |
| 291 | 291 | $pdf->UseTemplate($tx); |
| 292 | 292 | } |
@@ -323,18 +323,18 @@ discard block |
||
| 323 | 323 | $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix(); |
| 324 | 324 | if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) { |
| 325 | 325 | ; |
| 326 | - $name .= '.pdf.' . $defaultSuffix; |
|
| 326 | + $name .= '.pdf.'.$defaultSuffix; |
|
| 327 | 327 | } else { |
| 328 | 328 | // TODO: replace Filename by Filename for PDF |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | foreach ($paths as $path) { |
| 332 | - $file = new SplFileInfo($path . $name); |
|
| 332 | + $file = new SplFileInfo($path.$name); |
|
| 333 | 333 | if ($file->isReadable()) { |
| 334 | 334 | // Found! Return it. |
| 335 | 335 | if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') { |
| 336 | 336 | // Do not try to expand phar paths (realpath + phars == fail) |
| 337 | - $filePath = $path . $name; |
|
| 337 | + $filePath = $path.$name; |
|
| 338 | 338 | if (!file_exists($filePath)) { |
| 339 | 339 | break; |
| 340 | 340 | } |
@@ -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; |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $partial = $options['partial']; |
| 49 | 49 | |
| 50 | 50 | |
| 51 | - $variables=[]; |
|
| 51 | + $variables = []; |
|
| 52 | 52 | |
| 53 | 53 | return $view->partial($partial, $variables); |
| 54 | 54 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @var string |
| 39 | 39 | */ |
| 40 | - const CLASS_NAME = ''; |
|
| 40 | + const CLASS_NAME = ''; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Creation options. |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $instance = $this->createFormInstance($container, $requestedName, $options); |
| 76 | 76 | |
| 77 | 77 | if (!$instance instanceOf CustomizableFieldsetInterface) { |
| 78 | - throw new \RuntimeException('Form or Fieldset instance must implement ' . CustomizableFieldsetInterface::class); |
|
| 78 | + throw new \RuntimeException('Form or Fieldset instance must implement '.CustomizableFieldsetInterface::class); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $customizeOptions = $this->getCustomizationOptions($container, $requestedName, $options); |