Passed
Push — master ( 25bb9e...ffc196 )
by Tomasz
03:13
created
core/diag/RFC6614Tests.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
     }
247 247
 
248 248
         /**
249
-     * This function parses a X.509 cert and returns all certificatePolicies OIDs
250
-     * 
251
-     * @param array $cert (returned from openssl_x509_parse) 
252
-     * @return array of OIDs
253
-     */
249
+         * This function parses a X.509 cert and returns all certificatePolicies OIDs
250
+         * 
251
+         * @param array $cert (returned from openssl_x509_parse) 
252
+         * @return array of OIDs
253
+         */
254 254
     private function propertyCheckPolicy($cert) {
255 255
         $oids = [];
256 256
         if ($cert['extensions']['certificatePolicies']) {
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
         return $oids;
264 264
     }
265 265
         /**
266
-     * This function parses a X.509 cert and returns the value of $field
267
-     * 
268
-     * @param array $cert (returned from openssl_x509_parse) 
269
-     * @return string value of the issuer field or ''
270
-     */
266
+         * This function parses a X.509 cert and returns the value of $field
267
+         * 
268
+         * @param array $cert (returned from openssl_x509_parse) 
269
+         * @return string value of the issuer field or ''
270
+         */
271 271
     private function getCertificateIssuer($cert) {
272 272
         $issuer = '';
273 273
         foreach ($cert['issuer'] as $key => $val) {
Please login to merge, or discard this patch.
web/lib/admin/http/DefaultContext.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @param AbstractPage $page
29 29
      */
30
-    public function __construct($page){
30
+    public function __construct($page) {
31 31
         $this->page = $page;
32 32
         $this->session = SessionStorage::getInstance('sb-messages');
33 33
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return AbstractPage
38 38
      */
39
-    public function getPage(){
39
+    public function getPage() {
40 40
         return $this->page;
41 41
     }
42 42
     
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return \web\lib\admin\storage\SessionStorage
47 47
      */
48
-    public function getSession(){
48
+    public function getSession() {
49 49
         return $this->session;
50 50
     }
51 51
     
Please login to merge, or discard this patch.
web/lib/admin/http/AbstractAjaxCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @author Zilvinas Vaira
11 11
  *
12 12
  */
13
-abstract class AbstractAjaxCommand extends AbstractCommand{
13
+abstract class AbstractAjaxCommand extends AbstractCommand {
14 14
     
15 15
     /**
16 16
      *
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param string $commandToken
24 24
      * @param DefaultContext $context
25 25
      */
26
-    public function __construct($commandToken, $context){
26
+    public function __construct($commandToken, $context) {
27 27
         parent::__construct($commandToken);
28 28
         $this->page = $context->getPage();
29 29
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * 
33 33
      * @param HtmlElementInterface $element
34 34
      */
35
-    public function publish($element){
35
+    public function publish($element) {
36 36
         $this->page->appendHtmlElement(DefaultAjaxPage::SECTION_RESPONSE, $element);
37 37
     }
38 38
     
Please login to merge, or discard this patch.
web/lib/admin/http/Message.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * 
42 42
      * @return string
43 43
      */
44
-    public function getText(){
44
+    public function getText() {
45 45
         return $this->text;
46 46
     }
47 47
     
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param string $prefix
51 51
      * @return string
52 52
      */
53
-    public function getClass($prefix = ''){
53
+    public function getClass($prefix = '') {
54 54
         return $prefix . '-' . $this->level;
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
web/lib/admin/http/AbstractInvokerCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @author Zilvinas Vaira
8 8
  *
9 9
  */
10
-abstract class AbstractInvokerCommand extends AbstractCommand implements MessageInvokerInterface{
10
+abstract class AbstractInvokerCommand extends AbstractCommand implements MessageInvokerInterface {
11 11
 
12 12
     /**
13 13
      *
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * {@inheritDoc}
31 31
      * @see \lib\http\MessageInvokerInterface::storeErrorMessage()
32 32
      */
33
-    public function storeErrorMessage($text){
33
+    public function storeErrorMessage($text) {
34 34
         $this->session->add($this->commandToken, new Message($text, Message::ERROR));
35 35
     }
36 36
     
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * {@inheritDoc}
40 40
      * @see \lib\http\MessageInvokerInterface::storeInfoMessage()
41 41
      */
42
-    public function storeInfoMessage($text){
42
+    public function storeInfoMessage($text) {
43 43
         $this->session->add($this->commandToken, new Message($text, Message::INFO));
44 44
     }
45 45
     
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * {@inheritDoc}
49 49
      * @see \lib\http\MessageInvokerInterface::publishMessages()
50 50
      */
51
-    public function publishMessages($receiver){
51
+    public function publishMessages($receiver) {
52 52
         $messages = $this->session->get($this->commandToken);
53 53
         foreach ($messages as $message) {
54 54
             $receiver->receiveMessage($message);
Please login to merge, or discard this patch.
web/lib/admin/http/SilverbulletAjaxController.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
     protected function doCreateCommand($commandToken) {
34 34
         if($commandToken == ValidateEmailAddress::COMMAND){
35 35
             return new ValidateEmailAddress($commandToken, $this->context);
36
-        }elseif($commandToken == GetTokenEmailDetails::COMMAND) {
36
+        } elseif($commandToken == GetTokenEmailDetails::COMMAND) {
37 37
             return new GetTokenEmailDetails($commandToken, $this->context);
38
-        }else {
38
+        } else {
39 39
             return new DefaultCommand($commandToken);
40 40
         }
41 41
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @author Zilvinas Vaira
9 9
  *
10 10
  */
11
-class SilverbulletAjaxController extends AbstractController{
11
+class SilverbulletAjaxController extends AbstractController {
12 12
 
13 13
     /**
14 14
      * 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @param DefaultContext $context Requires default context object.
23 23
      */
24
-    public function __construct($context){
24
+    public function __construct($context) {
25 25
         $this->context = $context;
26 26
     }
27 27
     
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
      * @see \web\lib\admin\http\AbstractController::doCreateCommand()
32 32
      */
33 33
     protected function doCreateCommand($commandToken) {
34
-        if($commandToken == ValidateEmailAddress::COMMAND){
34
+        if ($commandToken == ValidateEmailAddress::COMMAND) {
35 35
             return new ValidateEmailAddress($commandToken, $this->context);
36
-        }elseif($commandToken == GetTokenEmailDetails::COMMAND) {
36
+        }elseif ($commandToken == GetTokenEmailDetails::COMMAND) {
37 37
             return new GetTokenEmailDetails($commandToken, $this->context);
38
-        }else {
38
+        } else {
39 39
             return new DefaultCommand($commandToken);
40 40
         }
41 41
     }
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      * {@inheritDoc}
46 46
      * @see \web\lib\admin\http\AbstractController::parseRequest()
47 47
      */
48
-    public function parseRequest(){
48
+    public function parseRequest() {
49 49
         $commandToken = '';
50
-        if(isset($_REQUEST[SilverbulletAjaxController::COMMAND])){
50
+        if (isset($_REQUEST[SilverbulletAjaxController::COMMAND])) {
51 51
             $commandToken = $_REQUEST[SilverbulletAjaxController::COMMAND];
52 52
         }
53 53
         $currentCommand = $this->createCommand($commandToken);
Please login to merge, or discard this patch.
web/lib/admin/http/DeleteUserCommand.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @author Zilvinas Vaira
11 11
  *
12 12
  */
13
-class DeleteUserCommand extends AbstractInvokerCommand{
13
+class DeleteUserCommand extends AbstractInvokerCommand {
14 14
 
15 15
     const COMMAND = 'deleteuser';
16 16
     const PARAM_CONFIRMATION = 'confirmation';
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param string $commandToken
27 27
      * @param SilverbulletContext $context
28 28
      */
29
-    public function __construct($commandToken, $context){
29
+    public function __construct($commandToken, $context) {
30 30
         parent::__construct($commandToken, $context);
31 31
         $this->context = $context;
32 32
     }
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
      * {@inheritDoc}
37 37
      * @see \web\lib\admin\http\AbstractCommand::execute()
38 38
      */
39
-    public function execute(){
39
+    public function execute() {
40 40
         $userId = $this->parseInt($_POST[self::COMMAND]);
41 41
         $user = SilverbulletUser::prepare($userId);
42 42
         $user->load();
43
-        if(isset($_POST[self::PARAM_CONFIRMATION])){
43
+        if (isset($_POST[self::PARAM_CONFIRMATION])) {
44 44
             $confirmation = $this->parseString($_POST[self::PARAM_CONFIRMATION]);
45
-            if($confirmation=='true'){
45
+            if ($confirmation == 'true') {
46 46
                 $user->setDeactivated(true, $this->context->getProfile());
47 47
                 $user->save();
48
-            }else{
49
-                $this->storeInfoMessage("User '".$user->getUsername()."' deactivation has been canceled!");
48
+            } else {
49
+                $this->storeInfoMessage("User '" . $user->getUsername() . "' deactivation has been canceled!");
50 50
             }
51 51
 
52 52
             $this->context->redirectAfterSubmit();
53
-        }else{
53
+        } else {
54 54
             //Append terms of use popup
55 55
             $builder = $this->context->getBuilder();
56 56
             $dialogTitle = _('Deactivate User');
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
             if($confirmation=='true'){
46 46
                 $user->setDeactivated(true, $this->context->getProfile());
47 47
                 $user->save();
48
-            }else{
48
+            } else{
49 49
                 $this->storeInfoMessage("User '".$user->getUsername()."' deactivation has been canceled!");
50 50
             }
51 51
 
52 52
             $this->context->redirectAfterSubmit();
53
-        }else{
53
+        } else{
54 54
             //Append terms of use popup
55 55
             $builder = $this->context->getBuilder();
56 56
             $dialogTitle = _('Deactivate User');
Please login to merge, or discard this patch.
web/lib/admin/http/AbstractCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @param string $commandToken
23 23
      */
24
-    public function __construct($commandToken){
24
+    public function __construct($commandToken) {
25 25
         $this->commandToken = $commandToken;
26 26
     }
27 27
     
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param string $commandToken
31 31
      * @return boolean
32 32
      */
33
-    public function isCommand($commandToken){
33
+    public function isCommand($commandToken) {
34 34
         return ($this->commandToken == $commandToken);
35 35
     }
36 36
     
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * 
39 39
      * @return string
40 40
      */
41
-    public function getCommand(){
41
+    public function getCommand() {
42 42
         return $this->commandToken;
43 43
     }
44 44
     
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param string[] $values
48 48
      * @return string[]
49 49
      */
50
-    protected function parseArray($values){
50
+    protected function parseArray($values) {
51 51
         $r = array();
52 52
         foreach ($values as $key => $value) {
53 53
             $r[$key] = $this->parseString($value);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param string $value
61 61
      * @return string
62 62
      */
63
-    protected function parseString($value){
63
+    protected function parseString($value) {
64 64
         return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
65 65
     }
66 66
     
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param string $value
70 70
      * @return number
71 71
      */
72
-    protected function parseInt($value){
72
+    protected function parseInt($value) {
73 73
         return intval($this->parseString($value));
74 74
     }
75 75
     
Please login to merge, or discard this patch.
web/lib/admin/view/PageElementNull.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * @author Zilvinas Vaira
8 8
  *
9 9
  */
10
-class PageElementNull implements PageElementInterface{
10
+class PageElementNull implements PageElementInterface {
11 11
     
12 12
     /**
13 13
      * 
Please login to merge, or discard this patch.