run php-cs-fixer
This commit is contained in:
parent
22ab77d37c
commit
bff7bdd700
|
@ -1,2 +1,3 @@
|
|||
node_modules/
|
||||
build/appstore/
|
||||
*.cache
|
||||
|
|
|
@ -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->addListener(
|
||||
'OCA\Files::loadAdditionalScripts',
|
||||
function() {
|
||||
function () {
|
||||
\OC_Util::addScript('groupfolders', 'files');
|
||||
}
|
||||
);
|
||||
|
|
|
@ -28,7 +28,6 @@ use OCP\AppFramework\IAppContainer;
|
|||
use OCP\Files\NotFoundException;
|
||||
|
||||
class Application extends App {
|
||||
|
||||
public function __construct(array $urlParams = []) {
|
||||
parent::__construct('groupfolders', $urlParams);
|
||||
|
||||
|
@ -60,4 +59,3 @@ class Application extends App {
|
|||
$container->getServer()->getMountProviderCollection()->registerProvider($container->query(MountProvider::class));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,11 @@ class FolderController extends Controller {
|
|||
* @param FolderManager $manager
|
||||
* @param MountProvider $mountProvider
|
||||
*/
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
FolderManager $manager,
|
||||
MountProvider $mountProvider
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
FolderManager $manager,
|
||||
MountProvider $mountProvider
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
$this->manager = $manager;
|
||||
|
|
|
@ -31,7 +31,6 @@ class PageController extends Controller {
|
|||
* @return TemplateResponse
|
||||
*/
|
||||
public function index() {
|
||||
|
||||
$response = new TemplateResponse(
|
||||
$this->appName,
|
||||
'index',
|
||||
|
@ -42,6 +41,4 @@ class PageController extends Controller {
|
|||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -92,8 +92,12 @@ class FolderManager {
|
|||
|
||||
$query->select('f.folder_id', 'mount_point', 'permissions', 'quota')
|
||||
->from('group_folders', 'f')
|
||||
->innerJoin('f', 'group_folders_applicable', 'a',
|
||||
$query->expr()->eq('f.folder_id', 'a.folder_id'))
|
||||
->innerJoin(
|
||||
'f',
|
||||
'group_folders_applicable',
|
||||
'a',
|
||||
$query->expr()->eq('f.folder_id', 'a.folder_id')
|
||||
)
|
||||
->where($query->expr()->eq('a.group_id', $query->createNamedParameter($groupId)));
|
||||
|
||||
return $query->execute()->fetchAll();
|
||||
|
|
|
@ -29,10 +29,12 @@ class Admin implements ISettings {
|
|||
* @return TemplateResponse
|
||||
*/
|
||||
public function getForm() {
|
||||
return new TemplateResponse('groupfolders',
|
||||
return new TemplateResponse(
|
||||
'groupfolders',
|
||||
'index',
|
||||
['appId' => 'groupfolders'],
|
||||
'');
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,5 +54,4 @@ class Admin implements ISettings {
|
|||
public function getPriority() {
|
||||
return 90;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue