Skip to content

Commit

Permalink
refactor: Use Nextcloud sets for rector
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Sep 11, 2024
1 parent 6133774 commit da5d783
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 8 deletions.
6 changes: 4 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
return RectorConfig::configure()
->withPaths([
__DIR__ . '/lib',
__DIR__ . '/templates',
__DIR__ . '/tests',
])
->withSkip([
Expand All @@ -24,6 +25,7 @@
->withBootstrapFiles([
__DIR__ . '/../../lib/composer/autoload.php',
])
->withRules([
\ChristophWurst\Nextcloud\Rector\Rector\OcServerToOcpServerRector::class,
->withSets([
\ChristophWurst\Nextcloud\Rector\Set\NextcloudSets::NEXTCLOUD_ALL,
\ChristophWurst\Nextcloud\Rector\Set\NextcloudSets::NEXTCLOUD_25,
]);
2 changes: 1 addition & 1 deletion templates/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-FileCopyrightText: 2013-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
script('mail', 'mail');
\OCP\Util::addScript('mail', 'mail', 'core');
?>

<input type="hidden" id="attachment-size-limit" value="<?php p($_['attachment-size-limit']); ?>">
Expand Down
2 changes: 1 addition & 1 deletion templates/oauth_done.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

script(\OCA\Mail\AppInfo\Application::APP_ID, 'oauthpopup');
\OCP\Util::addScript(\OCA\Mail\AppInfo\Application::APP_ID, 'oauthpopup', 'core');

?>

Expand Down
2 changes: 1 addition & 1 deletion templates/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
?>
<?php /** @var array $_ */ ?>
<?php if (isset($_['authorizedRedirect']) && ($_['authorizedRedirect'])): ?>
<?php script('mail', 'autoredirect'); ?>
<?php \OCP\Util::addScript('mail', 'autoredirect', 'core'); ?>
<div class="error">
<div class="icon-loading-dark"
style="height: 60px;"></div>
Expand Down
2 changes: 1 addition & 1 deletion templates/settings-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

script(\OCA\Mail\AppInfo\Application::APP_ID, 'settings');
\OCP\Util::addScript(\OCA\Mail\AppInfo\Application::APP_ID, 'settings', 'core');

?>
<div id="mail-admin-settings">
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/rector/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sort-packages": true
},
"require-dev": {
"christophwurst/nextcloud-rector": "^0.0.4",
"christophwurst/nextcloud-rector": "^0.1.2",
"rector/rector": "^1.2.4"
}
}
64 changes: 63 additions & 1 deletion vendor-bin/rector/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da5d783

Please sign in to comment.