Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767262
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/app/Assets/Assets.php b/app/Assets/Assets.php
index 293c803..3504462 100644
--- a/app/Assets/Assets.php
+++ b/app/Assets/Assets.php
@@ -1,46 +1,46 @@
<?php
namespace AuthGrove\Assets;
class Assets {
const ASSETS_DIRECTORY = 'resources/assets/';
/**
* Gets application root directory
*
* @return string
*/
static public function getRootDirectory () {
// We're in app/Assets, so we need to get twice to the parent directory.
return dirname(dirname(__DIR__));
}
static public function getAssetsDirectory () {
return static::getRootDirectory() . '/' . static::ASSETS_DIRECTORY;
}
static private function getAssetExtension ($type) {
return $type;
}
static public function getAssetFilename ($type, $name) {
return
static::getAssetsDirectory()
.
"$type/$name."
.
static::getAssetExtension($type)
;
}
/**
- * Checks the resource has a valid format for sanity and to avoid
+ * Checks the resource has a valid format for coherence and to avoid
* exploits trying to load an arbitrary resource URL.
*
* @param $name string The resource name
* @return bool true if the resource name is valid; otherwise, false.
*/
static public function isValidAssetName ($name) {
return preg_match('/^[A-Za-z0-9\-_]*$/', $name);
}
}
diff --git a/tests/Undo/UndoableMock.php b/tests/Undo/UndoableMock.php
index 7fc9060..a8cd8ca 100644
--- a/tests/Undo/UndoableMock.php
+++ b/tests/Undo/UndoableMock.php
@@ -1,44 +1,44 @@
<?php
namespace AuthGrove\Tests\Undo;
use AuthGrove\Undo\Undoable;
use AuthGrove\Undo\WithUndo;
class UndoableMock implements Undoable {
use WithUndo;
///
- /// Some dummy properties
+ /// Some properties
///
public $foo = 'bar';
public $bar = [7, 21, 42];
public $id;
///
/// Constructor
///
public function __construct ($id = 0) {
$this->id = $id;
}
///
/// To mock restore process
///
public $enabled = true; // never deleted or restored
public function save () {
$this->enabled = true;
}
public function delete () {
$this->enabled = false;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 24, 23:15 (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256206
Default Alt Text
(2 KB)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment