@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @param UserRepository $userRepository |
42 | 42 | */ |
43 | - public function __construct(UserRepository $userRepository,$formManager,$viewHelper) |
|
43 | + public function __construct(UserRepository $userRepository, $formManager, $viewHelper) |
|
44 | 44 | { |
45 | 45 | $this->userRepository = $userRepository; |
46 | 46 | $this->formManager = $formManager; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | $switcher = $this->plugin('Auth/User/Switcher'); |
189 | - $success = $switcher($this->params()->fromQuery('id'), [ 'ref' => urldecode($this->params()->fromQuery('ref')) ]); |
|
189 | + $success = $switcher($this->params()->fromQuery('id'), ['ref' => urldecode($this->params()->fromQuery('ref'))]); |
|
190 | 190 | |
191 | 191 | return new JsonModel(['success' => true]); |
192 | 192 | } |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | /* @var \Auth\Form\UserProfileContainer $userProfileContainer */ |
96 | 96 | $userProfileContainer = $this->userProfileContainer; |
97 | 97 | $user = $this->authService->getUser(); /* @var $user \Auth\Entity\User */ |
98 | - $postProfiles = (array)$this->params()->fromPost('social_profiles'); |
|
98 | + $postProfiles = (array) $this->params()->fromPost('social_profiles'); |
|
99 | 99 | $userProfiles = $user->getProfile(); |
100 | 100 | $formSocialProfiles = $this->socialProfileForm |
101 | 101 | ->setUseDefaultValidation(true) |
102 | - ->setData(['social_profiles' => array_map(function ($array) |
|
102 | + ->setData(['social_profiles' => array_map(function($array) |
|
103 | 103 | { |
104 | 104 | return $array['data']; |
105 | 105 | }, $userProfiles)]); |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | $form = $userProfileContainer->getForm($formName); |
119 | 119 | |
120 | 120 | if ($form) { |
121 | - $postData = $form->getOption('use_post_array') ? $_POST : array(); |
|
121 | + $postData = $form->getOption('use_post_array') ? $_POST : array(); |
|
122 | 122 | //@TODO: [ZF3] option use_files_array is false by default |
123 | 123 | //$filesData = $form->getOption('use_files_array') ? $_FILES : array(); |
124 | 124 | $filesData = $_FILES; |
125 | - $data = array_merge($postData, $filesData); |
|
125 | + $data = array_merge($postData, $filesData); |
|
126 | 126 | $form->setData($data); |
127 | 127 | |
128 | 128 | if (!$form->isValid()) { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | )); |
184 | 184 | } else { |
185 | 185 | $profile = [ |
186 | - 'auth' => (array)$authProfile, |
|
186 | + 'auth' => (array) $authProfile, |
|
187 | 187 | 'data' => \Zend\Json\Json::decode($dataProfiles[$network]) |
188 | 188 | ]; |
189 | 189 | $user->addProfile($network, $profile); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | // keep data in sync & properly decoded |
196 | - $formSocialProfiles->setData(['social_profiles' => array_map(function ($array) |
|
196 | + $formSocialProfiles->setData(['social_profiles' => array_map(function($array) |
|
197 | 197 | { |
198 | 198 | return \Zend\Json\Json::decode($array) ?: ''; |
199 | 199 | }, $dataProfiles)]); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
38 | 38 | } |
39 | 39 | |
40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
40 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
41 | 41 | { |
42 | 42 | $auth = $container->get('AuthenticationService'); |
43 | 43 | $user = $auth->getUser(); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | class OrganizationHydratorFactory implements FactoryInterface |
19 | 19 | { |
20 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
20 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
|
21 | 21 | $repositoryManager = $container->get('repositories'); |
22 | 22 | $repOrganization = $repositoryManager->get('Organizations/Organization'); |
23 | 23 | $repOrganizationName = $repositoryManager->get('Organizations/OrganizationName'); |
@@ -33,6 +33,6 @@ |
||
33 | 33 | $viewHelper = $container->get('ViewHelperManager'); |
34 | 34 | $translator = $container->get('translator'); |
35 | 35 | |
36 | - return new IndexController($form, $organizationRepository,$translator,$formManager,$viewHelper); |
|
36 | + return new IndexController($form, $organizationRepository, $translator, $formManager, $viewHelper); |
|
37 | 37 | } |
38 | 38 | } |
@@ -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; |
@@ -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 | } |
@@ -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!'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | protected $country; |
39 | 39 | |
40 | 40 | |
41 | - public function __construct($uri, $country="DE", $cache = false) |
|
41 | + public function __construct($uri, $country = "DE", $cache = false) |
|
42 | 42 | { |
43 | 43 | $this->country = $country; |
44 | 44 | $this->client = $this->setupClient($uri); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function query($term, array $params = []) |
64 | 64 | { |
65 | 65 | /* @TODO: [ZF3] overriding $term value because it always returns null */ |
66 | - if(is_null($term)){ |
|
66 | + if (is_null($term)) { |
|
67 | 67 | $term = $_REQUEST['q']; |
68 | 68 | } |
69 | 69 | $cacheId = md5($term); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $response = $this->client->send(); |
78 | 78 | if ($response->getStatusCode() !== 200) { |
79 | - throw new \RuntimeException('Query failed, because ' . $response->getReasonPhrase()); |
|
79 | + throw new \RuntimeException('Query failed, because '.$response->getReasonPhrase()); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $result = $response->getBody(); |