Passed
Push — master ( 606919...d35033 )
by Maja
07:18 queued 23s
created
tests/unit/core/MockProfileSilverbullet.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * @author Zilvinas Vaira
14 14
  *
15 15
  */
16
-class MockProfileSilverbullet extends \core\ProfileSilverbullet{
16
+class MockProfileSilverbullet extends \core\ProfileSilverbullet {
17 17
     
18 18
     /**
19 19
      * 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
      * 
32 32
      * @param \core\DBConnection $databaseHandle
33 33
      */
34
-    public function __construct(\core\DBConnection $databaseHandle){
34
+    public function __construct(\core\DBConnection $databaseHandle) {
35 35
         $this->databaseHandle = $databaseHandle;
36
-        if($this->databaseHandle->exec("INSERT INTO institution (country) VALUES('LT')")){
36
+        if ($this->databaseHandle->exec("INSERT INTO institution (country) VALUES('LT')")) {
37 37
             $this->instId = $this->databaseHandle->lastID();
38 38
         }
39
-        if($this->databaseHandle->exec("INSERT INTO profile (inst_id, realm) VALUES($this->instId, 'test.realm.tst')")){
39
+        if ($this->databaseHandle->exec("INSERT INTO profile (inst_id, realm) VALUES($this->instId, 'test.realm.tst')")) {
40 40
             $this->identifier = $this->databaseHandle->lastID();
41 41
         }
42 42
         $this->attributes = array(array('name' => 'hiddenprofile:tou_accepted'));
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * 
47 47
      */
48
-    public function delete(){
48
+    public function delete() {
49 49
         $this->databaseHandle->exec("DELETE FROM `institution` WHERE `inst_id`='" . $this->instId . "'");
50 50
         $this->databaseHandle->exec("DELETE FROM `profile` WHERE `profile_id`='" . $this->identifier . "'");
51 51
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * {@inheritDoc}
56 56
      * @see \core\ProfileSilverbullet::generateCertificate()
57 57
      */
58
-    public function generateCertificate($serial, $cn){
58
+    public function generateCertificate($serial, $cn) {
59 59
         $this->generatedCertificates[$serial] = $cn;
60 60
     }
61 61
     
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
      * {@inheritDoc}
65 65
      * @see \core\ProfileSilverbullet::revokeCertificate()
66 66
      */
67
-    public function revokeCertificate($serial){
68
-        if(isset($this->generatedCertificates[$serial])){
67
+    public function revokeCertificate($serial) {
68
+        if (isset($this->generatedCertificates[$serial])) {
69 69
             unset($this->generatedCertificates[$serial]);
70 70
             $nowSql = (new \DateTime())->format("Y-m-d H:i:s");
71 71
             $this->databaseHandle->exec("UPDATE silverbullet_certificate SET revocation_status = 'REVOKED', revocation_time = ? WHERE serial_number = ?", "si", $nowSql, $serial);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param string $cn
79 79
      * @return boolean
80 80
      */
81
-    public function isGeneratedCertificate($serial, $cn){
82
-        return isset($this->generatedCertificates[$serial]) && $this->generatedCertificates[$serial]==$cn;
81
+    public function isGeneratedCertificate($serial, $cn) {
82
+        return isset($this->generatedCertificates[$serial]) && $this->generatedCertificates[$serial] == $cn;
83 83
     }
84 84
 }
Please login to merge, or discard this patch.
web/skins/classic/resources/css/cat.css.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 body {
21
-    background: <?php echo $colour1;?>;
21
+    background: <?php echo $colour1; ?>;
22 22
     color: #000000;
23 23
     font-family:Verdana, Arial, Helvetica, sans-serif;
24 24
     font-size:11px;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 button {
36
-    background: <?php echo $colour2;?>; 
36
+    background: <?php echo $colour2; ?>; 
37 37
     color: #FFFFFF; 
38 38
     min-height: 23px;
39 39
     border-left-style: outset; 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
     border-bottom-style:solid;
216 216
     border-top-width:5px; 
217 217
     border-bottom-width:5px; 
218
-    border-color: <?php echo $colour1;?>;
218
+    border-color: <?php echo $colour1; ?>;
219 219
     padding-left:30px;
220
-    color: <?php echo $colour2;?>;
220
+    color: <?php echo $colour2; ?>;
221 221
 }
222 222
 
223 223
 div.pagecontent {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 
411 411
 span.edu_cat {
412 412
     font-weight: bold;
413
-    color: <?php echo $colour2;?>;
413
+    color: <?php echo $colour2; ?>;
414 414
 }
415 415
 
416 416
 span.tooltip {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     border-bottom-style:solid;
524 524
     border-top-width:5px; 
525 525
     border-bottom-width:5px; 
526
-    border-color: <?php echo $colour1;?>; 
526
+    border-color: <?php echo $colour1; ?>; 
527 527
     padding-left:30px;
528 528
 }
529 529
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 }
578 578
 
579 579
 span.redirect_link {
580
-    background: <?php echo $colour2;?>; color: #FFFFFF; height: 23px;
580
+    background: <?php echo $colour2; ?>; color: #FFFFFF; height: 23px;
581 581
     border-left-style: inset; border-left-width: 1px; border-left-color: #8bbacb;
582 582
     border-top-style: inset; border-top-width: 1px; border-top-color: #8bbacb;
583 583
     border-right-style: outset; border-right-width: 2px; border-right-color: #043d52;
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 }
625 625
 
626 626
 #close_button {
627
-    background: <?php echo $colour2;?>; 
627
+    background: <?php echo $colour2; ?>; 
628 628
     color: #FFFFFF; 
629 629
     height: 23px;
630 630
     border-left-style: inset; 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
     width: 30em; 
706 706
     padding-left: 10px; 
707 707
     padding-right: 0px; 
708
-    background: <?php echo $colour2;?>; 
708
+    background: <?php echo $colour2; ?>; 
709 709
     color: white; 
710 710
     box-shadow: 10px 10px 5px #888888;
711 711
 }
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
     width: 30em; 
715 715
     padding-left: 10px; 
716 716
     padding-right: 00px; 
717
-    background: <?php echo $colour2;?>; 
717
+    background: <?php echo $colour2; ?>; 
718 718
     color: #FFFFFF; 
719 719
     box-shadow: 10px 10px 5px #888888;
720 720
 }
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
     padding-top: 4px; 
763 763
     padding-bottom: 12px; 
764 764
     padding-left: 30px; 
765
-    background: <?php echo $colour1;?>; 
765
+    background: <?php echo $colour1; ?>; 
766 766
     text-align: left; 
767 767
     text-shadow: 10px 10px 5px #888888;
768 768
 }
@@ -772,9 +772,9 @@  discard block
 block discarded – undo
772 772
     border-bottom-style:solid;
773 773
     border-top-width:5px;
774 774
     border-bottom-width:5px;
775
-    border-color: <?php echo $colour1;?>;
775
+    border-color: <?php echo $colour1; ?>;
776 776
     padding-left:30px;
777
-    color: <?php echo $colour2;?>;
777
+    color: <?php echo $colour2; ?>;
778 778
 }
779 779
 
780 780
 #heading h1 { 
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
     text-align: justify;
794 794
     border-bottom-style:solid;
795 795
     border-bottom-width:5px;
796
-    border-color: <?php echo $colour1;?>;
796
+    border-color: <?php echo $colour1; ?>;
797 797
     font-size: 11px;
798 798
     font-weight: normal;
799 799
 }
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 
842 842
 #faq {
843 843
     padding: 20px;
844
-    color: <?php echo $colour2;?>;
844
+    color: <?php echo $colour2; ?>;
845 845
     background: #ffffff;
846 846
 }
847 847
 
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 
895 895
 #line1 {
896 896
     top:145px;
897
-    color: <?php echo $colour2;?>;
897
+    color: <?php echo $colour2; ?>;
898 898
     font-size:20px;
899 899
 }
900 900
 
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 
950 950
 #menu_column {
951 951
     border-right:solid;
952
-    border-color: <?php echo $colour1;?>;
952
+    border-color: <?php echo $colour1; ?>;
953 953
     border-width:5px;
954 954
     min-height:400px;
955 955
     padding-left: 10px;
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 
961 961
 #front_page_leftmenu {
962 962
     border-right:solid; 
963
-    border-color: <?php echo $colour1;?>; 
963
+    border-color: <?php echo $colour1; ?>; 
964 964
     border-width:5px; 
965 965
     min-height:400px; 
966 966
     padding-left: 10px; 
@@ -989,11 +989,11 @@  discard block
 block discarded – undo
989 989
 }
990 990
 
991 991
 a:link {
992
-    color:<?php echo $colour2;?>;
992
+    color:<?php echo $colour2; ?>;
993 993
 }
994 994
 
995 995
 a:visited {
996
-    color:<?php echo $colour2;?>;
996
+    color:<?php echo $colour2; ?>;
997 997
 }
998 998
 
999 999
 a:hover {
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 }
1002 1002
 
1003 1003
 a:active {
1004
-    color:<?php echo $colour2;?>;
1004
+    color:<?php echo $colour2; ?>;
1005 1005
 }
1006 1006
 
1007 1007
 .comment {
Please login to merge, or discard this patch.
web/basic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 // ... unless overwritten by direct GET/POST parameter in the request
28 28
 // ... with last resort being the default skin (first one in the configured skin list is the default)
29 29
 
30
-$skinObject = new \web\lib\user\Skinjob( $_REQUEST['skin'] ?? $fedskin[0] ?? CONFIG['APPEARANCE']['skins'][0]);
30
+$skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $fedskin[0] ?? CONFIG['APPEARANCE']['skins'][0]);
31 31
 
32 32
 // and now, serve actual data
33
-include("skins/".$skinObject->skin."/basic.php");
34 33
\ No newline at end of file
34
+include("skins/" . $skinObject->skin . "/basic.php");
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
web/404.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
29 29
     <div id="heading">
30 30
         <?php
31
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
32
-        print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp' ) . '</div>';
31
+        print '<img src="' . dirname($_SERVER['SCRIPT_NAME']) . '/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
32
+        print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp') . '</div>';
33 33
         print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']) . '</h1>
34 34
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . CONFIG['APPEARANCE']['productname_long'] . '</h2>';
35 35
         echo '<table id="lang_select"><tr><td>';
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         ?>
44 44
     </div> <!-- id="heading" -->
45 45
     <div id="main_body" style='padding:20px;'>
46
-        <h1><?php echo _("This is not the CAT you are looking for.");?></h1>
47
-        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number");?></p>
46
+        <h1><?php echo _("This is not the CAT you are looking for."); ?></h1>
47
+        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number"); ?></p>
48 48
         <h2>404</h2>
49
-        <p><?php echo sprintf(_("staring at you. Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang());?></p>
49
+        <p><?php echo sprintf(_("staring at you. Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang()); ?></p>
50 50
     </div> <!-- id="main_body" -->
51 51
 
52 52
         <?php echo $deco->footer();
Please login to merge, or discard this patch.
web/skins/example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  */
10 10
 ?>
11 11
 <h1>Example Skin (main user frontpage)</h1>
12
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
12
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
13 13
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
14 14
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
15
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
15
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
Please login to merge, or discard this patch.
web/skins/example/accountstatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
  *******************************************************************************
9 9
  */
10 10
 ?>
11
-<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</h1>
12
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
11
+<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</h1>
12
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
13 13
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
14 14
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
15
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
16
-<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p>
15
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
16
+<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p>
17 17
 <pre>
18
-    <?php print_r($statusInfo);?>
18
+    <?php print_r($statusInfo); ?>
19 19
 </pre>
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
web/skins/classic/user/js/roll.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,12 +128,12 @@
 block discarded – undo
128 128
  */
129 129
 ?>
130 130
 
131
-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);
132
-var mac = new OS('<?php echo _("Apple OS X")?>','10.7+',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-mac-english-h234.png");?>",true);
133
-var android = new OS('<?php echo _("Android")?>','<?php echo _("4.3+") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-android-english-h234.png");?>",false);
134
-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);
135
-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);
136
-var chromeos = new OS('<?php echo _("Chrome OS")?>','',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES","screenshots/sampleinstaller-chromeos-english-h234.png");?>",false);
131
+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);
132
+var mac = new OS('<?php echo _("Apple OS X")?>','10.7+',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-mac-english-h234.png"); ?>",true);
133
+var android = new OS('<?php echo _("Android")?>','<?php echo _("4.3+") ?>',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-android-english-h234.png"); ?>",false);
134
+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);
135
+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);
136
+var chromeos = new OS('<?php echo _("Chrome OS")?>','',"<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "screenshots/sampleinstaller-chromeos-english-h234.png"); ?>",false);
137 137
 
138 138
 
139 139
 
Please login to merge, or discard this patch.
web/lib/common/InputValidation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
      */
135 135
     public function string($input, $allowWhitespace = FALSE) {
136 136
     // always chop out invalid characters, and surrounding whitespace
137
-    $retvalStep0 =  iconv("UTF-8", "UTF-8//TRANSLIT", $input);
137
+    $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input);
138 138
     if ($retvalStep0 === FALSE) {
139 139
         throw new Exception("iconv failure for string sanitisation. With TRANSLIT, this should never happen!");
140 140
     }
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
                 // deployment status; need to dive into profiles for this
198 198
                 // show happy eyeballs if at least one profile is configured/showtime                    
199 199
                 echo "<td>";
200
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
200
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "") . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
201 201
                 echo "</td>";
202 202
                 // name
203 203
                 echo "<td>
Please login to merge, or discard this patch.