File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 "require-dev" : {
2828 "silverstripe/recipe-cms" : " ^6" ,
2929 "phpunit/phpunit" : " ^11.3" ,
30- "slevomat/coding-standard" : " ^8.8 "
30+ "slevomat/coding-standard" : " ~8.18.0 "
3131 },
3232 "repositories" : [
3333 {
Original file line number Diff line number Diff line change 55 <file >src</file >
66 <file >tests</file >
77
8+ <!-- Don't sniff test classes, because they include PHP attributes that cause Slevomat to throw errors -->
9+ <exclude-pattern >./tests/*</exclude-pattern >
810 <!-- Don't sniff third party libraries -->
911 <exclude-pattern >./vendor/*</exclude-pattern >
1012 <exclude-pattern >*/thirdparty/*</exclude-pattern >
148150 <exclude name =" SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
149151 <!-- Leave group order up to us -->
150152 <exclude name =" SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
153+ <!-- Leave the order up to us to decide -->
154+ <exclude name =" SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
151155 </rule >
152156
153157 <rule ref =" SlevomatCodingStandard.Namespaces.UnusedUses" >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ final class SearchFile
1616 /**
1717 * File size limit in bytes
1818 */
19- public const SIZE_LIMIT = 15 * 1024 * 1024 ;
19+ public const int SIZE_LIMIT = 15 * 1024 * 1024 ;
2020
2121 public static function sizeLimit (): string
2222 {
Original file line number Diff line number Diff line change 66use SilverStripe \Assets \Folder ;
77use SilverStripe \Assets \Image ;
88use SilverStripe \Core \Convert ;
9+ use SilverStripe \Core \Extension ;
910use SilverStripe \ForagerBifrost \Constants \SearchFile ;
10- use SilverStripe \ORM \DataExtension ;
1111
1212/**
1313 * @property int $ContentSize
1414 * @method File|$this getOwner()
1515 */
16- class FileExtension extends DataExtension
16+ class FileExtension extends Extension
1717{
1818
1919 /**
Original file line number Diff line number Diff line change 44
55use SilverStripe \Assets \File ;
66use SilverStripe \ForagerBifrost \Constants \SearchFile ;
7- use SilverStripe \ORM \SS_List ;
7+ use SilverStripe \Model \ List \SS_List ;
88use SilverStripe \Reports \Report ;
99
1010class LargeDocumentReport extends Report
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function getDocumentationURL(): ?string
4545 return sprintf ('%s/api/v1/docs ' , $ this ->getExternalURL ());
4646 }
4747
48- private const DEFAULT_FIELD_TYPE = 'text ' ;
48+ private const string DEFAULT_FIELD_TYPE = 'text ' ;
4949
5050 private Client $ client ;
5151
Original file line number Diff line number Diff line change 1414class ClientFactory implements Factory
1515{
1616
17- private const ENDPOINT = 'BIFROST_ENDPOINT ' ;
18- private const QUERY_API_KEY = 'BIFROST_QUERY_API_KEY ' ;
17+ private const string ENDPOINT = 'BIFROST_ENDPOINT ' ;
18+ private const string QUERY_API_KEY = 'BIFROST_QUERY_API_KEY ' ;
1919
2020 /**
2121 * @throws Exception
2222 */
23- public function create ($ service , array $ params = []) // phpcs:ignore SlevomatCodingStandard.TypeHints
23+ public function create (string $ service , array $ params = []): ? object
2424 {
2525 $ host = $ params ['host ' ] ?? null ;
2626 $ token = $ params ['token ' ] ?? null ;
You can’t perform that action at this time.
0 commit comments