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

Commit

Permalink
Documentation updates.
Browse files Browse the repository at this point in the history
Fixes #104.
  • Loading branch information
Florian Krämer committed Oct 13, 2015
1 parent 52be9f1 commit 11aa4e6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/Storage/Listener/AbstractListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ public function createTmpFile($folder = null, $checkAndCreatePath = true) {
}

/**
* @param \Cake\Datasource\EntityInterface
* Get the path for a storage entity.
*
* @param \Cake\Event\Event $event
* @return string
*/
public function getPath(Event $event) {
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/StorageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function flush($name = null) {
* @param mixed $adapterName string of adapter configuration or array of settings
* @param boolean $renewObject Creates a new instance of the given adapter in the configuration
* @throws \RuntimeException
* @return \Gaufrette\Adapter
* @return \Gaufrette\Filesystem
*/
public static function adapter($adapterName, $renewObject = false) {
$_this = StorageManager::getInstance();
Expand Down
3 changes: 3 additions & 0 deletions src/Validation/UploadValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function isUploadedFile($value) {
/**
* Validates that a set field / property is a valid upload array.
*
* @deprecated Use \Cake\Utility\Validation::uploadedFile() instead.
* @param mixed $value
* @return boolean
*/
Expand All @@ -84,6 +85,7 @@ public function isUploadArray($value) {
/**
* Validates the filesize.
*
* @deprecated Use \Cake\Utility\Validation::fileSize() instead.
* @param array $value.
* @param int $size.
* @param array $context.
Expand Down Expand Up @@ -119,6 +121,7 @@ public function extension($value, $extensions) {
/**
* Validates mime types.
*
* @deprecated Use \Cake\Utility\Validation::mimeType() instead.
* @param array $value.
* @param array $mimeTypes.
* @return boolean
Expand Down
8 changes: 6 additions & 2 deletions tests/Fixture/ItemFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
* @copyright 2012 - 2015 Florian Krämer
* @license MIT
*/
class ItemFixture extends CakeTestFixture {
namespace Burzum\FileStorage\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

class ItemFixture extends TestFixture {

/**
* Name
Expand All @@ -28,7 +32,7 @@ class ItemFixture extends CakeTestFixture {
* @var array
*/
public $fields = array(
'id' => array('type' => 'char', 'null' => false, 'length' => 36),
'id' => array('type' => 'uuid', 'null' => true, 'default' => NULL, 'length' => 36),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL),
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id']],
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/Model/Table/FileStorageTableTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Burzum\FileStorage\Test\TestCase\Model\Table;

use \Cake\Core\Plugin;
use Cake\Event\Event;
use Cake\Event\EventManager;
use Cake\ORM\TableRegistry;
Expand Down Expand Up @@ -80,7 +81,7 @@ public function testAfterDelete() {
* @return void
*/
public function testGetFileInfoFromUpload() {
$filename = \Cake\Core\Plugin::path('Burzum/FileStorage') . DS . 'tests' . DS . 'Fixture' . DS . 'File' . DS . 'titus.jpg';
$filename = Plugin::path('Burzum/FileStorage') . DS . 'tests' . DS . 'Fixture' . DS . 'File' . DS . 'titus.jpg';

$data = new \ArrayObject([
'file' => [
Expand Down

0 comments on commit 11aa4e6

Please sign in to comment.