Passed
Push — master ( a7425d...dd80fa )
by Tomasz
03:35
created
web/lib/admin/http/UpdateUserCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @author Zilvinas Vaira
10 10
  *
11 11
  */
12
-class UpdateUserCommand extends AbstractInvokerCommand{
12
+class UpdateUserCommand extends AbstractInvokerCommand {
13 13
 
14 14
     /**
15 15
      * Update command identifier.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param string $commandToken
30 30
      * @param SilverbulletContext $context
31 31
      */
32
-    public function __construct($commandToken, $context){
32
+    public function __construct($commandToken, $context) {
33 33
         parent::__construct($commandToken, $context);
34 34
         $this->context = $context;
35 35
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * {@inheritDoc}
40 40
      * @see \web\lib\admin\http\AbstractCommand::execute()
41 41
      */
42
-    public function execute(){
42
+    public function execute() {
43 43
         $userIndex = $this->parseInt($_POST[self::COMMAND]);
44 44
         $userIds = $this->parseArray($_POST[SaveUsersCommand::PARAM_ID]);
45 45
         $userExpiries = $this->parseArray($_POST[SaveUsersCommand::PARAM_EXPIRY]);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $user->setExpiry($userExpiry);
53 53
         $username = $user->getUsername();
54
-        if(empty($user->get(SilverbulletUser::EXPIRY))){
54
+        if (empty($user->get(SilverbulletUser::EXPIRY))) {
55 55
             $this->storeErrorMessage(sprintf(_("Expiry date was incorrect for '%s'!"), $username));
56 56
         }
57 57
         $user->save();
Please login to merge, or discard this patch.
web/lib/admin/http/RevokeCertificateCommand.php 1 patch
Spacing   +3 added lines, -3 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 RevokeCertificateCommand extends AbstractInvokerCommand{
11
+class RevokeCertificateCommand extends AbstractInvokerCommand {
12 12
 
13 13
     const COMMAND = 'revokecertificate';
14 14
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param string $commandToken
24 24
      * @param SilverbulletContext $context
25 25
      */
26
-    public function __construct($commandToken, $context){
26
+    public function __construct($commandToken, $context) {
27 27
         parent::__construct($commandToken, $context);
28 28
         $this->context = $context;
29 29
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * {@inheritDoc}
34 34
      * @see \web\lib\admin\http\AbstractCommand::execute()
35 35
      */
36
-    public function execute(){
36
+    public function execute() {
37 37
         $profile = $this->context->getProfile();
38 38
         $certificateId = $this->parseInt($_POST[self::COMMAND]);
39 39
         
Please login to merge, or discard this patch.
web/lib/admin/http/AbstractController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
      * @param string $commandToken
24 24
      * @return AbstractCommand
25 25
      */
26
-    public function createCommand($commandToken){
27
-        if(!isset($this->commands[$commandToken]) || $this->commands[$commandToken] == null){
26
+    public function createCommand($commandToken) {
27
+        if (!isset($this->commands[$commandToken]) || $this->commands[$commandToken] == null) {
28 28
             $this->commands[$commandToken] = $this->doCreateCommand($commandToken);
29 29
         }
30 30
         return $this->commands[$commandToken];
Please login to merge, or discard this patch.
web/lib/admin/http/DefaultCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  * @author Zilvinas Vaira
8 8
  *
9 9
  */
10
-class DefaultCommand extends AbstractCommand{
10
+class DefaultCommand extends AbstractCommand {
11 11
 
12 12
     /**
13 13
      * 
14 14
      * {@inheritDoc}
15 15
      * @see \web\lib\admin\http\AbstractCommand::execute()
16 16
      */
17
-    public function execute(){
17
+    public function execute() {
18 18
         
19 19
     }
20 20
 
Please login to merge, or discard this patch.
web/lib/admin/http/TermsOfUseCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @author Zilvinas Vaira
7 7
  *
8 8
  */
9
-class TermsOfUseCommand extends AbstractInvokerCommand{
9
+class TermsOfUseCommand extends AbstractInvokerCommand {
10 10
 
11 11
     const COMMAND = 'termsofuse';
12 12
     
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param string $commandToken
24 24
      * @param SilverbulletContext $context
25 25
      */
26
-    public function __construct($commandToken, $context){
26
+    public function __construct($commandToken, $context) {
27 27
         parent::__construct($commandToken, $context);
28 28
         $this->context = $context;
29 29
     }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      * {@inheritDoc}
34 34
      * @see \web\lib\admin\http\AbstractCommand::execute()
35 35
      */
36
-    public function execute(){
37
-        if(isset($_POST[self::AGREEMENT])){
36
+    public function execute() {
37
+        if (isset($_POST[self::AGREEMENT])) {
38 38
             $this->context->signAgreement();
39 39
         }
40 40
         $this->context->redirectAfterSubmit();
Please login to merge, or discard this patch.
web/lib/admin/http/SaveUsersCommand.php 1 patch
Spacing   +5 added lines, -5 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 SaveUsersCommand extends AbstractInvokerCommand{
11
+class SaveUsersCommand extends AbstractInvokerCommand {
12 12
 
13 13
     const COMMAND = 'saveusers';
14 14
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param string $commandToken
30 30
      * @param SilverbulletContext $context
31 31
      */
32
-    public function __construct($commandToken, $context){
32
+    public function __construct($commandToken, $context) {
33 33
         parent::__construct($commandToken, $context);
34 34
         $this->context = $context;
35 35
     }
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
      * {@inheritDoc}
40 40
      * @see \web\lib\admin\http\AbstractCommand::execute()
41 41
      */
42
-    public function execute(){
43
-        if(isset($_POST[self::PARAM_ID]) && isset($_POST[self::PARAM_EXPIRY])){
42
+    public function execute() {
43
+        if (isset($_POST[self::PARAM_ID]) && isset($_POST[self::PARAM_EXPIRY])) {
44 44
             $userIds = $this->parseArray($_POST[self::PARAM_ID]);
45 45
             foreach ($userIds as $key => $userId) {
46 46
                 $user = SilverbulletUser::prepare($userId);
47 47
                 $user->load();
48
-                if(isset($_POST[self::PARAM_ACKNOWLEDGE]) && $_POST[self::PARAM_ACKNOWLEDGE]=='true'){
48
+                if (isset($_POST[self::PARAM_ACKNOWLEDGE]) && $_POST[self::PARAM_ACKNOWLEDGE] == 'true') {
49 49
                     $user->makeAcknowledged();
50 50
                 }
51 51
                 $user->save();
Please login to merge, or discard this patch.
tests/unit/web/lib/admin/view/InstitutionPageBuilderTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 use web\lib\admin\view\DefaultHtmlPage;
4 4
 use web\lib\admin\view\InstitutionPageBuilder;
5 5
 
6
-class MockValidateInstitutionPageBuilder extends InstitutionPageBuilder{
6
+class MockValidateInstitutionPageBuilder extends InstitutionPageBuilder {
7 7
     
8
-    protected function validateInstitution(){
8
+    protected function validateInstitution() {
9 9
         $this->institution = $this->valid_IdP($_GET['inst_id'], $_SESSION['user']);
10 10
     }
11 11
     
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
      * @throws Exception
17 17
      * @return mixed
18 18
      */
19
-    private function valid_IdP($input, $owner){
20
-        if ($input == 1){
19
+    private function valid_IdP($input, $owner) {
20
+        if ($input == 1) {
21 21
             return new MockInstitution();
22
-        }else{
23
-            throw new Exception('IdP '.$input.' not found in database!');
22
+        } else {
23
+            throw new Exception('IdP ' . $input . ' not found in database!');
24 24
         }
25 25
     }
26 26
     
27 27
 }
28 28
 
29
-class MockInstitution{
29
+class MockInstitution {
30 30
     public $name = "Test name";
31 31
 }
32 32
 
33
-class InstitutionPageBuilderTest extends \PHPUnit_Framework_TestCase{
33
+class InstitutionPageBuilderTest extends \PHPUnit_Framework_TestCase {
34 34
     
35 35
     protected function setUp() {
36 36
         $_SESSION['user'] = "user";
37 37
     }
38 38
     
39
-    public function testConstructorSuccess(){
40
-        $_GET['inst_id']=1;
39
+    public function testConstructorSuccess() {
40
+        $_GET['inst_id'] = 1;
41 41
         $builder = new MockValidateInstitutionPageBuilder(new DefaultHtmlPage("Testing Page"));
42 42
         $this->assertTrue($builder->isReady());
43 43
     }
44 44
     
45
-    public function testConstructorFailure(){
46
-        $_GET['inst_id']=-1;
45
+    public function testConstructorFailure() {
46
+        $_GET['inst_id'] = -1;
47 47
         $builder = new MockValidateInstitutionPageBuilder(new DefaultHtmlPage("Testing Page"));
48 48
         $this->assertFalse($builder->isReady());
49 49
         
Please login to merge, or discard this patch.
web/skins/eduroam2016/user/js/roll.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@
 block discarded – undo
129 129
  */
130 130
 ?>
131 131
 
132
-var win8 = new OS('<?php echo _("MS Windows")?>', '<?php echo _("10, 8, 7, Vista") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-win8-english-h234.png")?>",true);
133
-var mac = new OS('<?php echo _("Apple OS X")?>','10.7+',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-mac-english-h234.png")?>",true);
134
-var android = new OS('<?php echo _("Android")?>','<?php echo _("4.3+") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-android-english-h234.png")?>",false);
135
-var iphone = new OS('<?php echo _("Apple iOS devices")?>','<?php echo _("iPhone, iPad, iPod touch") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-iphone-english-h234.png")?>",true);
136
-var linux = new OS('<?php echo _("Linux")?>','<?php echo _("all major distributions") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-linux-english-h234.png")?>",false);
137
-var chromeos = new OS('<?php echo _("Chrome OS")?>','',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-chromeos-english-h234.png")?>",false);
132
+var win8 = new OS('<?php echo _("MS Windows")?>', '<?php echo _("10, 8, 7, Vista") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-win8-english-h234.png")?>",true);
133
+var mac = new OS('<?php echo _("Apple OS X")?>','10.7+',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-mac-english-h234.png")?>",true);
134
+var android = new OS('<?php echo _("Android")?>','<?php echo _("4.3+") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-android-english-h234.png")?>",false);
135
+var iphone = new OS('<?php echo _("Apple iOS devices")?>','<?php echo _("iPhone, iPad, iPod touch") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-iphone-english-h234.png")?>",true);
136
+var linux = new OS('<?php echo _("Linux")?>','<?php echo _("all major distributions") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-linux-english-h234.png")?>",false);
137
+var chromeos = new OS('<?php echo _("Chrome OS")?>','',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-chromeos-english-h234.png")?>",false);
138 138
 
139 139
 
140 140
 
Please login to merge, or discard this patch.
web/skins/eduroam2016/resources/css/cat-basic.css.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
    font-size:25px;
22 22
    font-size:5vw;
23 23
    width: 100%;
24
-   background: <?php echo $colour2;?>;
24
+   background: <?php echo $colour2; ?>;
25 25
    color: #ffffff;
26 26
 }
27 27
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
    font-size:25px;
49 49
    font-size:5vw;
50 50
    width: 100%;
51
-   background: <?php echo $colour2;?>;
51
+   background: <?php echo $colour2; ?>;
52 52
    color: #ffffff;
53 53
    border-radius:10px ; 
54 54
    border-radius:2vw ; 
Please login to merge, or discard this patch.