@@ -22,20 +22,20 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class OrganizationsNameFieldsetFactory implements FactoryInterface |
| 24 | 24 | { |
| 25 | - /** |
|
| 26 | - * @param ContainerInterface $container |
|
| 27 | - * @param string $requestedName |
|
| 28 | - * @param array|null $options |
|
| 29 | - * |
|
| 30 | - * @inheritdoc |
|
| 31 | - * @return OrganizationsNameFieldset |
|
| 32 | - */ |
|
| 33 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 34 | - { |
|
| 35 | - $fieldset = new OrganizationsNameFieldset($requestedName,$options); |
|
| 25 | + /** |
|
| 26 | + * @param ContainerInterface $container |
|
| 27 | + * @param string $requestedName |
|
| 28 | + * @param array|null $options |
|
| 29 | + * |
|
| 30 | + * @inheritdoc |
|
| 31 | + * @return OrganizationsNameFieldset |
|
| 32 | + */ |
|
| 33 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 34 | + { |
|
| 35 | + $fieldset = new OrganizationsNameFieldset($requestedName,$options); |
|
| 36 | 36 | |
| 37 | - $fieldset->setRepositories($container->get('repositories')); |
|
| 38 | - return $fieldset; |
|
| 39 | - } |
|
| 37 | + $fieldset->setRepositories($container->get('repositories')); |
|
| 38 | + return $fieldset; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | 41 | } |
| 42 | 42 | \ No newline at end of file |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | * @inheritdoc |
| 31 | 31 | * @return OrganizationsNameFieldset |
| 32 | 32 | */ |
| 33 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 33 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 34 | 34 | { |
| 35 | - $fieldset = new OrganizationsNameFieldset($requestedName,$options); |
|
| 35 | + $fieldset = new OrganizationsNameFieldset($requestedName, $options); |
|
| 36 | 36 | |
| 37 | 37 | $fieldset->setRepositories($container->get('repositories')); |
| 38 | 38 | return $fieldset; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | class InviteEmployeeController extends AbstractActionController |
| 31 | 31 | { |
| 32 | - protected $repositories; |
|
| 32 | + protected $repositories; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Invitation first step: Create or find user and send mail. |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | $result = $this->forward()->dispatch('Auth\Controller\Password', array('action' => 'index')); |
| 104 | 104 | $model = new ViewModel( |
| 105 | 105 | array( |
| 106 | - 'organization' => $organization->getOrganizationName()->getName() |
|
| 107 | - ) |
|
| 106 | + 'organization' => $organization->getOrganizationName()->getName() |
|
| 107 | + ) |
|
| 108 | 108 | ); |
| 109 | 109 | |
| 110 | 110 | if (!$result->getVariable('valid', false)) { |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | return new ViewModel( |
| 146 | 146 | array( |
| 147 | - 'organization' => $organization->getOrganizationName()->getName() |
|
| 148 | - ) |
|
| 147 | + 'organization' => $organization->getOrganizationName()->getName() |
|
| 148 | + ) |
|
| 149 | 149 | ); |
| 150 | 150 | } |
| 151 | 151 | |
@@ -170,20 +170,20 @@ discard block |
||
| 170 | 170 | return $model; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - /** |
|
| 174 | - * Initialize required used service for this container |
|
| 175 | - * |
|
| 176 | - * @param ContainerInterface $container |
|
| 177 | - */ |
|
| 173 | + /** |
|
| 174 | + * Initialize required used service for this container |
|
| 175 | + * |
|
| 176 | + * @param ContainerInterface $container |
|
| 177 | + */ |
|
| 178 | 178 | public function initContainer(ContainerInterface $container) |
| 179 | 179 | { |
| 180 | - $this->repositories = $container->get('repositories'); |
|
| 180 | + $this->repositories = $container->get('repositories'); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - static public function factory(ContainerInterface $container) |
|
| 184 | - { |
|
| 185 | - $ob = new static(); |
|
| 186 | - $ob->initContainer($container); |
|
| 187 | - return $ob; |
|
| 188 | - } |
|
| 183 | + static public function factory(ContainerInterface $container) |
|
| 184 | + { |
|
| 185 | + $ob = new static(); |
|
| 186 | + $ob->initContainer($container); |
|
| 187 | + return $ob; |
|
| 188 | + } |
|
| 189 | 189 | } |
@@ -24,31 +24,31 @@ |
||
| 24 | 24 | class OrganizationsNameFieldset extends Fieldset |
| 25 | 25 | { |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * @var RepositoryService |
|
| 29 | - */ |
|
| 30 | - private $repositories; |
|
| 27 | + /** |
|
| 28 | + * @var RepositoryService |
|
| 29 | + */ |
|
| 30 | + private $repositories; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @return RepositoryService |
|
| 34 | - */ |
|
| 35 | - public function getRepositories() |
|
| 36 | - { |
|
| 37 | - return $this->repositories; |
|
| 38 | - } |
|
| 32 | + /** |
|
| 33 | + * @return RepositoryService |
|
| 34 | + */ |
|
| 35 | + public function getRepositories() |
|
| 36 | + { |
|
| 37 | + return $this->repositories; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @param RepositoryService $repositories |
|
| 42 | - */ |
|
| 43 | - public function setRepositories( $repositories ) |
|
| 44 | - { |
|
| 45 | - $this->repositories = $repositories; |
|
| 46 | - } |
|
| 40 | + /** |
|
| 41 | + * @param RepositoryService $repositories |
|
| 42 | + */ |
|
| 43 | + public function setRepositories( $repositories ) |
|
| 44 | + { |
|
| 45 | + $this->repositories = $repositories; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - public function getHydrator() |
|
| 48 | + public function getHydrator() |
|
| 49 | 49 | { |
| 50 | 50 | if (!$this->hydrator) { |
| 51 | - /* @var $formElementManager FormElementManagerV3Polyfill */ |
|
| 51 | + /* @var $formElementManager FormElementManagerV3Polyfill */ |
|
| 52 | 52 | $hydrator = new EntityHydrator(); |
| 53 | 53 | $formFactory = $this->getFormFactory(); |
| 54 | 54 | $formElementManager = $formFactory->getFormElementManager(); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * @param RepositoryService $repositories |
| 42 | 42 | */ |
| 43 | - public function setRepositories( $repositories ) |
|
| 43 | + public function setRepositories($repositories) |
|
| 44 | 44 | { |
| 45 | 45 | $this->repositories = $repositories; |
| 46 | 46 | } |
@@ -50,9 +50,9 @@ |
||
| 50 | 50 | 'property' => 'images', |
| 51 | 51 | 'use_files_array' => true, |
| 52 | 52 | |
| 53 | - 'options' => [ |
|
| 53 | + 'options' => [ |
|
| 54 | 54 | |
| 55 | - ] |
|
| 55 | + ] |
|
| 56 | 56 | ), |
| 57 | 57 | |
| 58 | 58 | 'descriptionForm' => array( |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | /* @var $serviceLocator \Core\Mail\MailService */ |
| 49 | 49 | /* @var $owner \Auth\Entity\UserInterface */ |
| 50 | 50 | /* @var $user \Auth\Entity\UserInterface */ |
| 51 | - $this->setCreationOptions($options); |
|
| 51 | + $this->setCreationOptions($options); |
|
| 52 | 52 | $auth = $container->get('AuthenticationService'); |
| 53 | 53 | $router = $container->get('Router'); |
| 54 | 54 | |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | * @return void |
| 108 | 108 | * @throws \InvalidArgumentException |
| 109 | 109 | */ |
| 110 | - public function setCreationOptions(array $options=null) |
|
| 110 | + public function setCreationOptions(array $options = null) |
|
| 111 | 111 | { |
| 112 | 112 | if (!isset($options['user']) || !$options['user'] instanceof UserInterface) { |
| 113 | 113 | throw new \InvalidArgumentException('An user interface is required!'); |
@@ -13,15 +13,15 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | if (php_sapi_name() == 'cli-server') { |
| 15 | 15 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
| 16 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
| 17 | - if (is_file(__DIR__ . '/' . $route)) { |
|
| 18 | - if(substr($route, -4) == ".php"){ |
|
| 19 | - require __DIR__ . '/' . $route; // Include requested script files |
|
| 16 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
| 17 | + if (is_file(__DIR__.'/'.$route)) { |
|
| 18 | + if (substr($route, -4) == ".php") { |
|
| 19 | + require __DIR__.'/'.$route; // Include requested script files |
|
| 20 | 20 | exit; |
| 21 | 21 | } |
| 22 | - return false; // Serve file as is |
|
| 22 | + return false; // Serve file as is |
|
| 23 | 23 | } else { // Fallback to index.php |
| 24 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 24 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | } else { |
| 42 | 42 | echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>'; |
| 43 | 43 | echo '<p>Please try to install the dependencies via: </p>'; |
| 44 | - echo '<code>cd '. realpath('.') .'<br>./install.sh</code>'; |
|
| 45 | - echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>'; |
|
| 44 | + echo '<code>cd '.realpath('.').'<br>./install.sh</code>'; |
|
| 45 | + echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>'; |
|
| 46 | 46 | exit; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function setBirthDay($birthDay) |
| 140 | 140 | { |
| 141 | - $this->birthDay=$birthDay; |
|
| 141 | + $this->birthDay = $birthDay; |
|
| 142 | 142 | return $this; |
| 143 | 143 | } |
| 144 | 144 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function setBirthMonth($birthMonth) |
| 161 | 161 | { |
| 162 | - $this->birthMonth=$birthMonth; |
|
| 162 | + $this->birthMonth = $birthMonth; |
|
| 163 | 163 | return $this; |
| 164 | 164 | } |
| 165 | 165 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public function setBirthYear($birthYear) |
| 182 | 182 | { |
| 183 | - $this->birthYear=$birthYear; |
|
| 183 | + $this->birthYear = $birthYear; |
|
| 184 | 184 | return $this; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function setEmail($email) |
| 203 | 203 | { |
| 204 | - $this->email = trim((String)$email); |
|
| 204 | + $this->email = trim((String) $email); |
|
| 205 | 205 | return $this; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | public function setFirstName($firstName) |
| 246 | 246 | { |
| 247 | - $this->firstName = trim((String)$firstName); |
|
| 247 | + $this->firstName = trim((String) $firstName); |
|
| 248 | 248 | return $this; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | */ |
| 267 | 267 | public function setGender($gender) |
| 268 | 268 | { |
| 269 | - $this->gender = trim((String)$gender); |
|
| 269 | + $this->gender = trim((String) $gender); |
|
| 270 | 270 | return $this; |
| 271 | 271 | } |
| 272 | 272 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | public function setHouseNumber($houseNumber) |
| 289 | 289 | { |
| 290 | - $this->houseNumber=$houseNumber; |
|
| 290 | + $this->houseNumber = $houseNumber; |
|
| 291 | 291 | return $this; |
| 292 | 292 | } |
| 293 | 293 | |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | if (!$this->lastName) { |
| 333 | 333 | return $emailIfEmpty ? $this->email : ''; |
| 334 | 334 | } |
| 335 | - return ($this->firstName ? $this->firstName . ' ' : '') . $this->lastName; |
|
| 335 | + return ($this->firstName ? $this->firstName.' ' : '').$this->lastName; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | */ |
| 427 | 427 | public function setStreet($street) |
| 428 | 428 | { |
| 429 | - $this->street=$street; |
|
| 429 | + $this->street = $street; |
|
| 430 | 430 | return $this; |
| 431 | 431 | } |
| 432 | 432 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | public function setCountry($country) |
| 449 | 449 | { |
| 450 | - $this->country=$country; |
|
| 450 | + $this->country = $country; |
|
| 451 | 451 | return $this; |
| 452 | 452 | } |
| 453 | 453 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function setHouseNumber($houseNumber = "") |
| 88 | 88 | { |
| 89 | - $this->houseNumber=$houseNumber; |
|
| 89 | + $this->houseNumber = $houseNumber; |
|
| 90 | 90 | return $this; |
| 91 | 91 | } |
| 92 | 92 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function setStreet($street = "") |
| 154 | 154 | { |
| 155 | - $this->street=$street; |
|
| 155 | + $this->street = $street; |
|
| 156 | 156 | return $this; |
| 157 | 157 | } |
| 158 | 158 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function setCountry($country = "") |
| 176 | 176 | { |
| 177 | - $this->country=$country; |
|
| 177 | + $this->country = $country; |
|
| 178 | 178 | return $this; |
| 179 | 179 | } |
| 180 | 180 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | public function setPhone($phone = "") |
| 201 | 201 | { |
| 202 | - $this->phone=$phone; |
|
| 202 | + $this->phone = $phone; |
|
| 203 | 203 | return $this; |
| 204 | 204 | } |
| 205 | 205 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public function setFax($fax = "") |
| 224 | 224 | { |
| 225 | - $this->fax=$fax; |
|
| 225 | + $this->fax = $fax; |
|
| 226 | 226 | return $this; |
| 227 | 227 | } |
| 228 | 228 | |