Skip to content

Commit

Permalink
CC-34616: Added extension points to the file manager. (#11135)
Browse files Browse the repository at this point in the history
CC-34616: Added extension points to the file manager.
  • Loading branch information
abitskil authored Oct 11, 2024
1 parent c83373c commit aa85b0b
Show file tree
Hide file tree
Showing 16 changed files with 453 additions and 227 deletions.
129 changes: 1 addition & 128 deletions architecture-baseline.json
Original file line number Diff line number Diff line change
@@ -1,128 +1 @@
[
{
"fileName": "src/Spryker/Service/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `read()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Service/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `getMimeType()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `getMimeType()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `getTimestamp()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `getSize()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `isPrivate()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `read()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `listContents()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `has()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `markAsPrivate()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `markAsPublic()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `createDirectory()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `deleteDirectory()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `copy()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `delete()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `rename()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `write()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/Spryker/Zed/FileManager/Dependency/Service/FileManagerToFileSystemServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `writeStream()`. Missed return type. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
}
]
[]
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "proprietary",
"require": {
"php": ">=8.2",
"spryker/file-manager-extension": "^1.0.0",
"spryker/file-system": "^2.0.0",
"spryker/kernel": "^3.30.0",
"spryker/locale": "^3.0.0 || ^4.0.0",
Expand Down
143 changes: 121 additions & 22 deletions psalm-report.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct($fileSystemService)
*
* @return string
*/
public function read(FileSystemQueryTransfer $fileSystemQueryTransfer)
public function read(FileSystemQueryTransfer $fileSystemQueryTransfer): string
{
return $this->fileSystemService->read($fileSystemQueryTransfer);
}
Expand All @@ -40,7 +40,7 @@ public function read(FileSystemQueryTransfer $fileSystemQueryTransfer)
*
* @return mixed
*/
public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer)
public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer): mixed
{
return $this->fileSystemService->readStream($fileSystemStreamTransfer);
}
Expand All @@ -50,7 +50,7 @@ public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer)
*
* @return string
*/
public function getMimeType(FileSystemQueryTransfer $fileSystemQueryTransfer)
public function getMimeType(FileSystemQueryTransfer $fileSystemQueryTransfer): string
{
return $this->fileSystemService->getMimeType($fileSystemQueryTransfer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface FileManagerToFileSystemServiceInterface
*
* @return string
*/
public function read(FileSystemQueryTransfer $fileSystemQueryTransfer);
public function read(FileSystemQueryTransfer $fileSystemQueryTransfer): string;

/**
* @param \Generated\Shared\Transfer\FileSystemStreamTransfer $fileSystemStreamTransfer
Expand All @@ -28,7 +28,7 @@ public function read(FileSystemQueryTransfer $fileSystemQueryTransfer);
*
* @return mixed
*/
public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer);
public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer): mixed;

/**
* @param \Generated\Shared\Transfer\FileSystemQueryTransfer $fileSystemQueryTransfer
Expand All @@ -37,5 +37,5 @@ public function readStream(FileSystemStreamTransfer $fileSystemStreamTransfer);
*
* @return string
*/
public function getMimeType(FileSystemQueryTransfer $fileSystemQueryTransfer);
public function getMimeType(FileSystemQueryTransfer $fileSystemQueryTransfer): string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,8 @@
<property name="offset" type="int"/>
<property name="nbResults" type="int"/>
</transfer>

<transfer name="FileManagerDataCollection" strict="true">
<property name="fileManagerDataItems" type="FileManagerData[]" singular="fileManagerDataItem"/>
</transfer>
</transfers>
Loading

0 comments on commit aa85b0b

Please sign in to comment.