@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $xml = new \DOMDocument(); |
50 | - $xml->load($appPath . '/appinfo/info.xml'); |
|
50 | + $xml->load($appPath.'/appinfo/info.xml'); |
|
51 | 51 | |
52 | - $schema = \OC::$SERVERROOT . '/resources/app-info.xsd'; |
|
52 | + $schema = \OC::$SERVERROOT.'/resources/app-info.xsd'; |
|
53 | 53 | try { |
54 | 54 | if ($this->isShipped($appId)) { |
55 | 55 | // Shipped apps are allowed to have the public and default_enabled tags |
56 | - $schema = \OC::$SERVERROOT . '/resources/app-info-shipped.xsd'; |
|
56 | + $schema = \OC::$SERVERROOT.'/resources/app-info-shipped.xsd'; |
|
57 | 57 | } |
58 | 58 | } catch (\Exception $e) { |
59 | 59 | // Assume it is not shipped |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function loadShippedJson() { |
100 | 100 | if ($this->shippedApps === null) { |
101 | - $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; |
|
101 | + $shippedJson = \OC::$SERVERROOT.'/core/shipped.json'; |
|
102 | 102 | if (!file_exists($shippedJson)) { |
103 | 103 | throw new \Exception("File not found: $shippedJson"); |
104 | 104 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | use OC\App\CodeChecker\DeprecationCheck; |
43 | 43 | use OC\App\CodeChecker\PrivateCheck; |
44 | 44 | |
45 | -class CheckCode extends Command implements CompletionAwareInterface { |
|
45 | +class CheckCode extends Command implements CompletionAwareInterface { |
|
46 | 46 | |
47 | 47 | protected $checkers = [ |
48 | 48 | 'private' => PrivateCheck::class, |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'c', |
65 | 65 | InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
66 | 66 | 'enable the specified checker(s)', |
67 | - [ 'private', 'deprecation', 'strong-comparison' ] |
|
67 | + ['private', 'deprecation', 'strong-comparison'] |
|
68 | 68 | ) |
69 | 69 | ->addOption( |
70 | 70 | '--skip-checkers', |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $codeChecker = new CodeChecker($checkList, !$input->getOption('skip-validate-info')); |
96 | 96 | |
97 | 97 | $codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) { |
98 | - if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
98 | + if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
99 | 99 | $output->writeln("<info>Analysing {$params}</info>"); |
100 | 100 | } |
101 | 101 | }); |
@@ -103,29 +103,29 @@ discard block |
||
103 | 103 | $count = count($errors); |
104 | 104 | |
105 | 105 | // show filename if the verbosity is low, but there are errors in a file |
106 | - if($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { |
|
106 | + if ($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { |
|
107 | 107 | $output->writeln("<info>Analysing {$filename}</info>"); |
108 | 108 | } |
109 | 109 | |
110 | 110 | // show error count if there are errors present or the verbosity is high |
111 | - if($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
111 | + if ($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
112 | 112 | $output->writeln(" {$count} errors"); |
113 | 113 | } |
114 | 114 | usort($errors, function($a, $b) { |
115 | - return $a['line'] >$b['line']; |
|
115 | + return $a['line'] > $b['line']; |
|
116 | 116 | }); |
117 | 117 | |
118 | - foreach($errors as $p) { |
|
118 | + foreach ($errors as $p) { |
|
119 | 119 | $line = sprintf("%' 4d", $p['line']); |
120 | 120 | $output->writeln(" <error>line $line: {$p['disallowedToken']} - {$p['reason']}</error>"); |
121 | 121 | } |
122 | 122 | }); |
123 | 123 | $errors = []; |
124 | - if(!$input->getOption('skip-checkers')) { |
|
124 | + if (!$input->getOption('skip-checkers')) { |
|
125 | 125 | $errors = $codeChecker->analyse($appId); |
126 | 126 | } |
127 | 127 | |
128 | - if(!$input->getOption('skip-validate-info')) { |
|
128 | + if (!$input->getOption('skip-validate-info')) { |
|
129 | 129 | $infoChecker = new InfoChecker(); |
130 | 130 | $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { |
131 | 131 | $output->writeln("<error>Invalid appinfo.xml file found: $error</error>"); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | throw new \RuntimeException("No app with given id <$appId> known."); |
179 | 179 | } |
180 | 180 | |
181 | - $updatePhp = $appPath . '/appinfo/update.php'; |
|
181 | + $updatePhp = $appPath.'/appinfo/update.php'; |
|
182 | 182 | if (file_exists($updatePhp)) { |
183 | 183 | $output->writeln("<info>Deprecated file found: $updatePhp - please use repair steps</info>"); |
184 | 184 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $appId = $input->getArgument('app-id'); |
54 | 54 | |
55 | 55 | if (\OC_App::getAppPath($appId)) { |
56 | - $output->writeln($appId . ' already installed'); |
|
56 | + $output->writeln($appId.' already installed'); |
|
57 | 57 | return 1; |
58 | 58 | } |
59 | 59 | |
@@ -61,22 +61,22 @@ discard block |
||
61 | 61 | $installer = \OC::$server->query(Installer::class); |
62 | 62 | $installer->downloadApp($appId); |
63 | 63 | $result = $installer->installApp($appId); |
64 | - } catch(\Exception $e) { |
|
65 | - $output->writeln('Error: ' . $e->getMessage()); |
|
64 | + } catch (\Exception $e) { |
|
65 | + $output->writeln('Error: '.$e->getMessage()); |
|
66 | 66 | return 1; |
67 | 67 | } |
68 | 68 | |
69 | - if($result === false) { |
|
70 | - $output->writeln($appId . ' couldn\'t be installed'); |
|
69 | + if ($result === false) { |
|
70 | + $output->writeln($appId.' couldn\'t be installed'); |
|
71 | 71 | return 1; |
72 | 72 | } |
73 | 73 | |
74 | - $output->writeln($appId . ' installed'); |
|
74 | + $output->writeln($appId.' installed'); |
|
75 | 75 | |
76 | 76 | if (!$input->getOption('keep-disabled')) { |
77 | 77 | $appClass = new \OC_App(); |
78 | 78 | $appClass->enable($appId); |
79 | - $output->writeln($appId . ' enabled'); |
|
79 | + $output->writeln($appId.' enabled'); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return 0; |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | return $storage->getId(); |
142 | 142 | }, $storages)); |
143 | 143 | |
144 | - $availableStorages = array_map(function (Storage\IStorage $storage, StorageConfig $storageConfig) { |
|
144 | + $availableStorages = array_map(function(Storage\IStorage $storage, StorageConfig $storageConfig) { |
|
145 | 145 | try { |
146 | 146 | $availability = $storage->getAvailability(); |
147 | 147 | if (!$availability['available'] && !Availability::shouldRecheck($availability)) { |
148 | 148 | $storage = new FailedStorage([ |
149 | - 'exception' => new StorageNotAvailableException('Storage with mount id ' . $storageConfig->getId() . ' is not available') |
|
149 | + 'exception' => new StorageNotAvailableException('Storage with mount id '.$storageConfig->getId().' is not available') |
|
150 | 150 | ]); |
151 | 151 | } |
152 | 152 | } catch (\Exception $e) { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->userStoragesService, |
163 | 163 | $storageConfig->getId(), |
164 | 164 | $storage, |
165 | - '/' . $user->getUID() . '/files' . $storageConfig->getMountPoint(), |
|
165 | + '/'.$user->getUID().'/files'.$storageConfig->getMountPoint(), |
|
166 | 166 | null, |
167 | 167 | $loader, |
168 | 168 | $storageConfig->getMountOptions() |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } else { |
171 | 171 | return new ExternalMountPoint( |
172 | 172 | $storage, |
173 | - '/' . $user->getUID() . '/files' . $storageConfig->getMountPoint(), |
|
173 | + '/'.$user->getUID().'/files'.$storageConfig->getMountPoint(), |
|
174 | 174 | null, |
175 | 175 | $loader, |
176 | 176 | $storageConfig->getMountOptions(), |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <fieldset id="ldapWizard2"> |
2 | 2 | <div> |
3 | 3 | <p> |
4 | - <?php p($l->t('Listing and searching for users is constrained by these criteria:'));?> |
|
4 | + <?php p($l->t('Listing and searching for users is constrained by these criteria:')); ?> |
|
5 | 5 | </p> |
6 | 6 | <p> |
7 | 7 | <label for="ldap_userfilter_objectclass"> |
8 | - <?php p($l->t('Only these object classes:'));?> |
|
8 | + <?php p($l->t('Only these object classes:')); ?> |
|
9 | 9 | </label> |
10 | 10 | |
11 | 11 | <select id="ldap_userfilter_objectclass" multiple="multiple" |
@@ -14,14 +14,14 @@ discard block |
||
14 | 14 | </p> |
15 | 15 | <p> |
16 | 16 | <label></label> |
17 | - <span class="ldapInputColElement"><?php p($l->t('The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin.'));?></span> |
|
17 | + <span class="ldapInputColElement"><?php p($l->t('The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin.')); ?></span> |
|
18 | 18 | </p> |
19 | 19 | <p> |
20 | 20 | <label for="ldap_userfilter_groups"> |
21 | - <?php p($l->t('Only from these groups:'));?> |
|
21 | + <?php p($l->t('Only from these groups:')); ?> |
|
22 | 22 | </label> |
23 | 23 | |
24 | - <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups'));?>" /> |
|
24 | + <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups')); ?>" /> |
|
25 | 25 | |
26 | 26 | <select id="ldap_userfilter_groups" multiple="multiple" |
27 | 27 | name="ldap_userfilter_groups" class="multiSelectPlugin"> |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | <p class="ldapManyGroupsSupport hidden"> |
31 | 31 | <label></label> |
32 | 32 | <select class="ldapGroupList ldapGroupListAvailable" multiple="multiple" |
33 | - title="<?php p($l->t('Available groups'));?>"></select> |
|
33 | + title="<?php p($l->t('Available groups')); ?>"></select> |
|
34 | 34 | <span class="buttonSpan"> |
35 | 35 | <button class="ldapGroupListSelect" type="button">></button><br/> |
36 | 36 | <button class="ldapGroupListDeselect" type="button"><</button> |
37 | 37 | </span> |
38 | 38 | <select class="ldapGroupList ldapGroupListSelected" multiple="multiple" |
39 | - title="<?php p($l->t('Selected groups'));?>"></select> |
|
39 | + title="<?php p($l->t('Selected groups')); ?>"></select> |
|
40 | 40 | </p> |
41 | 41 | <p> |
42 | - <label><a id='toggleRawUserFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label> |
|
42 | + <label><a id='toggleRawUserFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query')); ?></a></label> |
|
43 | 43 | </p> |
44 | 44 | <p id="ldapReadOnlyUserFilterContainer" class="hidden ldapReadOnlyFilterContainer"> |
45 | - <label><?php p($l->t('LDAP Filter:'));?></label> |
|
45 | + <label><?php p($l->t('LDAP Filter:')); ?></label> |
|
46 | 46 | <span class="ldapFilterReadOnlyElement ldapInputColElement"></span> |
47 | 47 | </p> |
48 | 48 | <p id="rawUserFilterContainer"> |
49 | 49 | <textarea type="text" id="ldap_userlist_filter" name="ldap_userlist_filter" |
50 | 50 | class="ldapFilterInputElement" |
51 | - placeholder="<?php p($l->t('Edit LDAP Query'));?>" |
|
52 | - title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()]));?>"> |
|
51 | + placeholder="<?php p($l->t('Edit LDAP Query')); ?>" |
|
52 | + title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()])); ?>"> |
|
53 | 53 | </textarea> |
54 | 54 | </p> |
55 | 55 | <p> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | </p> |
58 | 58 | <p class="ldap_count"> |
59 | 59 | <button class="ldapGetEntryCount ldapGetUserCount" name="ldapGetEntryCount" type="button"> |
60 | - <?php p($l->t('Verify settings and count users'));?> |
|
60 | + <?php p($l->t('Verify settings and count users')); ?> |
|
61 | 61 | </button> |
62 | 62 | <span id="ldap_user_count"></span> |
63 | 63 | </p> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <fieldset id="ldapWizard4"> |
2 | 2 | <div> |
3 | 3 | <p> |
4 | - <?php p($l->t('Groups meeting these criteria are available in %s:', [$theme->getName()]));?> |
|
4 | + <?php p($l->t('Groups meeting these criteria are available in %s:', [$theme->getName()])); ?> |
|
5 | 5 | </p> |
6 | 6 | <p> |
7 | 7 | <label for="ldap_groupfilter_objectclass"> |
8 | - <?php p($l->t('Only these object classes:'));?> |
|
8 | + <?php p($l->t('Only these object classes:')); ?> |
|
9 | 9 | </label> |
10 | 10 | |
11 | 11 | <select id="ldap_groupfilter_objectclass" multiple="multiple" |
@@ -14,10 +14,10 @@ discard block |
||
14 | 14 | </p> |
15 | 15 | <p> |
16 | 16 | <label for="ldap_groupfilter_groups"> |
17 | - <?php p($l->t('Only from these groups:'));?> |
|
17 | + <?php p($l->t('Only from these groups:')); ?> |
|
18 | 18 | </label> |
19 | 19 | |
20 | - <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups'));?>" /> |
|
20 | + <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups')); ?>" /> |
|
21 | 21 | |
22 | 22 | <select id="ldap_groupfilter_groups" multiple="multiple" |
23 | 23 | name="ldap_groupfilter_groups" class="multiSelectPlugin"> |
@@ -27,25 +27,25 @@ discard block |
||
27 | 27 | <p class="ldapManyGroupsSupport hidden"> |
28 | 28 | <label></label> |
29 | 29 | <select class="ldapGroupList ldapGroupListAvailable" multiple="multiple" |
30 | - title="<?php p($l->t('Available groups'));?>"></select> |
|
30 | + title="<?php p($l->t('Available groups')); ?>"></select> |
|
31 | 31 | <span class="buttonSpan"> |
32 | 32 | <button class="ldapGroupListSelect" type="button">></button><br/> |
33 | 33 | <button class="ldapGroupListDeselect" type="button"><</button> |
34 | 34 | </span> |
35 | 35 | <select class="ldapGroupList ldapGroupListSelected" multiple="multiple" |
36 | - title="<?php p($l->t('Selected groups'));?>"></select> |
|
36 | + title="<?php p($l->t('Selected groups')); ?>"></select> |
|
37 | 37 | </p> |
38 | 38 | <p> |
39 | - <label><a id='toggleRawGroupFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label> |
|
39 | + <label><a id='toggleRawGroupFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query')); ?></a></label> |
|
40 | 40 | </p> |
41 | 41 | <p id="ldapReadOnlyGroupFilterContainer" class="hidden ldapReadOnlyFilterContainer"> |
42 | - <label><?php p($l->t('LDAP Filter:'));?></label> |
|
42 | + <label><?php p($l->t('LDAP Filter:')); ?></label> |
|
43 | 43 | <span class="ldapFilterReadOnlyElement ldapInputColElement"></span> |
44 | 44 | </p> |
45 | 45 | <p id="rawGroupFilterContainer" class="invisible"> |
46 | 46 | <textarea type="text" id="ldap_group_filter" name="ldap_group_filter" |
47 | - placeholder="<?php p($l->t('Edit LDAP Query'));?>" |
|
48 | - title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()]));?>"> |
|
47 | + placeholder="<?php p($l->t('Edit LDAP Query')); ?>" |
|
48 | + title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()])); ?>"> |
|
49 | 49 | </textarea> |
50 | 50 | </p> |
51 | 51 | <p> |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | </p> |
54 | 54 | <p class="ldap_count"> |
55 | 55 | <button class="ldapGetEntryCount ldapGetGroupCount" name="ldapGetEntryCount" type="button"> |
56 | - <?php p($l->t('Verify settings and count the groups'));?> |
|
56 | + <?php p($l->t('Verify settings and count the groups')); ?> |
|
57 | 57 | </button> |
58 | 58 | <span id="ldap_group_count"></span> |
59 | 59 | </p> |
@@ -1,29 +1,29 @@ discard block |
||
1 | 1 | <fieldset id="ldapWizard3"> |
2 | 2 | <div> |
3 | 3 | <p> |
4 | - <?php p($l->t('When logging in, %s will find the user based on the following attributes:', [$theme->getName()]));?> |
|
4 | + <?php p($l->t('When logging in, %s will find the user based on the following attributes:', [$theme->getName()])); ?> |
|
5 | 5 | </p> |
6 | 6 | <p> |
7 | 7 | <label for="ldap_loginfilter_username"> |
8 | - <?php p($l->t('LDAP / AD Username:'));?> |
|
8 | + <?php p($l->t('LDAP / AD Username:')); ?> |
|
9 | 9 | </label> |
10 | 10 | |
11 | 11 | <input type="checkbox" id="ldap_loginfilter_username" |
12 | - title="<?php p($l->t('Allows login against the LDAP / AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>" |
|
12 | + title="<?php p($l->t('Allows login against the LDAP / AD username, which is either "uid" or "sAMAccountName" and will be detected.')); ?>" |
|
13 | 13 | name="ldap_loginfilter_username" value="1" /> |
14 | 14 | </p> |
15 | 15 | <p> |
16 | 16 | <label for="ldap_loginfilter_email"> |
17 | - <?php p($l->t('LDAP / AD Email Address:'));?> |
|
17 | + <?php p($l->t('LDAP / AD Email Address:')); ?> |
|
18 | 18 | </label> |
19 | 19 | |
20 | 20 | <input type="checkbox" id="ldap_loginfilter_email" |
21 | - title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>" |
|
21 | + title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.')); ?>" |
|
22 | 22 | name="ldap_loginfilter_email" value="1" /> |
23 | 23 | </p> |
24 | 24 | <p> |
25 | 25 | <label for="ldap_loginfilter_attributes"> |
26 | - <?php p($l->t('Other Attributes:'));?> |
|
26 | + <?php p($l->t('Other Attributes:')); ?> |
|
27 | 27 | </label> |
28 | 28 | |
29 | 29 | <select id="ldap_loginfilter_attributes" multiple="multiple" |
@@ -31,17 +31,17 @@ discard block |
||
31 | 31 | </select> |
32 | 32 | </p> |
33 | 33 | <p> |
34 | - <label><a id='toggleRawLoginFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label> |
|
34 | + <label><a id='toggleRawLoginFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query')); ?></a></label> |
|
35 | 35 | </p> |
36 | 36 | <p id="ldapReadOnlyLoginFilterContainer" class="hidden ldapReadOnlyFilterContainer"> |
37 | - <label><?php p($l->t('LDAP Filter:'));?></label> |
|
37 | + <label><?php p($l->t('LDAP Filter:')); ?></label> |
|
38 | 38 | <span class="ldapFilterReadOnlyElement ldapInputColElement"></span> |
39 | 39 | </p> |
40 | 40 | <p id="rawLoginFilterContainer" class="invisible"> |
41 | 41 | <textarea type="text" id="ldap_login_filter" name="ldap_login_filter" |
42 | 42 | class="ldapFilterInputElement" |
43 | - placeholder="<?php p($l->t('Edit LDAP Query'));?>" |
|
44 | - title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>"> |
|
43 | + placeholder="<?php p($l->t('Edit LDAP Query')); ?>" |
|
44 | + title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"')); ?>"> |
|
45 | 45 | </textarea> |
46 | 46 | </p> |
47 | 47 | <p> |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | </p> |
50 | 50 | <p class="ldap_verify"> |
51 | 51 | <input type="text" id="ldap_test_loginname" name="ldap_test_loginname" |
52 | - placeholder="<?php p($l->t('Test Loginname'));?>" |
|
52 | + placeholder="<?php p($l->t('Test Loginname')); ?>" |
|
53 | 53 | class="ldapVerifyInput" |
54 | 54 | title="Attempts to receive a DN for the given loginname and the current login filter"/> |
55 | 55 | <button class="ldapVerifyLoginName" name="ldapTestLoginSettings" type="button" disabled="disabled"> |
56 | - <?php p($l->t('Verify settings'));?> |
|
56 | + <?php p($l->t('Verify settings')); ?> |
|
57 | 57 | </button> |
58 | 58 | </p> |
59 | 59 | <?php print_unescaped($_['wizardControls']); ?> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <ul> |
15 | 15 | <li><?php p($l->t('Remote Address: %s', [$_['remoteAddr']])) ?></li> |
16 | 16 | <li><?php p($l->t('Request ID: %s', [$_['requestID']])) ?></li> |
17 | - <?php if($_['debugMode']): ?> |
|
17 | + <?php if ($_['debugMode']): ?> |
|
18 | 18 | <li><?php p($l->t('Type: %s', [$_['errorClass']])) ?></li> |
19 | 19 | <li><?php p($l->t('Code: %s', [$_['errorCode']])) ?></li> |
20 | 20 | <li><?php p($l->t('Message: %s', [$_['errorMsg']])) ?></li> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | <?php endif; ?> |
24 | 24 | </ul> |
25 | 25 | |
26 | - <?php if($_['debugMode']): ?> |
|
26 | + <?php if ($_['debugMode']): ?> |
|
27 | 27 | <br /> |
28 | 28 | <h3><?php p($l->t('Trace')) ?></h3> |
29 | 29 | <pre><?php p($_['trace']) ?></pre> |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | * @throws \Exception |
67 | 67 | */ |
68 | 68 | public function beforeController($controller, $methodName) { |
69 | - if(!$this->reflector->hasAnnotation('NoSubadminRequired')) { |
|
70 | - if(!$this->isSubAdmin) { |
|
69 | + if (!$this->reflector->hasAnnotation('NoSubadminRequired')) { |
|
70 | + if (!$this->isSubAdmin) { |
|
71 | 71 | throw new NotAdminException($this->l10n->t('Logged in user must be a subadmin')); |
72 | 72 | } |
73 | 73 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @throws \Exception |
83 | 83 | */ |
84 | 84 | public function afterException($controller, $methodName, \Exception $exception) { |
85 | - if($exception instanceof NotAdminException) { |
|
85 | + if ($exception instanceof NotAdminException) { |
|
86 | 86 | $response = new TemplateResponse('core', '403', array(), 'guest'); |
87 | 87 | $response->setStatus(Http::STATUS_FORBIDDEN); |
88 | 88 | return $response; |