Completed
Push — develop ( 8b432d...18f015 )
by Mathias
05:26
created
module/Behat/src/SummaryFormContext.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 		$name = Inflector::camelize($name);
40 40
 		$type = $this->elementMap[$name];
41 41
 		$locator = $type.' .sf-summary .sf-controls button';
42
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
43
-		if(!$element){
42
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
43
+		if (!$element) {
44 44
 			throw new \Exception('No element found with this locator: "'.$locator.'"');
45 45
 		}
46 46
 		$element->click();
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
 	{
71 71
 		$type = Inflector::camelize($type);
72 72
 		$method = 'iSave'.$type;
73
-		if(method_exists($this,$method)){
74
-			call_user_func([$this,$method]);
75
-		}else{
73
+		if (method_exists($this, $method)) {
74
+			call_user_func([$this, $method]);
75
+		} else {
76 76
 			$locator = $this->elementMap[$type].'-buttons-submit';
77 77
 			$this->coreContext->scrollIntoView($locator);
78
-			$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
78
+			$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
79 79
 			$element->click();
80 80
 		}
81 81
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		$locator = '#nameForm-buttons-submit';
86 86
 		$this->coreContext->scrollIntoView($locator);
87
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
87
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
88 88
 		$element->click();
89 89
 	}
90 90
 	
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	public function iSaveWorkflow()
95 95
 	{
96 96
 		$locator = '#workflowSettings-buttons-submit';
97
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
97
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
98 98
 		$element->click();
99 99
 	}
100 100
 	
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	{
103 103
 		$locator = '#locationForm-buttons-submit';
104 104
 		$this->coreContext->scrollIntoView($locator);
105
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
105
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
106 106
 		$element->click();
107 107
 	}
108 108
 	
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	{
112 112
 		$locator = '#general-classifications-buttons-submit';
113 113
 		$this->coreContext->scrollIntoView($locator);
114
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
114
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
115 115
 		$element->click();
116 116
 	}
117 117
 	
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		$locator = '#general-customerNote-buttons-submit';
121 121
 		$this->coreContext->scrollIntoView('#sf-general-customerNote');
122
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
122
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
123 123
 		$element->click();
124 124
 	}
125 125
 	
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@  discard block
 block discarded – undo
11 11
 
12 12
 date_default_timezone_set('Europe/Berlin');
13 13
 
14
-if(!version_compare(PHP_VERSION, '5.6.0', 'ge')){
15
-    echo sprintf('<p>Sorry, YAWIK requires at least PHP 5.6.0 to run, but this server currently provides PHP %s</p>',PHP_VERSION);
14
+if (!version_compare(PHP_VERSION, '5.6.0', 'ge')) {
15
+    echo sprintf('<p>Sorry, YAWIK requires at least PHP 5.6.0 to run, but this server currently provides PHP %s</p>', PHP_VERSION);
16 16
     echo '<p>Please ask your servers\' administrator to install the proper PHP version.</p>';
17 17
     exit;
18 18
 }
19 19
 
20 20
 if (php_sapi_name() == 'cli-server') {
21 21
     $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1));
22
-    $route = isset($parseUrl['path']) ? $parseUrl['path']:null;
23
-    if (is_file(__DIR__ . '/' . $route)) {
24
-        if(substr($route, -4) == ".php"){
25
-            require __DIR__ . '/' . $route;     // Include requested script files
22
+    $route = isset($parseUrl['path']) ? $parseUrl['path'] : null;
23
+    if (is_file(__DIR__.'/'.$route)) {
24
+        if (substr($route, -4) == ".php") {
25
+            require __DIR__.'/'.$route; // Include requested script files
26 26
             exit;
27 27
         }
28
-        return false;           // Serve file as is
28
+        return false; // Serve file as is
29 29
     } else {                    // Fallback to index.php
30
-        $_GET["q"] = $route;    // Try to emulate the behaviour of a .htaccess here.
30
+        $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here.
31 31
     }
32 32
 }
33 33
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 } else {
48 48
     echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>';
49 49
     echo '<p>Please try to install the dependencies via: </p>';
50
-    echo '<code>cd '. realpath('.') .'<br>./install.sh</code>';
51
-    echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>';
50
+    echo '<code>cd '.realpath('.').'<br>./install.sh</code>';
51
+    echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>';
52 52
     exit;
53 53
 }
54 54
 
Please login to merge, or discard this patch.
module/Behat/src/InstallContext.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function __construct()
33 33
     {
34
-        static::$configFile = getcwd() . '/config/autoload/install.module.php';
35
-        static::$yawikGlobalConfig = getcwd() . '/config/autoload/yawik.config.global.php';
34
+        static::$configFile = getcwd().'/config/autoload/install.module.php';
35
+        static::$yawikGlobalConfig = getcwd().'/config/autoload/yawik.config.global.php';
36 36
         static::$yawikBackupConfig = str_replace('yawik.config.global.php', 'yawik.backup', static::$yawikGlobalConfig);
37 37
     }
38 38
 
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
     public function iHaveInstallModuleActivated()
43 43
     {
44 44
         $target = static::$configFile;
45
-        if(!file_exists($target)){
45
+        if (!file_exists($target)) {
46 46
             $source = __DIR__.'/../resources/install.module.php';
47
-            copy($source,$target);
48
-            chmod($target,0777);
47
+            copy($source, $target);
48
+            chmod($target, 0777);
49 49
         }
50 50
 
51 51
         // backup existing file
52 52
         $yawikBackupConfig = static::$yawikBackupConfig;
53 53
         $yawikGlobalConfig = static::$yawikGlobalConfig;
54 54
 
55
-        if(is_file($yawikGlobalConfig)){
56
-            rename($yawikGlobalConfig,$yawikBackupConfig);
55
+        if (is_file($yawikGlobalConfig)) {
56
+            rename($yawikGlobalConfig, $yawikBackupConfig);
57 57
         }
58 58
     }
59 59
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     static public function restoreConfig()
94 94
     {
95
-        if(is_file($file = static::$configFile)){
95
+        if (is_file($file = static::$configFile)) {
96 96
             unlink($file);
97 97
         }
98 98
 
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
         $yawikBackupConfig = static::$yawikBackupConfig;
101 101
         $yawikGlobalConfig = static::$yawikGlobalConfig;
102 102
 
103
-        if(is_file($yawikBackupConfig)){
104
-            rename($yawikBackupConfig,$yawikGlobalConfig);
103
+        if (is_file($yawikBackupConfig)) {
104
+            rename($yawikBackupConfig, $yawikGlobalConfig);
105 105
         }
106 106
     }
107 107
 
@@ -112,6 +112,6 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $config = $this->getService('config');
114 114
         $connection = $config['doctrine']['connection']['odm_default']['connectionString'];
115
-        $this->minkContext->fillField('db_conn',$connection);
115
+        $this->minkContext->fillField('db_conn', $connection);
116 116
     }
117 117
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Service/NotificationFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@
 block discarded – undo
31 31
      * @param array|null            $options
32 32
      * @return Notification
33 33
      */
34
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
34
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
35 35
 	{
36 36
 		$pluginManager = $container->get('ControllerPluginManager');
37 37
 		$flashMessenger = $pluginManager->get('FlashMessenger');
38 38
 		$translator = $container->get('translator');
39 39
 		
40 40
 		$notificationListener = $container->get('Core/Listener/Notification');
41
-		$notification   = new Notification($flashMessenger);
41
+		$notification = new Notification($flashMessenger);
42 42
 		$notification->setListener($notificationListener);
43 43
 		$notification->setTranslator($translator);
44 44
 		
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/ContentCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                       $response = new ViewModel(array('target' => $target));
87 87
                       $response->setTemplate($template);
88 88
             }
89
-            $viewModel->addChild($response, $this->_captureTo . $i);
89
+            $viewModel->addChild($response, $this->_captureTo.$i);
90 90
         }
91 91
                 
92 92
         return $viewModel;
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Mail.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -153,18 +153,18 @@  discard block
 block discarded – undo
153 153
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
154 154
         
155 155
         return str_pad($template, 30)
156
-                . 'to: ' . str_pad($to, 50)
157
-                . 'cc: ' . str_pad($cc, 50)
158
-                . 'bcc: ' . str_pad($bcc, 50)
159
-                . 'from: ' . str_pad($from, 50)
160
-                . 'replyTo: ' . str_pad($replyTo, 50)
156
+                . 'to: '.str_pad($to, 50)
157
+                . 'cc: '.str_pad($cc, 50)
158
+                . 'bcc: '.str_pad($bcc, 50)
159
+                . 'from: '.str_pad($from, 50)
160
+                . 'replyTo: '.str_pad($replyTo, 50)
161 161
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
162
-                . 'subject: ' . str_pad($this->getSubject(), 50);
162
+                . 'subject: '.str_pad($this->getSubject(), 50);
163 163
     }
164 164
     
165 165
     public function template($template)
166 166
     {
167
-        $controller =  get_class($this->controller);
167
+        $controller = get_class($this->controller);
168 168
         
169 169
         $event = new Event();
170 170
         $eventManager = $this->eventManager;
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
182 182
         $viewResolver = $this->viewResolver;
183 183
                 
184
-        $templateHalf = 'mail/' . $template;
184
+        $templateHalf = 'mail/'.$template;
185 185
         $resource = $viewResolver->resolve($templateHalf);
186 186
         
187 187
         if (empty($resource)) {
188
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
188
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
189 189
             $resource = $viewResolver->resolve($templateFull);
190 190
         }
191 191
         
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                     unset($__vars[$key]);
213 213
                 }
214 214
             }
215
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
215
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
216 216
             $this->config = $__vars;
217 217
         }
