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

Commit 11aa4e6

Browse files
author
Florian Krämer
committed
Documentation updates.
Fixes #104.
1 parent 52be9f1 commit 11aa4e6

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

src/Storage/Listener/AbstractListener.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ public function createTmpFile($folder = null, $checkAndCreatePath = true) {
275275
}
276276

277277
/**
278-
* @param \Cake\Datasource\EntityInterface
278+
* Get the path for a storage entity.
279+
*
280+
* @param \Cake\Event\Event $event
279281
* @return string
280282
*/
281283
public function getPath(Event $event) {

src/Storage/StorageManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function flush($name = null) {
8080
* @param mixed $adapterName string of adapter configuration or array of settings
8181
* @param boolean $renewObject Creates a new instance of the given adapter in the configuration
8282
* @throws \RuntimeException
83-
* @return \Gaufrette\Adapter
83+
* @return \Gaufrette\Filesystem
8484
*/
8585
public static function adapter($adapterName, $renewObject = false) {
8686
$_this = StorageManager::getInstance();

src/Validation/UploadValidator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function isUploadedFile($value) {
6464
/**
6565
* Validates that a set field / property is a valid upload array.
6666
*
67+
* @deprecated Use \Cake\Utility\Validation::uploadedFile() instead.
6768
* @param mixed $value
6869
* @return boolean
6970
*/
@@ -84,6 +85,7 @@ public function isUploadArray($value) {
8485
/**
8586
* Validates the filesize.
8687
*
88+
* @deprecated Use \Cake\Utility\Validation::fileSize() instead.
8789
* @param array $value.
8890
* @param int $size.
8991
* @param array $context.
@@ -119,6 +121,7 @@ public function extension($value, $extensions) {
119121
/**
120122
* Validates mime types.
121123
*
124+
* @deprecated Use \Cake\Utility\Validation::mimeType() instead.
122125
* @param array $value.
123126
* @param array $mimeTypes.
124127
* @return boolean

tests/Fixture/ItemFixture.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* @copyright 2012 - 2015 Florian Krämer
77
* @license MIT
88
*/
9-
class ItemFixture extends CakeTestFixture {
9+
namespace Burzum\FileStorage\Test\Fixture;
10+
11+
use Cake\TestSuite\Fixture\TestFixture;
12+
13+
class ItemFixture extends TestFixture {
1014

1115
/**
1216
* Name
@@ -28,7 +32,7 @@ class ItemFixture extends CakeTestFixture {
2832
* @var array
2933
*/
3034
public $fields = array(
31-
'id' => array('type' => 'char', 'null' => false, 'length' => 36),
35+
'id' => array('type' => 'uuid', 'null' => true, 'default' => NULL, 'length' => 36),
3236
'name' => array('type' => 'string', 'null' => true, 'default' => NULL),
3337
'_constraints' => [
3438
'primary' => ['type' => 'primary', 'columns' => ['id']],

tests/TestCase/Model/Table/FileStorageTableTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace Burzum\FileStorage\Test\TestCase\Model\Table;
33

4+
use \Cake\Core\Plugin;
45
use Cake\Event\Event;
56
use Cake\Event\EventManager;
67
use Cake\ORM\TableRegistry;
@@ -80,7 +81,7 @@ public function testAfterDelete() {
8081
* @return void
8182
*/
8283
public function testGetFileInfoFromUpload() {
83-
$filename = \Cake\Core\Plugin::path('Burzum/FileStorage') . DS . 'tests' . DS . 'Fixture' . DS . 'File' . DS . 'titus.jpg';
84+
$filename = Plugin::path('Burzum/FileStorage') . DS . 'tests' . DS . 'Fixture' . DS . 'File' . DS . 'titus.jpg';
8485

8586
$data = new \ArrayObject([
8687
'file' => [

0 commit comments

Comments
 (0)