Completed
Pull Request — master (#15)
by Semih Serhat
01:54
created
tests/Controller/SettingsControllerTest.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
  */
21 21
 namespace OCA\Security\Tests\Controller;
22 22
 
23
-use OCA\Security\Controller\SettingsController;
24
-use OCA\Security\SecurityConfig;
25
-use OCP\IRequest;
23
+use OCA\Security\Controller\SettingsController;
24
+use OCA\Security\SecurityConfig;
25
+use OCP\IRequest;
26 26
 use Test\TestCase;
27 27
 
28 28
 class SettingsControllerTest extends TestCase {
Please login to merge, or discard this patch.
tests/Db/DbServiceTest.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 
23 23
 namespace OCA\Security\Tests\Db;
24 24
 
25
-use OCA\Security\Db\DbService;
26
-use OC\AppFramework\Utility\TimeFactory;
27
-use OCP\IDBConnection;
25
+use OCA\Security\Db\DbService;
26
+use OC\AppFramework\Utility\TimeFactory;
27
+use OCP\IDBConnection;
28 28
 use Test\TestCase;
29 29
 
30 30
 /**
Please login to merge, or discard this patch.
tests/PasswordValidatorTest.php 1 patch
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  *
20 20
  */
21 21
 namespace OCA\Password_Policy\Tests;
22
-use OC\HintException;
23
-use OCA\Security\SecurityConfig;
24
-use OCA\Security\PasswordValidator;
25
-use OCP\IL10N;
22
+use OC\HintException;
23
+use OCA\Security\SecurityConfig;
24
+use OCA\Security\PasswordValidator;
25
+use OCP\IL10N;
26 26
 use Test\TestCase;
27 27
 class PasswordValidatorTest extends TestCase {
28 28
 
Please login to merge, or discard this patch.
tests/SecurityConfigTest.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  */
21 21
 namespace OCA\Security\Tests;
22 22
 
23
-use OCA\Security\SecurityConfig;
24
-use OCP\IConfig;
23
+use OCA\Security\SecurityConfig;
24
+use OCP\IConfig;
25 25
 use Test\TestCase;
26 26
 class SecurityConfigTest extends TestCase {
27 27
 	/** @var  IConfig|\PHPUnit_Framework_MockObject_MockObject */
Please login to merge, or discard this patch.
templates/settings-admin.php 1 patch
Braces   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,10 @@  discard block
 block discarded – undo
26 26
 <div id="brute-force-protection">
27 27
 	<div>
28 28
 		<input type="checkbox" class="checkbox" id="security-brute-force-protection-enabled"
29
-			<?php if ($_['isBruteForceProtectionEnabled']) p("checked");?> >
29
+			<?php if ($_['isBruteForceProtectionEnabled']) {
30
+    p("checked");
31
+}
32
+?> >
30 33
 		<label for="security-brute-force-protection-enabled"><?php p($l->t('Activate Brute Force Protection')) ?></label>
31 34
 	</div>
32 35
 </div>
@@ -41,17 +44,26 @@  discard block
 block discarded – undo
41 44
 	</div>
42 45
 	<div>
43 46
 		<input type="checkbox" class="checkbox" id="security-enforce-upper-lower-case"
44
-			<?php if ($_['isUpperLowerCaseEnforced']) p("checked");?> >
47
+			<?php if ($_['isUpperLowerCaseEnforced']) {
48
+    p("checked");
49
+}
50
+?> >
45 51
 		<label for="security-enforce-upper-lower-case"><?php p($l->t('Enforce at least one upper and one lower case character on passwords')) ?></label>
46 52
 	</div>
47 53
 	<div>
48 54
 		<input type="checkbox" class="checkbox" id="security-enforce-numerical-characters"
49
-			<?php if ($_['isNumericalCharsEnforced']) p("checked");?> >
55
+			<?php if ($_['isNumericalCharsEnforced']) {
56
+    p("checked");
57
+}
58
+?> >
50 59
 		<label for="security-enforce-numerical-characters"><?php p($l->t('Enforce at least one numerical characters on passwords')) ?></label>
51 60
 	</div>
52 61
 	<div>
53 62
 		<input type="checkbox" class="checkbox" id="security-enforce-special-characters"
54
-			<?php if ($_['isSpecialCharsEnforced']) p("checked");?> >
63
+			<?php if ($_['isSpecialCharsEnforced']) {
64
+    p("checked");
65
+}
66
+?> >
55 67
 		<label for="security-enforce-special-characters"><?php p($l->t('Enforce at least one special characters on passwords')) ?></label>
56 68
 	</div>
57 69
 </div>
58 70
\ No newline at end of file
Please login to merge, or discard this patch.
templates/settings-personal.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,11 +29,20 @@
 block discarded – undo
29 29
 	<ul class="pass-info">
30 30
 		<?php print_unescaped(
31 31
 			"<li class='pass-info-element'>". $l->t('be at least 8 characters long ', $_['minPasswordLength']). "</li>");?>
32
-		<?php if ($_['isUpperLowerCaseEnforced']) print_unescaped(
33
-			"<li class='pass-info-element'>". $l->t('contain at least one uppercase letter and at least one lowercase letter '). "</li>");?>
34
-		<?php if ($_['isNumericalCharsEnforced']) print_unescaped(
35
-			"<li class='pass-info-element'>". $l->t('contain at least one numerical character'). "</li>");?>
36
-		<?php if ($_['isSpecialCharsEnforced']) print_unescaped(
37
-			"<li class='pass-info-element'>". $l->t('contain at least one special character'). "</li>");?>
32
+		<?php if ($_['isUpperLowerCaseEnforced']) {
33
+    print_unescaped(
34
+			"<li class='pass-info-element'>". $l->t('contain at least one uppercase letter and at least one lowercase letter '). "</li>");
35
+}
36
+?>
37
+		<?php if ($_['isNumericalCharsEnforced']) {
38
+    print_unescaped(
39
+			"<li class='pass-info-element'>". $l->t('contain at least one numerical character'). "</li>");
40
+}
41
+?>
42
+		<?php if ($_['isSpecialCharsEnforced']) {
43
+    print_unescaped(
44
+			"<li class='pass-info-element'>". $l->t('contain at least one special character'). "</li>");
45
+}
46
+?>
38 47
 	</ul>
39 48
 </div>
Please login to merge, or discard this patch.