Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Meyer committed Jul 19, 2018
2 parents 308ed9d + dfd6d2f commit 960239c
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 85 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

64 changes: 32 additions & 32 deletions Adapter/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(Filesystem $filesystem)
}

/**
* @param $path
* @param string $path
* @return bool
*/
public function has($path)
Expand All @@ -33,8 +33,8 @@ public function has($path)
}

/**
* @param $path
* @param $contents
* @param string $path
* @param string $contents
* @param array $config
* @return bool
*/
Expand All @@ -44,8 +44,8 @@ public function write($path, $contents, array $config = [])
}

/**
* @param $path
* @param $resource
* @param string $path
* @param resource $resource
* @param array $config
* @return bool
*/
Expand All @@ -55,8 +55,8 @@ public function writeStream($path, $resource, array $config = [])
}

/**
* @param $path
* @param $contents
* @param string $path
* @param string $contents
* @param array $config
* @return bool
*/
Expand All @@ -66,8 +66,8 @@ public function put($path, $contents, array $config = [])
}

/**
* @param $path
* @param $resource
* @param string $path
* @param resource $resource
* @param array $config
* @return bool
*/
Expand All @@ -77,7 +77,7 @@ public function putStream($path, $resource, array $config = [])
}

/**
* @param $path
* @param string $path
* @return bool|false|string
*/
public function readAndDelete($path)
Expand All @@ -86,8 +86,8 @@ public function readAndDelete($path)
}

/**
* @param $path
* @param $contents
* @param string $path
* @param string $contents
* @param array $config
* @return bool
*/
Expand All @@ -97,8 +97,8 @@ public function update($path, $contents, array $config = [])
}

/**
* @param $path
* @param $resource
* @param string $path
* @param resource $resource
* @param array $config
* @return bool
*/
Expand All @@ -108,7 +108,7 @@ public function updateStream($path, $resource, array $config = [])
}

/**
* @param $path
* @param string $path
* @return bool|false|string
*/
public function read($path)
Expand All @@ -117,7 +117,7 @@ public function read($path)
}

/**
* @param $path
* @param string $path
* @return bool|false|resource
*/
public function readStream($path)
Expand All @@ -126,8 +126,8 @@ public function readStream($path)
}

/**
* @param $path
* @param $newpath
* @param string $path
* @param string $newpath
* @return bool
*/
public function rename($path, $newpath)
Expand All @@ -136,8 +136,8 @@ public function rename($path, $newpath)
}

/**
* @param $path
* @param $newpath
* @param string $path
* @param string $newpath
* @return bool
*/
public function copy($path, $newpath)
Expand All @@ -146,7 +146,7 @@ public function copy($path, $newpath)
}

/**
* @param $path
* @param string $path
* @return bool
*/
public function delete($path)
Expand All @@ -155,7 +155,7 @@ public function delete($path)
}

/**
* @param $dirname
* @param string $dirname
* @return bool
*/
public function deleteDir($dirname)
Expand All @@ -164,7 +164,7 @@ public function deleteDir($dirname)
}

/**
* @param $dirname
* @param string $dirname
* @param array $config
* @return bool
*/
Expand All @@ -184,7 +184,7 @@ public function listContents($directory = '', $recursive = false)
}

/**
* @param $path
* @param string $path
* @return bool|false|string
*/
public function getMimetype($path)
Expand All @@ -193,7 +193,7 @@ public function getMimetype($path)
}

/**
* @param $path
* @param string $path
* @return bool|false|string
*/
public function getTimestamp($path)
Expand All @@ -202,7 +202,7 @@ public function getTimestamp($path)
}

/**
* @param $path
* @param string $path
* @return bool|false|string
*/
public function getVisibility($path)
Expand All @@ -211,7 +211,7 @@ public function getVisibility($path)
}

/**
* @param $path
* @param string $path
* @return bool|false|int
*/
public function getSize($path)
Expand All @@ -220,8 +220,8 @@ public function getSize($path)
}

/**
* @param $path
* @param $visibility
* @param string $path
* @param string $visibility
* @return bool
*/
public function setVisibility($path, $visibility)
Expand All @@ -230,7 +230,7 @@ public function setVisibility($path, $visibility)
}

/**
* @param $path
* @param string $path
* @return array|false
*/
public function getMetadata($path)
Expand All @@ -239,7 +239,7 @@ public function getMetadata($path)
}

/**
* @param $path
* @param string $path
* @return void
*/
public function assertPresent($path)
Expand All @@ -248,7 +248,7 @@ public function assertPresent($path)
}

/**
* @param $path
* @param string $path
* @return void
*/
public function assertAbsent($path)
Expand Down
2 changes: 1 addition & 1 deletion Adapter/FilesystemManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function createFtpDriver(array $config)
}

/**
* @param $root
* @param string $root
* @param int $writeFlags
* @param int $linkHandling
* @param array $permissions
Expand Down
20 changes: 14 additions & 6 deletions Block/Adminhtml/Filesystem/Content/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ public function getFiles()
return $this->_filesCollection;
}

/**
* @param array $file
* @return bool
* @throws \Exception
*/
public function validateFile($file)
{
$requiredValues = ['type' => null, 'basename' => null, 'path' => null];
Expand All @@ -118,6 +123,9 @@ public function validateFile($file)
return false;
}

/**
* @return string
*/
public function getMessages()
{
$this->_messages->setMessages($this->_messageManager->getMessages());
Expand All @@ -135,7 +143,7 @@ public function getFilesCount()
}

/**
* @param $file
* @param array $file
* @return null|string
*/
public function getFileId($file)
Expand All @@ -147,7 +155,7 @@ public function getFileId($file)
}

/**
* @param $file
* @param array $file
* @return null|string
*/
public function getFileShortName($file) {
Expand All @@ -158,7 +166,7 @@ public function getFileShortName($file) {
}

/**
* @param $file
* @param array $file
* @return string
*/
public function getFileEnding($file) {
Expand All @@ -170,7 +178,7 @@ public function getFileEnding($file) {
}

/**
* @param $file
* @param array $file
* @return string
*/
public function getFileSize($file) {
Expand All @@ -192,7 +200,7 @@ public function getFileSize($file) {
}

/**
* @param $file
* @param array $file
* @return false|string
*/
public function getLastModified($file) {
Expand All @@ -204,7 +212,7 @@ public function getLastModified($file) {
}

/**
* @param $files
* @param array $files
*/
public function setFilesCollection($files)
{
Expand Down
3 changes: 3 additions & 0 deletions Block/Adminhtml/Filesystem/Content/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ protected function _construct()
);
}

/**
* @return mixed
*/
protected function _getMediaType()
{
if ($this->hasData('media_type')) {
Expand Down
Loading

0 comments on commit 960239c

Please sign in to comment.