mirror of
https://github.com/netzbegruenung/groupfolders.git
synced 2024-05-02 01:24:50 +02:00
run php-cs-fixer
This commit is contained in:
parent
22ab77d37c
commit
bff7bdd700
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
build/appstore/
|
build/appstore/
|
||||||
|
*.cache
|
||||||
|
|
20
.php_cs.dist
Normal file
20
.php_cs.dist
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->exclude('3rdparty')
|
||||||
|
->exclude('composer')
|
||||||
|
->exclude('3rdparty')
|
||||||
|
->exclude('build')
|
||||||
|
->in(__DIR__);
|
||||||
|
|
||||||
|
return PhpCsFixer\Config::create()
|
||||||
|
->setRules([
|
||||||
|
'@PSR2' => true,
|
||||||
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
|
'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
|
||||||
|
'binary_operator_spaces' => ['align_double_arrow' => false, 'align_equals' => false],
|
||||||
|
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
|
||||||
|
'method_argument_space' => ['ensure_fully_multiline' => true]
|
||||||
|
])
|
||||||
|
->setIndent("\t")
|
||||||
|
->setFinder($finder);
|
|
@ -8,7 +8,7 @@ $app->register();
|
||||||
$eventDispatcher = \OC::$server->getEventDispatcher();
|
$eventDispatcher = \OC::$server->getEventDispatcher();
|
||||||
$eventDispatcher->addListener(
|
$eventDispatcher->addListener(
|
||||||
'OCA\Files::loadAdditionalScripts',
|
'OCA\Files::loadAdditionalScripts',
|
||||||
function() {
|
function () {
|
||||||
\OC_Util::addScript('groupfolders', 'files');
|
\OC_Util::addScript('groupfolders', 'files');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -28,7 +28,6 @@ use OCP\AppFramework\IAppContainer;
|
||||||
use OCP\Files\NotFoundException;
|
use OCP\Files\NotFoundException;
|
||||||
|
|
||||||
class Application extends App {
|
class Application extends App {
|
||||||
|
|
||||||
public function __construct(array $urlParams = []) {
|
public function __construct(array $urlParams = []) {
|
||||||
parent::__construct('groupfolders', $urlParams);
|
parent::__construct('groupfolders', $urlParams);
|
||||||
|
|
||||||
|
@ -60,4 +59,3 @@ class Application extends App {
|
||||||
$container->getServer()->getMountProviderCollection()->registerProvider($container->query(MountProvider::class));
|
$container->getServer()->getMountProviderCollection()->registerProvider($container->query(MountProvider::class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,11 @@ class FolderController extends Controller {
|
||||||
* @param FolderManager $manager
|
* @param FolderManager $manager
|
||||||
* @param MountProvider $mountProvider
|
* @param MountProvider $mountProvider
|
||||||
*/
|
*/
|
||||||
public function __construct($AppName,
|
public function __construct(
|
||||||
IRequest $request,
|
$AppName,
|
||||||
FolderManager $manager,
|
IRequest $request,
|
||||||
MountProvider $mountProvider
|
FolderManager $manager,
|
||||||
|
MountProvider $mountProvider
|
||||||
) {
|
) {
|
||||||
parent::__construct($AppName, $request);
|
parent::__construct($AppName, $request);
|
||||||
$this->manager = $manager;
|
$this->manager = $manager;
|
||||||
|
|
|
@ -31,7 +31,6 @@ class PageController extends Controller {
|
||||||
* @return TemplateResponse
|
* @return TemplateResponse
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
|
|
||||||
$response = new TemplateResponse(
|
$response = new TemplateResponse(
|
||||||
$this->appName,
|
$this->appName,
|
||||||
'index',
|
'index',
|
||||||
|
@ -42,6 +41,4 @@ class PageController extends Controller {
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,12 @@ class FolderManager {
|
||||||
|
|
||||||
$query->select('f.folder_id', 'mount_point', 'permissions', 'quota')
|
$query->select('f.folder_id', 'mount_point', 'permissions', 'quota')
|
||||||
->from('group_folders', 'f')
|
->from('group_folders', 'f')
|
||||||
->innerJoin('f', 'group_folders_applicable', 'a',
|
->innerJoin(
|
||||||
$query->expr()->eq('f.folder_id', 'a.folder_id'))
|
'f',
|
||||||
|
'group_folders_applicable',
|
||||||
|
'a',
|
||||||
|
$query->expr()->eq('f.folder_id', 'a.folder_id')
|
||||||
|
)
|
||||||
->where($query->expr()->eq('a.group_id', $query->createNamedParameter($groupId)));
|
->where($query->expr()->eq('a.group_id', $query->createNamedParameter($groupId)));
|
||||||
|
|
||||||
return $query->execute()->fetchAll();
|
return $query->execute()->fetchAll();
|
||||||
|
|
|
@ -29,10 +29,12 @@ class Admin implements ISettings {
|
||||||
* @return TemplateResponse
|
* @return TemplateResponse
|
||||||
*/
|
*/
|
||||||
public function getForm() {
|
public function getForm() {
|
||||||
return new TemplateResponse('groupfolders',
|
return new TemplateResponse(
|
||||||
|
'groupfolders',
|
||||||
'index',
|
'index',
|
||||||
['appId' => 'groupfolders'],
|
['appId' => 'groupfolders'],
|
||||||
'');
|
''
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,5 +54,4 @@ class Admin implements ISettings {
|
||||||
public function getPriority() {
|
public function getPriority() {
|
||||||
return 90;
|
return 90;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue