@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | public function attach(EventManagerInterface $events) |
| 29 | 29 | { |
| 30 | - $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [ $this, 'onDispatchError']); |
|
| 30 | + $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'onDispatchError']); |
|
| 31 | 31 | |
| 32 | 32 | return $this; |
| 33 | 33 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | const NAMESPACE_INFO = 'info'; |
| 22 | 22 | const NAMESPACE_WARNING = 'warning'; |
| 23 | 23 | const NAMESPACE_DANGER = 'danger'; |
| 24 | - const NAMESPACE_SUCCESS = 'success'; |
|
| 24 | + const NAMESPACE_SUCCESS = 'success'; |
|
| 25 | 25 | |
| 26 | 26 | protected $namespace2priority = array( |
| 27 | 27 | self::NAMESPACE_INFO => NotificationEntity::INFO, |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function setListener($listener) |
| 61 | 61 | { |
| 62 | - $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this,'createOutput'), 1); |
|
| 62 | + $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this, 'createOutput'), 1); |
|
| 63 | 63 | $this->notificationListener = $listener; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | public function getList($namespace, $callback) |
| 136 | 136 | { |
| 137 | 137 | $session = new Container($namespace); |
| 138 | - $params = $session->params?:array(); |
|
| 138 | + $params = $session->params ?: array(); |
|
| 139 | 139 | if (!$session->list) { |
| 140 | 140 | $session->list = is_array($callback) |
| 141 | 141 | ? call_user_func($callback, $session->params) |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param object $object |
| 47 | 47 | * @return object |
| 48 | 48 | */ |
| 49 | - public function hydrate (array $data, $object) |
|
| 49 | + public function hydrate(array $data, $object) |
|
| 50 | 50 | { |
| 51 | 51 | |
| 52 | 52 | return $object; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @return array|string |
| 58 | 58 | * @throws \InvalidArgumentException |
| 59 | 59 | */ |
| 60 | - public function extract ($object) |
|
| 60 | + public function extract($object) |
|
| 61 | 61 | { |
| 62 | 62 | if (!$object instanceof EntityInterface) { |
| 63 | 63 | throw new \InvalidArgumentException("Extract only from Entities"); |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | /* @var $serviceLocator \Zend\Form\FormElementManager */ |
| 86 | 86 | $service = $serviceLocator->getServiceLocator(); |
| 87 | - $options=null; |
|
| 87 | + $options = null; |
|
| 88 | 88 | if ($this->options) { |
| 89 | 89 | $options = $service->get($this->options); |
| 90 | 90 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | |
| 95 | 95 | $view = $e->getApplication()->getServiceManager()->get('ViewManager')->getView(); |
| 96 | 96 | $view->addRenderingStrategy(array($strategy, 'selectRenderer'), 10); |
| 97 | - $view->addResponseStrategy(array($strategy, 'injectResponse'), 10); |
|
| 97 | + $view->addResponseStrategy(array($strategy, 'injectResponse'), 10); |
|
| 98 | 98 | |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
| 61 | - $dm = $eventArgs->getDocumentManager(); |
|
| 61 | + $dm = $eventArgs->getDocumentManager(); |
|
| 62 | 62 | $uow = $dm->getUnitOfWork(); |
| 63 | 63 | $changeset = $uow->getDocumentChangeset($document); |
| 64 | 64 | $filter = $this->getKeywordsFilter(); |
@@ -42,8 +42,8 @@ |
||
| 42 | 42 | $document->preUpdate($prePersist); |
| 43 | 43 | |
| 44 | 44 | if (!$prePersist) { |
| 45 | - $dm = $eventArgs->getDocumentManager(); |
|
| 46 | - $uow = $dm->getUnitOfWork(); |
|
| 45 | + $dm = $eventArgs->getDocumentManager(); |
|
| 46 | + $uow = $dm->getUnitOfWork(); |
|
| 47 | 47 | $uow->recomputeSingleDocumentChangeSet($dm->getClassMetadata(get_class($document)), $document); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | $config = $this->serviceManager->get('Config'); |
| 90 | 90 | $appConfig = $this->serviceManager->get('ApplicationConfig'); |
| 91 | 91 | foreach ($appConfig['modules'] as $module) { |
| 92 | - $this->config[$module] = array_key_exists($module, $config)?$config[$module]:array(); |
|
| 92 | + $this->config[$module] = array_key_exists($module, $config) ? $config[$module] : array(); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | if (isset($namespace)) { |
| 96 | - return array_key_exists($namespace, $this->config)?$this->config[$namespace]: array(); |
|
| 96 | + return array_key_exists($namespace, $this->config) ? $this->config[$namespace] : array(); |
|
| 97 | 97 | } |
| 98 | 98 | return $this->config; |
| 99 | 99 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | if (!empty($this->map[$key])) { |
| 108 | 108 | $module = $this->getNamespace(); |
| 109 | - return isset($this->map[$key][$module])?$this->map[$key][$module]:array(); |
|
| 109 | + return isset($this->map[$key][$module]) ? $this->map[$key][$module] : array(); |
|
| 110 | 110 | } |
| 111 | 111 | return array(); |
| 112 | 112 | } |