218 218
     }
@@ -237,20 +237,20 @@  discard block
 block discarded – undo
237 237
         if (isset($this->config['from'])) {
238 238
             $from = $this->config['from'];
239 239
         } else {
240
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
241
-            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
240
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
241
+            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
242 242
         }
243 243
         if (isset($this->config['fromName'])) {
244 244
             $fromName = $this->config['fromName'];
245 245
         } else {
246
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
247
-            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
246
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
247
+            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
248 248
         }
249 249
         if (isset($this->config['subject'])) {
250 250
             $subject = $this->config['subject'];
251 251
         } else {
252
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
253
-            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
252
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
253
+            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
254 254
         }
255 255
         $this->setFrom($from, $fromName);
256 256
         $this->setSubject($subject);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
             $erg = true;
272 272
             $log->info($this);
273 273
         } catch (\Exception $e) {
274
-            $log->err('Mail failure ' . $e->getMessage());
274
+            $log->err('Mail failure '.$e->getMessage());
275 275
         }
276 276
         return $erg;
277 277
     }
@@ -288,6 +288,6 @@  discard block
 block discarded – undo
288 288
         $viewResolver   = $container->get('ViewResolver');
289 289
         $eventManager   = $container->get('EventManager');
290 290
         $moduleManager  = $container->get('ModuleManager');
