@@ -23,20 +23,20 @@ |
||
| 23 | 23 | |
| 24 | 24 | class CoreBundle extends Bundle { |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getName() { |
|
| 30 | - return 'Core bundle'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getName() { |
|
| 30 | + return 'Core bundle'; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * {@inheritDoc} |
|
| 35 | - */ |
|
| 36 | - public function getAppIdentifiers() { |
|
| 37 | - return [ |
|
| 38 | - 'bruteforcesettings', |
|
| 39 | - ]; |
|
| 40 | - } |
|
| 33 | + /** |
|
| 34 | + * {@inheritDoc} |
|
| 35 | + */ |
|
| 36 | + public function getAppIdentifiers() { |
|
| 37 | + return [ |
|
| 38 | + 'bruteforcesettings', |
|
| 39 | + ]; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | } |
@@ -34,59 +34,59 @@ |
||
| 34 | 34 | use Symfony\Component\Console\Output\OutputInterface; |
| 35 | 35 | |
| 36 | 36 | class ConvertMysqlToMB4 extends Command { |
| 37 | - /** @var IConfig */ |
|
| 38 | - private $config; |
|
| 37 | + /** @var IConfig */ |
|
| 38 | + private $config; |
|
| 39 | 39 | |
| 40 | - /** @var IDBConnection */ |
|
| 41 | - private $connection; |
|
| 40 | + /** @var IDBConnection */ |
|
| 41 | + private $connection; |
|
| 42 | 42 | |
| 43 | - /** @var IURLGenerator */ |
|
| 44 | - private $urlGenerator; |
|
| 43 | + /** @var IURLGenerator */ |
|
| 44 | + private $urlGenerator; |
|
| 45 | 45 | |
| 46 | - /** @var ILogger */ |
|
| 47 | - private $logger; |
|
| 46 | + /** @var ILogger */ |
|
| 47 | + private $logger; |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @param IConfig $config |
|
| 51 | - * @param IDBConnection $connection |
|
| 52 | - * @param IURLGenerator $urlGenerator |
|
| 53 | - * @param ILogger $logger |
|
| 54 | - */ |
|
| 55 | - public function __construct(IConfig $config, IDBConnection $connection, IURLGenerator $urlGenerator, ILogger $logger) { |
|
| 56 | - $this->config = $config; |
|
| 57 | - $this->connection = $connection; |
|
| 58 | - $this->urlGenerator = $urlGenerator; |
|
| 59 | - $this->logger = $logger; |
|
| 60 | - parent::__construct(); |
|
| 61 | - } |
|
| 49 | + /** |
|
| 50 | + * @param IConfig $config |
|
| 51 | + * @param IDBConnection $connection |
|
| 52 | + * @param IURLGenerator $urlGenerator |
|
| 53 | + * @param ILogger $logger |
|
| 54 | + */ |
|
| 55 | + public function __construct(IConfig $config, IDBConnection $connection, IURLGenerator $urlGenerator, ILogger $logger) { |
|
| 56 | + $this->config = $config; |
|
| 57 | + $this->connection = $connection; |
|
| 58 | + $this->urlGenerator = $urlGenerator; |
|
| 59 | + $this->logger = $logger; |
|
| 60 | + parent::__construct(); |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - protected function configure() { |
|
| 64 | - $this |
|
| 65 | - ->setName('db:convert-mysql-charset') |
|
| 66 | - ->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4'); |
|
| 67 | - } |
|
| 63 | + protected function configure() { |
|
| 64 | + $this |
|
| 65 | + ->setName('db:convert-mysql-charset') |
|
| 66 | + ->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4'); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 70 | - if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) { |
|
| 71 | - $output->writeln("This command is only valid for MySQL/MariaDB databases."); |
|
| 72 | - return 1; |
|
| 73 | - } |
|
| 69 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 70 | + if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) { |
|
| 71 | + $output->writeln("This command is only valid for MySQL/MariaDB databases."); |
|
| 72 | + return 1; |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - $tools = new MySqlTools(); |
|
| 76 | - if (!$tools->supports4ByteCharset($this->connection)) { |
|
| 77 | - $url = $this->urlGenerator->linkToDocs('admin-mysql-utf8mb4'); |
|
| 78 | - $output->writeln("The database is not properly setup to use the charset utf8mb4."); |
|
| 79 | - $output->writeln("For more information please read the documentation at $url"); |
|
| 80 | - return 1; |
|
| 81 | - } |
|
| 75 | + $tools = new MySqlTools(); |
|
| 76 | + if (!$tools->supports4ByteCharset($this->connection)) { |
|
| 77 | + $url = $this->urlGenerator->linkToDocs('admin-mysql-utf8mb4'); |
|
| 78 | + $output->writeln("The database is not properly setup to use the charset utf8mb4."); |
|
| 79 | + $output->writeln("For more information please read the documentation at $url"); |
|
| 80 | + return 1; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - // enable charset |
|
| 84 | - $this->config->setSystemValue('mysql.utf8mb4', true); |
|
| 83 | + // enable charset |
|
| 84 | + $this->config->setSystemValue('mysql.utf8mb4', true); |
|
| 85 | 85 | |
| 86 | - // run conversion |
|
| 87 | - $coll = new Collation($this->config, $this->logger, $this->connection, false); |
|
| 88 | - $coll->run(new ConsoleOutput($output)); |
|
| 86 | + // run conversion |
|
| 87 | + $coll = new Collation($this->config, $this->logger, $this->connection, false); |
|
| 88 | + $coll->run(new ConsoleOutput($output)); |
|
| 89 | 89 | |
| 90 | - return 0; |
|
| 91 | - } |
|
| 90 | + return 0; |
|
| 91 | + } |
|
| 92 | 92 | } |
@@ -35,55 +35,55 @@ |
||
| 35 | 35 | * @since 8.0.0 |
| 36 | 36 | */ |
| 37 | 37 | interface IEventLogger { |
| 38 | - /** |
|
| 39 | - * Mark the start of an event setting its ID $id and providing event description $description. |
|
| 40 | - * |
|
| 41 | - * @param string $id |
|
| 42 | - * @param string $description |
|
| 43 | - * @since 8.0.0 |
|
| 44 | - */ |
|
| 45 | - public function start($id, $description); |
|
| 38 | + /** |
|
| 39 | + * Mark the start of an event setting its ID $id and providing event description $description. |
|
| 40 | + * |
|
| 41 | + * @param string $id |
|
| 42 | + * @param string $description |
|
| 43 | + * @since 8.0.0 |
|
| 44 | + */ |
|
| 45 | + public function start($id, $description); |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * Mark the end of an event with specific ID $id, marked by start() method. |
|
| 49 | - * Ending event should store \OCP\Diagnostics\IEvent to |
|
| 50 | - * be returned with getEvents() method. |
|
| 51 | - * |
|
| 52 | - * @param string $id |
|
| 53 | - * @since 8.0.0 |
|
| 54 | - */ |
|
| 55 | - public function end($id); |
|
| 47 | + /** |
|
| 48 | + * Mark the end of an event with specific ID $id, marked by start() method. |
|
| 49 | + * Ending event should store \OCP\Diagnostics\IEvent to |
|
| 50 | + * be returned with getEvents() method. |
|
| 51 | + * |
|
| 52 | + * @param string $id |
|
| 53 | + * @since 8.0.0 |
|
| 54 | + */ |
|
| 55 | + public function end($id); |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Mark the start and the end of an event with specific ID $id and description $description, |
|
| 59 | - * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
| 60 | - * Logging event should store \OCP\Diagnostics\IEvent to |
|
| 61 | - * be returned with getEvents() method. |
|
| 62 | - * |
|
| 63 | - * @param string $id |
|
| 64 | - * @param string $description |
|
| 65 | - * @param float $start |
|
| 66 | - * @param float $end |
|
| 67 | - * @since 8.0.0 |
|
| 68 | - */ |
|
| 69 | - public function log($id, $description, $start, $end); |
|
| 57 | + /** |
|
| 58 | + * Mark the start and the end of an event with specific ID $id and description $description, |
|
| 59 | + * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
| 60 | + * Logging event should store \OCP\Diagnostics\IEvent to |
|
| 61 | + * be returned with getEvents() method. |
|
| 62 | + * |
|
| 63 | + * @param string $id |
|
| 64 | + * @param string $description |
|
| 65 | + * @param float $start |
|
| 66 | + * @param float $end |
|
| 67 | + * @since 8.0.0 |
|
| 68 | + */ |
|
| 69 | + public function log($id, $description, $start, $end); |
|
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
| 73 | - * start()/end() or log() methods |
|
| 74 | - * |
|
| 75 | - * @return \OCP\Diagnostics\IEvent[] |
|
| 76 | - * @since 8.0.0 |
|
| 77 | - */ |
|
| 78 | - public function getEvents(); |
|
| 71 | + /** |
|
| 72 | + * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
| 73 | + * start()/end() or log() methods |
|
| 74 | + * |
|
| 75 | + * @return \OCP\Diagnostics\IEvent[] |
|
| 76 | + * @since 8.0.0 |
|
| 77 | + */ |
|
| 78 | + public function getEvents(); |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Activate the module for the duration of the request. Deactivated module |
|
| 82 | - * does not create and store \OCP\Diagnostics\IEvent objects. |
|
| 83 | - * Only activated module should create and store objects to be |
|
| 84 | - * returned with getEvents() call. |
|
| 85 | - * |
|
| 86 | - * @since 12.0.0 |
|
| 87 | - */ |
|
| 88 | - public function activate(); |
|
| 80 | + /** |
|
| 81 | + * Activate the module for the duration of the request. Deactivated module |
|
| 82 | + * does not create and store \OCP\Diagnostics\IEvent objects. |
|
| 83 | + * Only activated module should create and store objects to be |
|
| 84 | + * returned with getEvents() call. |
|
| 85 | + * |
|
| 86 | + * @since 12.0.0 |
|
| 87 | + */ |
|
| 88 | + public function activate(); |
|
| 89 | 89 | } |
@@ -30,38 +30,38 @@ |
||
| 30 | 30 | * @since 8.0.0 |
| 31 | 31 | */ |
| 32 | 32 | interface IQuery { |
| 33 | - /** |
|
| 34 | - * @return string |
|
| 35 | - * @since 8.0.0 |
|
| 36 | - */ |
|
| 37 | - public function getSql(); |
|
| 33 | + /** |
|
| 34 | + * @return string |
|
| 35 | + * @since 8.0.0 |
|
| 36 | + */ |
|
| 37 | + public function getSql(); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @return array |
|
| 41 | - * @since 8.0.0 |
|
| 42 | - */ |
|
| 43 | - public function getParams(); |
|
| 39 | + /** |
|
| 40 | + * @return array |
|
| 41 | + * @since 8.0.0 |
|
| 42 | + */ |
|
| 43 | + public function getParams(); |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @return float |
|
| 47 | - * @since 8.0.0 |
|
| 48 | - */ |
|
| 49 | - public function getDuration(); |
|
| 45 | + /** |
|
| 46 | + * @return float |
|
| 47 | + * @since 8.0.0 |
|
| 48 | + */ |
|
| 49 | + public function getDuration(); |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * @return float |
|
| 53 | - * @since 11.0.0 |
|
| 54 | - */ |
|
| 55 | - public function getStartTime(); |
|
| 51 | + /** |
|
| 52 | + * @return float |
|
| 53 | + * @since 11.0.0 |
|
| 54 | + */ |
|
| 55 | + public function getStartTime(); |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @return array |
|
| 59 | - * @since 11.0.0 |
|
| 60 | - */ |
|
| 61 | - public function getStacktrace(); |
|
| 62 | - /** |
|
| 63 | - * @return array |
|
| 64 | - * @since 12.0.0 |
|
| 65 | - */ |
|
| 66 | - public function getStart(); |
|
| 57 | + /** |
|
| 58 | + * @return array |
|
| 59 | + * @since 11.0.0 |
|
| 60 | + */ |
|
| 61 | + public function getStacktrace(); |
|
| 62 | + /** |
|
| 63 | + * @return array |
|
| 64 | + * @since 12.0.0 |
|
| 65 | + */ |
|
| 66 | + public function getStart(); |
|
| 67 | 67 | } |
@@ -26,65 +26,65 @@ |
||
| 26 | 26 | use OCP\Diagnostics\IQuery; |
| 27 | 27 | |
| 28 | 28 | class Query implements IQuery { |
| 29 | - private $sql; |
|
| 29 | + private $sql; |
|
| 30 | 30 | |
| 31 | - private $params; |
|
| 31 | + private $params; |
|
| 32 | 32 | |
| 33 | - private $start; |
|
| 33 | + private $start; |
|
| 34 | 34 | |
| 35 | - private $end; |
|
| 35 | + private $end; |
|
| 36 | 36 | |
| 37 | - private $stack; |
|
| 37 | + private $stack; |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param string $sql |
|
| 41 | - * @param array $params |
|
| 42 | - * @param int $start |
|
| 43 | - */ |
|
| 44 | - public function __construct($sql, $params, $start, array $stack) { |
|
| 45 | - $this->sql = $sql; |
|
| 46 | - $this->params = $params; |
|
| 47 | - $this->start = $start; |
|
| 48 | - $this->stack = $stack; |
|
| 49 | - } |
|
| 39 | + /** |
|
| 40 | + * @param string $sql |
|
| 41 | + * @param array $params |
|
| 42 | + * @param int $start |
|
| 43 | + */ |
|
| 44 | + public function __construct($sql, $params, $start, array $stack) { |
|
| 45 | + $this->sql = $sql; |
|
| 46 | + $this->params = $params; |
|
| 47 | + $this->start = $start; |
|
| 48 | + $this->stack = $stack; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - public function end($time) { |
|
| 52 | - $this->end = $time; |
|
| 53 | - } |
|
| 51 | + public function end($time) { |
|
| 52 | + $this->end = $time; |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * @return array |
|
| 57 | - */ |
|
| 58 | - public function getParams() { |
|
| 59 | - return $this->params; |
|
| 60 | - } |
|
| 55 | + /** |
|
| 56 | + * @return array |
|
| 57 | + */ |
|
| 58 | + public function getParams() { |
|
| 59 | + return $this->params; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * @return string |
|
| 64 | - */ |
|
| 65 | - public function getSql() { |
|
| 66 | - return $this->sql; |
|
| 67 | - } |
|
| 62 | + /** |
|
| 63 | + * @return string |
|
| 64 | + */ |
|
| 65 | + public function getSql() { |
|
| 66 | + return $this->sql; |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @return float |
|
| 71 | - */ |
|
| 72 | - public function getStart() { |
|
| 73 | - return $this->start; |
|
| 74 | - } |
|
| 69 | + /** |
|
| 70 | + * @return float |
|
| 71 | + */ |
|
| 72 | + public function getStart() { |
|
| 73 | + return $this->start; |
|
| 74 | + } |
|
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * @return float |
|
| 78 | - */ |
|
| 79 | - public function getDuration() { |
|
| 80 | - return $this->end - $this->start; |
|
| 81 | - } |
|
| 76 | + /** |
|
| 77 | + * @return float |
|
| 78 | + */ |
|
| 79 | + public function getDuration() { |
|
| 80 | + return $this->end - $this->start; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - public function getStartTime() { |
|
| 84 | - return $this->start; |
|
| 85 | - } |
|
| 83 | + public function getStartTime() { |
|
| 84 | + return $this->start; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - public function getStacktrace() { |
|
| 88 | - return $this->stack; |
|
| 89 | - } |
|
| 87 | + public function getStacktrace() { |
|
| 88 | + return $this->stack; |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | use OC\Files\Mount\MountPoint; |
| 25 | 25 | |
| 26 | 26 | class ExternalMountPoint extends MountPoint { |
| 27 | - public function getMountType() { |
|
| 28 | - return 'external'; |
|
| 29 | - } |
|
| 27 | + public function getMountType() { |
|
| 28 | + return 'external'; |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -29,103 +29,103 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | interface IMountPoint { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * get complete path to the mount point |
|
| 34 | - * |
|
| 35 | - * @return string |
|
| 36 | - * @since 8.0.0 |
|
| 37 | - */ |
|
| 38 | - public function getMountPoint(); |
|
| 32 | + /** |
|
| 33 | + * get complete path to the mount point |
|
| 34 | + * |
|
| 35 | + * @return string |
|
| 36 | + * @since 8.0.0 |
|
| 37 | + */ |
|
| 38 | + public function getMountPoint(); |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * Set the mountpoint |
|
| 42 | - * |
|
| 43 | - * @param string $mountPoint new mount point |
|
| 44 | - * @since 8.0.0 |
|
| 45 | - */ |
|
| 46 | - public function setMountPoint($mountPoint); |
|
| 40 | + /** |
|
| 41 | + * Set the mountpoint |
|
| 42 | + * |
|
| 43 | + * @param string $mountPoint new mount point |
|
| 44 | + * @since 8.0.0 |
|
| 45 | + */ |
|
| 46 | + public function setMountPoint($mountPoint); |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * Get the storage that is mounted |
|
| 50 | - * |
|
| 51 | - * @return \OC\Files\Storage\Storage |
|
| 52 | - * @since 8.0.0 |
|
| 53 | - */ |
|
| 54 | - public function getStorage(); |
|
| 48 | + /** |
|
| 49 | + * Get the storage that is mounted |
|
| 50 | + * |
|
| 51 | + * @return \OC\Files\Storage\Storage |
|
| 52 | + * @since 8.0.0 |
|
| 53 | + */ |
|
| 54 | + public function getStorage(); |
|
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * Get the id of the storages |
|
| 58 | - * |
|
| 59 | - * @return string |
|
| 60 | - * @since 8.0.0 |
|
| 61 | - */ |
|
| 62 | - public function getStorageId(); |
|
| 56 | + /** |
|
| 57 | + * Get the id of the storages |
|
| 58 | + * |
|
| 59 | + * @return string |
|
| 60 | + * @since 8.0.0 |
|
| 61 | + */ |
|
| 62 | + public function getStorageId(); |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * Get the id of the storages |
|
| 66 | - * |
|
| 67 | - * @return int |
|
| 68 | - * @since 9.1.0 |
|
| 69 | - */ |
|
| 70 | - public function getNumericStorageId(); |
|
| 64 | + /** |
|
| 65 | + * Get the id of the storages |
|
| 66 | + * |
|
| 67 | + * @return int |
|
| 68 | + * @since 9.1.0 |
|
| 69 | + */ |
|
| 70 | + public function getNumericStorageId(); |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * Get the path relative to the mountpoint |
|
| 74 | - * |
|
| 75 | - * @param string $path absolute path to a file or folder |
|
| 76 | - * @return string |
|
| 77 | - * @since 8.0.0 |
|
| 78 | - */ |
|
| 79 | - public function getInternalPath($path); |
|
| 72 | + /** |
|
| 73 | + * Get the path relative to the mountpoint |
|
| 74 | + * |
|
| 75 | + * @param string $path absolute path to a file or folder |
|
| 76 | + * @return string |
|
| 77 | + * @since 8.0.0 |
|
| 78 | + */ |
|
| 79 | + public function getInternalPath($path); |
|
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * Apply a storage wrapper to the mounted storage |
|
| 83 | - * |
|
| 84 | - * @param callable $wrapper |
|
| 85 | - * @since 8.0.0 |
|
| 86 | - */ |
|
| 87 | - public function wrapStorage($wrapper); |
|
| 81 | + /** |
|
| 82 | + * Apply a storage wrapper to the mounted storage |
|
| 83 | + * |
|
| 84 | + * @param callable $wrapper |
|
| 85 | + * @since 8.0.0 |
|
| 86 | + */ |
|
| 87 | + public function wrapStorage($wrapper); |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * Get a mount option |
|
| 91 | - * |
|
| 92 | - * @param string $name Name of the mount option to get |
|
| 93 | - * @param mixed $default Default value for the mount option |
|
| 94 | - * @return mixed |
|
| 95 | - * @since 8.0.0 |
|
| 96 | - */ |
|
| 97 | - public function getOption($name, $default); |
|
| 89 | + /** |
|
| 90 | + * Get a mount option |
|
| 91 | + * |
|
| 92 | + * @param string $name Name of the mount option to get |
|
| 93 | + * @param mixed $default Default value for the mount option |
|
| 94 | + * @return mixed |
|
| 95 | + * @since 8.0.0 |
|
| 96 | + */ |
|
| 97 | + public function getOption($name, $default); |
|
| 98 | 98 | |
| 99 | - /** |
|
| 100 | - * Get all options for the mount |
|
| 101 | - * |
|
| 102 | - * @return array |
|
| 103 | - * @since 8.1.0 |
|
| 104 | - */ |
|
| 105 | - public function getOptions(); |
|
| 99 | + /** |
|
| 100 | + * Get all options for the mount |
|
| 101 | + * |
|
| 102 | + * @return array |
|
| 103 | + * @since 8.1.0 |
|
| 104 | + */ |
|
| 105 | + public function getOptions(); |
|
| 106 | 106 | |
| 107 | - /** |
|
| 108 | - * Get the file id of the root of the storage |
|
| 109 | - * |
|
| 110 | - * @return int |
|
| 111 | - * @since 9.1.0 |
|
| 112 | - */ |
|
| 113 | - public function getStorageRootId(); |
|
| 107 | + /** |
|
| 108 | + * Get the file id of the root of the storage |
|
| 109 | + * |
|
| 110 | + * @return int |
|
| 111 | + * @since 9.1.0 |
|
| 112 | + */ |
|
| 113 | + public function getStorageRootId(); |
|
| 114 | 114 | |
| 115 | - /** |
|
| 116 | - * Get the id of the configured mount |
|
| 117 | - * |
|
| 118 | - * @return int|null mount id or null if not applicable |
|
| 119 | - * @since 9.1.0 |
|
| 120 | - */ |
|
| 121 | - public function getMountId(); |
|
| 115 | + /** |
|
| 116 | + * Get the id of the configured mount |
|
| 117 | + * |
|
| 118 | + * @return int|null mount id or null if not applicable |
|
| 119 | + * @since 9.1.0 |
|
| 120 | + */ |
|
| 121 | + public function getMountId(); |
|
| 122 | 122 | |
| 123 | - /** |
|
| 124 | - * Get the type of mount point, used to distinguish things like shares and external storages |
|
| 125 | - * in the web interface |
|
| 126 | - * |
|
| 127 | - * @return string |
|
| 128 | - * @since 12.0.0 |
|
| 129 | - */ |
|
| 130 | - public function getMountType(); |
|
| 123 | + /** |
|
| 124 | + * Get the type of mount point, used to distinguish things like shares and external storages |
|
| 125 | + * in the web interface |
|
| 126 | + * |
|
| 127 | + * @return string |
|
| 128 | + * @since 12.0.0 |
|
| 129 | + */ |
|
| 130 | + public function getMountType(); |
|
| 131 | 131 | } |
@@ -31,34 +31,34 @@ |
||
| 31 | 31 | |
| 32 | 32 | class EMailProvider implements IProvider { |
| 33 | 33 | |
| 34 | - /** @var IActionFactory */ |
|
| 35 | - private $actionFactory; |
|
| 34 | + /** @var IActionFactory */ |
|
| 35 | + private $actionFactory; |
|
| 36 | 36 | |
| 37 | - /** @var IURLGenerator */ |
|
| 38 | - private $urlGenerator; |
|
| 37 | + /** @var IURLGenerator */ |
|
| 38 | + private $urlGenerator; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @param IActionFactory $actionFactory |
|
| 42 | - * @param IURLGenerator $urlGenerator |
|
| 43 | - */ |
|
| 44 | - public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) { |
|
| 45 | - $this->actionFactory = $actionFactory; |
|
| 46 | - $this->urlGenerator = $urlGenerator; |
|
| 47 | - } |
|
| 40 | + /** |
|
| 41 | + * @param IActionFactory $actionFactory |
|
| 42 | + * @param IURLGenerator $urlGenerator |
|
| 43 | + */ |
|
| 44 | + public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) { |
|
| 45 | + $this->actionFactory = $actionFactory; |
|
| 46 | + $this->urlGenerator = $urlGenerator; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @param IEntry $entry |
|
| 51 | - */ |
|
| 52 | - public function process(IEntry $entry) { |
|
| 53 | - $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); |
|
| 54 | - foreach ($entry->getEMailAddresses() as $address) { |
|
| 55 | - if (empty($address)) { |
|
| 56 | - // Skip |
|
| 57 | - continue; |
|
| 58 | - } |
|
| 59 | - $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); |
|
| 60 | - $entry->addAction($action); |
|
| 61 | - } |
|
| 62 | - } |
|
| 49 | + /** |
|
| 50 | + * @param IEntry $entry |
|
| 51 | + */ |
|
| 52 | + public function process(IEntry $entry) { |
|
| 53 | + $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); |
|
| 54 | + foreach ($entry->getEMailAddresses() as $address) { |
|
| 55 | + if (empty($address)) { |
|
| 56 | + // Skip |
|
| 57 | + continue; |
|
| 58 | + } |
|
| 59 | + $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); |
|
| 60 | + $entry->addAction($action); |
|
| 61 | + } |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | 64 | } |
@@ -25,36 +25,36 @@ |
||
| 25 | 25 | |
| 26 | 26 | class LanguageParseChecker { |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @param string $appId |
|
| 30 | - * @return array |
|
| 31 | - */ |
|
| 32 | - public function analyse($appId) { |
|
| 33 | - $appPath = \OC_App::getAppPath($appId); |
|
| 34 | - if ($appPath === false) { |
|
| 35 | - throw new \RuntimeException("No app with given id <$appId> known."); |
|
| 36 | - } |
|
| 37 | - |
|
| 38 | - if (!is_dir($appPath . '/l10n/')) { |
|
| 39 | - return []; |
|
| 40 | - } |
|
| 41 | - |
|
| 42 | - $errors = []; |
|
| 43 | - $directory = new \DirectoryIterator($appPath . '/l10n/'); |
|
| 44 | - |
|
| 45 | - foreach ($directory as $file) { |
|
| 46 | - if ($file->getExtension() !== 'json') { |
|
| 47 | - continue; |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - $content = file_get_contents($file->getPathname()); |
|
| 51 | - json_decode($content, true); |
|
| 52 | - |
|
| 53 | - if (json_last_error() !== JSON_ERROR_NONE) { |
|
| 54 | - $errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg(); |
|
| 55 | - } |
|
| 56 | - } |
|
| 57 | - |
|
| 58 | - return $errors; |
|
| 59 | - } |
|
| 28 | + /** |
|
| 29 | + * @param string $appId |
|
| 30 | + * @return array |
|
| 31 | + */ |
|
| 32 | + public function analyse($appId) { |
|
| 33 | + $appPath = \OC_App::getAppPath($appId); |
|
| 34 | + if ($appPath === false) { |
|
| 35 | + throw new \RuntimeException("No app with given id <$appId> known."); |
|
| 36 | + } |
|
| 37 | + |
|
| 38 | + if (!is_dir($appPath . '/l10n/')) { |
|
| 39 | + return []; |
|
| 40 | + } |
|
| 41 | + |
|
| 42 | + $errors = []; |
|
| 43 | + $directory = new \DirectoryIterator($appPath . '/l10n/'); |
|
| 44 | + |
|
| 45 | + foreach ($directory as $file) { |
|
| 46 | + if ($file->getExtension() !== 'json') { |
|
| 47 | + continue; |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + $content = file_get_contents($file->getPathname()); |
|
| 51 | + json_decode($content, true); |
|
| 52 | + |
|
| 53 | + if (json_last_error() !== JSON_ERROR_NONE) { |
|
| 54 | + $errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg(); |
|
| 55 | + } |
|
| 56 | + } |
|
| 57 | + |
|
| 58 | + return $errors; |
|
| 59 | + } |
|
| 60 | 60 | } |