Commit Graph

32 Commits

Author SHA1 Message Date
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke 234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Michael Weimann 38ea5d14b3
Disables SVG favicon uploads when imagemagick is missing.
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-09-05 20:50:21 +02:00
Morris Jobke 8f6acbff62
Merge pull request #9258 from nextcloud/theming-logo-png
Convert theming app logo to PNG to show it properly in emails
2018-06-15 17:02:14 +02:00
Roeland Jago Douma e4db293cc1
Fix possible test timing issues in IconController
Since the response now handles the caching. We need to provide a default
ITimeFactory mock. Else you might have failing tests.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-13 22:54:08 +02:00
Julius Härtl 5b0ce806a3
Minor fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-06 13:15:52 +02:00
Roeland Jago Douma e5cc8be9d5
Fix usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-04 08:48:54 +02:00
Julius Härtl b385f1c7d5
Fix theming tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:40 +02:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Julius Härtl 489131333a
Inject FileAccessHelper for proper testing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-18 10:45:42 +02:00
Julius Härtl edb5502b9d
Add proper Content-Type to icons
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:11:29 +02:00
Julius Härtl 1157f413c9
Fallback to default favicon
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:11:29 +02:00
Joas Schilling 8c703c954d
Fix theming tests
Trying to configure method "shouldReplaceIcons" which cannot be configured
because it does not exist, has not been specified, is final, or is static

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 13:10:34 +02:00
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:01 -05:00
Julius Haertl d409fe1c52
Error handling and tests if file was not found
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +01:00
Julius Haertl 78de213b85
Sanitize input and small fixes
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +01:00
Julius Haertl 3a400f92d1
Replace null return with NotFoundException
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +01:00
Julius Haertl 2e8dd21815
Improve caching
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl 492d0b9f9b
Caching for icon files using AppData
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl 9e28a3ba12
Theming: Code cleanup and cache buster for mime icons
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl 237034818d
Check if dynamic icons can be used
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl af8976ab03
Add IconBuilder class to encapsulate icon generation
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl b466628bfd
Improve unit tests for image generation
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:23 +01:00
Julius Haertl ac7f852ed9
Theming: Add IconController tests
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:23 +01:00