@@ -130,7 +130,7 @@ |
||
130 | 130 | |
131 | 131 | protected function checkEntityType($entity) |
132 | 132 | { |
133 | - if ( !($entity instanceOf $this->entityPrototype) ) { |
|
133 | + if (!($entity instanceOf $this->entityPrototype)) { |
|
134 | 134 | throw new \InvalidArgumentException(sprintf( |
135 | 135 | 'Entity must be of type %s but recieved %s instead', |
136 | 136 | get_class($this->entityPrototype), |
@@ -40,12 +40,12 @@ |
||
40 | 40 | */ |
41 | 41 | public function attachShared(SharedEventManagerInterface $events) |
42 | 42 | { |
43 | - $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this,'add'), 1); |
|
44 | - $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderJSON'), -240); |
|
45 | - $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderHTML'), -250); |
|
43 | + $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this, 'add'), 1); |
|
44 | + $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderJSON'), -240); |
|
45 | + $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderHTML'), -250); |
|
46 | 46 | // Sometimes the Dispatch-Event is not reached, for instance with a route-direct |
47 | 47 | // but also for Events, that are happening after the Dispatch |
48 | - $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_FINISH, array($this,'renderHTML'), -250); |
|
48 | + $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_FINISH, array($this, 'renderHTML'), -250); |
|
49 | 49 | return $this; |
50 | 50 | } |
51 | 51 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | if (null === $buttonContent) { |
27 | 27 | throw new Exception\DomainException( |
28 | 28 | sprintf( |
29 | - '%s expects either button content as the second argument, ' . |
|
29 | + '%s expects either button content as the second argument, '. |
|
30 | 30 | 'or that the element provided has a label value; neither found', |
31 | 31 | __METHOD__ |
32 | 32 | ) |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $checkedBoole = ($value == 1 || $value == 'on'); |
47 | 47 | |
48 | 48 | |
49 | - $checkedClass = $checkedBoole?'active"':''; |
|
49 | + $checkedClass = $checkedBoole ? 'active"' : ''; |
|
50 | 50 | |
51 | 51 | $hiddenElement = ''; |
52 | 52 | if ($element->useHiddenElement()) { |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | $element->setUseHiddenElement(false); |
64 | 64 | } |
65 | 65 | |
66 | - $buttonContent = $hiddenElement . PHP_EOL |
|
67 | - . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL |
|
68 | - . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL |
|
69 | - . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL |
|
70 | - . '</div>' . PHP_EOL; |
|
66 | + $buttonContent = $hiddenElement.PHP_EOL |
|
67 | + . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL |
|
68 | + . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL |
|
69 | + . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL |
|
70 | + . '</div>'.PHP_EOL; |
|
71 | 71 | |
72 | 72 | return $buttonContent; |
73 | 73 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | * @throws \Core\Entity\Exception\OutOfBoundsException if the property does not exists. |
73 | 73 | * @since 0.25 |
74 | 74 | */ |
75 | - public function notEmpty($property, array $args=[]); |
|
75 | + public function notEmpty($property, array $args = []); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * Checks, if this entity has a property. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $mvcEvent->setParam('__settings_active_module', $moduleName); |
67 | 67 | |
68 | 68 | $formManager = $this->serviceLocator->get('FormElementManager'); |
69 | - $formName = $moduleName . '/SettingsForm'; |
|
69 | + $formName = $moduleName.'/SettingsForm'; |
|
70 | 70 | if (!$formManager->has($formName)) { |
71 | 71 | $formName = "Settings/Form"; |
72 | 72 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $valid = $form->isValid(); |
89 | 89 | $partial = $services->get('viewhelpermanager')->get('partial'); |
90 | 90 | $text = $valid |
91 | - ? /*@translate*/'Changes successfully saved' |
|
91 | + ? /*@translate*/'Changes successfully saved' |
|
92 | 92 | : /*@translate*/'Changes could not be saved'; |
93 | 93 | |
94 | 94 | $vars = array(); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return new JsonModel($vars); |
109 | 109 | } |
110 | 110 | |
111 | - $vars['form']=$form; |
|
111 | + $vars['form'] = $form; |
|
112 | 112 | return $vars; |
113 | 113 | } |
114 | 114 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | $this->setAttribute('method', 'post'); |
58 | 58 | $object = $this->getObject(); |
59 | - $fieldsetName = $object->getModuleName() . '/SettingsFieldset'; |
|
59 | + $fieldsetName = $object->getModuleName().'/SettingsFieldset'; |
|
60 | 60 | |
61 | 61 | if ($this->formManager->has($fieldsetName)) { |
62 | 62 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->add($fieldset); |
73 | 73 | |
74 | 74 | $this->add($this->formManager->get('DefaultButtonsFieldset')); |
75 | - $this->isBuild=true; |
|
75 | + $this->isBuild = true; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function setName($name) |
92 | 92 | { |
93 | - parent::setName(strtolower($name) . '-settings'); |
|
93 | + parent::setName(strtolower($name).'-settings'); |
|
94 | 94 | $urlHelper = $this->formManager->getServiceLocator() |
95 | 95 | ->get('ViewHelperManager') |
96 | 96 | ->get('url'); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | |
75 | 75 | $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName; |
76 | 76 | |
77 | - if (is_array($inputLabel)){ |
|
78 | - $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
|
77 | + if (is_array($inputLabel)) { |
|
78 | + $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0; |
|
79 | 79 | $inputLabel = $inputLabel[0]; |
80 | - }else{ |
|
80 | + } else { |
|
81 | 81 | $priority = 0; |
82 | 82 | } |
83 | 83 | |
@@ -89,19 +89,19 @@ discard block |
||
89 | 89 | ), |
90 | 90 | ); |
91 | 91 | if (is_bool($value)) { |
92 | - $input['type']= 'Checkbox'; |
|
92 | + $input['type'] = 'Checkbox'; |
|
93 | 93 | $input['attributes']['checked'] = $value; |
94 | 94 | } else { |
95 | 95 | $input['attributes']['value'] = $value; |
96 | 96 | } |
97 | - $this->add($input,['priority'=>$priority]); |
|
97 | + $this->add($input, ['priority'=>$priority]); |
|
98 | 98 | |
99 | 99 | } |
100 | 100 | |
101 | 101 | foreach ($children as $name => $child) { |
102 | 102 | $objectClass = ltrim(get_class($settings), '\\'); |
103 | 103 | $moduleName = substr($objectClass, 0, strpos($objectClass, '\\')); |
104 | - $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset'; |
|
104 | + $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset'; |
|
105 | 105 | |
106 | 106 | if ($this->formManager->has($fieldsetName)) { |
107 | 107 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getConfig() |
30 | 30 | { |
31 | - return include __DIR__ . '/config/module.config.php'; |
|
31 | + return include __DIR__.'/config/module.config.php'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return array( |
43 | 43 | 'Zend\Loader\StandardAutoloader' => array( |
44 | 44 | 'namespaces' => array( |
45 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
45 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
46 | 46 | ), |
47 | 47 | ), |
48 | 48 | ); |
@@ -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['statusselect'], '[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 |