Page MenuHomeDevCentral

No OneTemporary

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

Mime Type
text/x-diff
Expires
Sun, Nov 24, 23:15 (15 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256206
Default Alt Text
(2 KB)

Event Timeline