@@ -28,51 +28,51 @@ |
||
28 | 28 | |
29 | 29 | class FileName extends AbstractStringCheck { |
30 | 30 | |
31 | - /** @var IRequest */ |
|
32 | - protected $request; |
|
31 | + /** @var IRequest */ |
|
32 | + protected $request; |
|
33 | 33 | |
34 | - /** @var IStorage */ |
|
35 | - protected $storage; |
|
34 | + /** @var IStorage */ |
|
35 | + protected $storage; |
|
36 | 36 | |
37 | - /** @var string */ |
|
38 | - protected $path; |
|
37 | + /** @var string */ |
|
38 | + protected $path; |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param IL10N $l |
|
42 | - * @param IRequest $request |
|
43 | - */ |
|
44 | - public function __construct(IL10N $l, IRequest $request) { |
|
45 | - parent::__construct($l); |
|
46 | - $this->request = $request; |
|
47 | - } |
|
40 | + /** |
|
41 | + * @param IL10N $l |
|
42 | + * @param IRequest $request |
|
43 | + */ |
|
44 | + public function __construct(IL10N $l, IRequest $request) { |
|
45 | + parent::__construct($l); |
|
46 | + $this->request = $request; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param IStorage $storage |
|
51 | - * @param string $path |
|
52 | - */ |
|
53 | - public function setFileInfo(IStorage $storage, $path) { |
|
54 | - $this->storage = $storage; |
|
55 | - $this->path = $path; |
|
56 | - } |
|
49 | + /** |
|
50 | + * @param IStorage $storage |
|
51 | + * @param string $path |
|
52 | + */ |
|
53 | + public function setFileInfo(IStorage $storage, $path) { |
|
54 | + $this->storage = $storage; |
|
55 | + $this->path = $path; |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * @return string |
|
60 | - */ |
|
61 | - protected function getActualValue(): string { |
|
62 | - return basename($this->path); |
|
63 | - } |
|
58 | + /** |
|
59 | + * @return string |
|
60 | + */ |
|
61 | + protected function getActualValue(): string { |
|
62 | + return basename($this->path); |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * @param string $operator |
|
67 | - * @param string $checkValue |
|
68 | - * @param string $actualValue |
|
69 | - * @return bool |
|
70 | - */ |
|
71 | - protected function executeStringCheck($operator, $checkValue, $actualValue): bool { |
|
72 | - if ($operator === 'is' || $operator === '!is') { |
|
73 | - $checkValue = mb_strtolower($checkValue); |
|
74 | - $actualValue = mb_strtolower($actualValue); |
|
75 | - } |
|
76 | - return parent::executeStringCheck($operator, $checkValue, $actualValue); |
|
77 | - } |
|
65 | + /** |
|
66 | + * @param string $operator |
|
67 | + * @param string $checkValue |
|
68 | + * @param string $actualValue |
|
69 | + * @return bool |
|
70 | + */ |
|
71 | + protected function executeStringCheck($operator, $checkValue, $actualValue): bool { |
|
72 | + if ($operator === 'is' || $operator === '!is') { |
|
73 | + $checkValue = mb_strtolower($checkValue); |
|
74 | + $actualValue = mb_strtolower($actualValue); |
|
75 | + } |
|
76 | + return parent::executeStringCheck($operator, $checkValue, $actualValue); |
|
77 | + } |
|
78 | 78 | } |
@@ -27,57 +27,57 @@ |
||
27 | 27 | |
28 | 28 | class Application extends \OCP\AppFramework\App { |
29 | 29 | |
30 | - public function __construct() { |
|
31 | - parent::__construct('workflowengine'); |
|
30 | + public function __construct() { |
|
31 | + parent::__construct('workflowengine'); |
|
32 | 32 | |
33 | - $this->getContainer()->registerAlias('FlowOperationsController', FlowOperations::class); |
|
34 | - $this->getContainer()->registerAlias('RequestTimeController', RequestTime::class); |
|
35 | - } |
|
33 | + $this->getContainer()->registerAlias('FlowOperationsController', FlowOperations::class); |
|
34 | + $this->getContainer()->registerAlias('RequestTimeController', RequestTime::class); |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * Register all hooks and listeners |
|
39 | - */ |
|
40 | - public function registerHooksAndListeners() { |
|
41 | - $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
|
42 | - $dispatcher->addListener( |
|
43 | - 'OCP\WorkflowEngine::loadAdditionalSettingScripts', |
|
44 | - function() { |
|
45 | - if (!function_exists('style')) { |
|
46 | - // This is hacky, but we need to load the template class |
|
47 | - class_exists(Template::class, true); |
|
48 | - } |
|
37 | + /** |
|
38 | + * Register all hooks and listeners |
|
39 | + */ |
|
40 | + public function registerHooksAndListeners() { |
|
41 | + $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
|
42 | + $dispatcher->addListener( |
|
43 | + 'OCP\WorkflowEngine::loadAdditionalSettingScripts', |
|
44 | + function() { |
|
45 | + if (!function_exists('style')) { |
|
46 | + // This is hacky, but we need to load the template class |
|
47 | + class_exists(Template::class, true); |
|
48 | + } |
|
49 | 49 | |
50 | - style('workflowengine', [ |
|
51 | - 'admin', |
|
52 | - ]); |
|
50 | + style('workflowengine', [ |
|
51 | + 'admin', |
|
52 | + ]); |
|
53 | 53 | |
54 | - script('core', [ |
|
55 | - 'files/fileinfo', |
|
56 | - 'files/client', |
|
57 | - 'oc-backbone-webdav', |
|
58 | - 'systemtags/systemtags', |
|
59 | - 'systemtags/systemtagmodel', |
|
60 | - 'systemtags/systemtagscollection', |
|
61 | - ]); |
|
54 | + script('core', [ |
|
55 | + 'files/fileinfo', |
|
56 | + 'files/client', |
|
57 | + 'oc-backbone-webdav', |
|
58 | + 'systemtags/systemtags', |
|
59 | + 'systemtags/systemtagmodel', |
|
60 | + 'systemtags/systemtagscollection', |
|
61 | + ]); |
|
62 | 62 | |
63 | - vendor_script('jsTimezoneDetect/jstz'); |
|
63 | + vendor_script('jsTimezoneDetect/jstz'); |
|
64 | 64 | |
65 | - script('workflowengine', [ |
|
66 | - 'admin', |
|
65 | + script('workflowengine', [ |
|
66 | + 'admin', |
|
67 | 67 | |
68 | - // Check plugins |
|
69 | - 'filemimetypeplugin', |
|
70 | - 'filenameplugin', |
|
71 | - 'filesizeplugin', |
|
72 | - 'filesystemtagsplugin', |
|
73 | - 'requestremoteaddressplugin', |
|
74 | - 'requesttimeplugin', |
|
75 | - 'requesturlplugin', |
|
76 | - 'requestuseragentplugin', |
|
77 | - 'usergroupmembershipplugin', |
|
78 | - ]); |
|
79 | - }, |
|
80 | - -100 |
|
81 | - ); |
|
82 | - } |
|
68 | + // Check plugins |
|
69 | + 'filemimetypeplugin', |
|
70 | + 'filenameplugin', |
|
71 | + 'filesizeplugin', |
|
72 | + 'filesystemtagsplugin', |
|
73 | + 'requestremoteaddressplugin', |
|
74 | + 'requesttimeplugin', |
|
75 | + 'requesturlplugin', |
|
76 | + 'requestuseragentplugin', |
|
77 | + 'usergroupmembershipplugin', |
|
78 | + ]); |
|
79 | + }, |
|
80 | + -100 |
|
81 | + ); |
|
82 | + } |
|
83 | 83 | } |