291
-        return new static($mailLog,$viewResolver,$eventManager,$moduleManager);
291
+        return new static($mailLog, $viewResolver, $eventManager, $moduleManager);
292 292
     }
293 293
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/ConfigFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  */
14 14
 class ConfigFactory implements FactoryInterface
15 15
 {
16
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
16
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17 17
 	{
18 18
 		$config = $container->get('Config');
19 19
 		$plugin = new Config($config);
Please login to merge, or discard this patch.
module/Core/Module.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function getConsoleBanner(Console $console)
42 42
     {
43 43
         $version = `git describe 2>/dev/null`;
44
-        $name = 'YAWIK ' . trim($version);
44
+        $name = 'YAWIK '.trim($version);
45 45
         $width = $console->getWidth();
46 46
         return sprintf(
47 47
             "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n",
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             /* @var \Core\Options\ModuleOptions $options */
86 86
             $languageRouteListener = new LanguageRouteListener(
87
-                $sm->get('Core/Locale'),$sm->get('Core/Options')
87
+                $sm->get('Core/Locale'), $sm->get('Core/Options')
88 88
             );
89 89
             $languageRouteListener->attach($eventManager);
90 90
         
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 
114 114
         $eventManager->attach(
115 115
             MvcEvent::EVENT_DISPATCH_ERROR,
116
-            function ($event) {
117
-            	if($event instanceof MvcEvent){
116
+            function($event) {
117
+            	if ($event instanceof MvcEvent) {
118 118
 		            $application = $event->getApplication();
119 119
 		            
120 120
 		            if ($application::ERROR_EXCEPTION == $event->getError()) {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         );
130 130
         $eventManager->attach(
131 131
             MvcEvent::EVENT_DISPATCH,
132
-            function ($event) use ($eventManager) {
132
+            function($event) use ($eventManager) {
133 133
                 $eventManager->trigger('postDispatch', $event);
134 134
             },
135 135
             -150
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getConfig()
146 146
     {
147
-        $config = include __DIR__ . '/config/module.config.php';
147
+        $config = include __DIR__.'/config/module.config.php';
148 148
         return $config;
149 149
     }
150 150
 
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
     {
158 158
         return array(
159 159
             'Zend\Loader\ClassMapAutoloader' => [
160
-                __DIR__ . '/src/autoload_classmap.php'
160
+                __DIR__.'/src/autoload_classmap.php'
161 161
             ],
162 162
             'Zend\Loader\StandardAutoloader' => array(
163 163
                 'namespaces' => array(
164
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
165
-                    'CoreTest' => __DIR__ . '/test/' . 'CoreTest',
166
-                    'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils',
164
+                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
165
+                    'CoreTest' => __DIR__.'/test/'.'CoreTest',
166
+                    'CoreTestUtils' => __DIR__.'/test/CoreTestUtils',
167 167
                 ),
168 168
             ),
169 169
         );
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/LanguageRouteListener.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
         }
125 125
         
126 126
         $router = $e->getRouter();
127
-        $basePath=$router->getBaseUrl();
127
+        $basePath = $router->getBaseUrl();
128 128
         $match = [];
129 129
         
130
-        if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
130
+        if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
131 131
             /* It seems we have already a language in the URI
132 132
              * Now there are two possibilities:
133 133
              *
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $options = $this->moduleOptions;
163 163
         // using default language if detect language is disabled
164
-        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e):$options->getDefaultLanguage();
164
+        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e) : $options->getDefaultLanguage();
165 165
         $langUri = rtrim("$basePath/$lang$origUri", '/');
166 166
         if ($router->match($request->setUri($langUri)) instanceof RouteMatch) {
167 167
             $e->stopPropagation(true);
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
         setlocale(
213 213
             LC_ALL,
214 214
             array(
215
-            $locale . ".utf8",
216
-            $locale . ".iso88591",
215
+            $locale.".utf8",
216
+            $locale.".iso88591",
217 217
             $locale,
218 218
             substr($locale, 0, 2),
219 219
             'de_DE.utf8',
Please login to merge, or discard this patch.