Skip to content

Commit

Permalink
improved some PHPDoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
craue committed Oct 6, 2014
1 parent 03404b6 commit df39bc6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Form/FormFlow.php
Expand Up @@ -66,7 +66,7 @@ abstract class FormFlow implements FormFlowInterface {
protected $handleFileUploads = true;

/**
* @var string|null Directory for storing temporary files while handling uploads. If {@code null}, the system's default will be used.
* @var string|null Directory for storing temporary files while handling uploads. If <code>null</code>, the system's default will be used.
*/
protected $handleFileUploadsTempDir = null;

Expand Down Expand Up @@ -418,7 +418,7 @@ public function isStepSkipped($stepNumber) {
* @param integer $stepNumber Assumed step to which skipped steps shall be applied to.
* @param integer $direction Either 1 (to skip forwards) or -1 (to skip backwards).
* @return integer Target step number with skipping applied.
* @throws \InvalidArgumentException If the value of {@code $direction} is invalid.
* @throws \InvalidArgumentException If the value of <code>$direction</code> is invalid.
*/
protected function applySkipping($stepNumber, $direction = 1) {
if ($direction !== 1 && $direction !== -1) {
Expand Down
8 changes: 4 additions & 4 deletions Form/FormFlowInterface.php
Expand Up @@ -62,7 +62,7 @@ function isAllowDynamicStepNavigation();
function isHandleFileUploads();

/**
* @return string|null Directory for storing temporary files while handling uploads. If {@code null}, the system's default will be used.
* @return string|null Directory for storing temporary files while handling uploads. If <code>null</code>, the system's default will be used.
*/
function getHandleFileUploadsTempDir();

Expand Down Expand Up @@ -134,7 +134,7 @@ function reset();
function getFirstStepNumber();

/**
* @return integer Last visible step, which may be less than {@code getStepCount()} if steps are skipped.
* @return integer Last visible step, which may be less than <code>getStepCount()</code> if steps are skipped.
*/
function getLastStepNumber();

Expand All @@ -158,8 +158,8 @@ function getStepLabels();
/**
* @param integer $stepNumber
* @return StepInterface
* @throws InvalidTypeException If {@code $stepNumber} is not an integer.
* @throws \OutOfBoundsException If step {@code $stepNumber} doesn't exist.
* @throws InvalidTypeException If <code>$stepNumber</code> is not an integer.
* @throws \OutOfBoundsException If step <code>$stepNumber</code> doesn't exist.
*/
function getStep($stepNumber);

Expand Down
15 changes: 11 additions & 4 deletions Storage/SerializableFile.php
Expand Up @@ -7,24 +7,31 @@
use Symfony\Component\HttpFoundation\File\UploadedFile;

/**
* Representation of a serializable file. Only supports {@code UploadedFile} currently.
* Representation of a serializable file. Only supports <code>UploadedFile</code> currently.
*
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2011-2014 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class SerializableFile {

/**
* @var string Base64-encoded content of the original file.
*/
protected $content;
protected $type; // for possible future support of further types

/**
* @var string FQCN of the object encapsulating the original file. Not used yet, but meant for possible future support of further types.
*/
protected $type;

protected $clientOriginalName;
protected $clientMimeType;
protected $clientSize;

/**
* @param mixed $file An object meant to be serialized.
* @throws InvalidTypeException If the type of {@code $file} is unsupported.
* @throws InvalidTypeException If the type of <code>$file</code> is unsupported.
*/
public function __construct($file) {
if (!self::isSupported($file)) {
Expand All @@ -40,7 +47,7 @@ public function __construct($file) {
}

/**
* @param string|null $tempDir Directory for storing temporary files. If {@code null}, the system's default will be used.
* @param string|null $tempDir Directory for storing temporary files. If <code>null</code>, the system's default will be used.
* @return mixed The unserialized object.
*/
public function getAsFile($tempDir = null) {
Expand Down
2 changes: 1 addition & 1 deletion Util/FormFlowUtil.php
Expand Up @@ -15,7 +15,7 @@ class FormFlowUtil {
* Adds route parameters for dynamic step navigation.
* @param array $parameters Current route parameters.
* @param FormFlow $flow The flow involved.
* @param integer|null $stepNumber Number of the step the link will be generated for. If {@code null}, the {@code $flow}'s current step number will be used.
* @param integer|null $stepNumber Number of the step the link will be generated for. If <code>null</code>, the <code>$flow</code>'s current step number will be used.
* @return array Route parameters plus instance and step parameter.
*/
public function addRouteParameters(array $parameters, FormFlow $flow, $stepNumber = null) {
Expand Down

0 comments on commit df39bc6

Please sign in to comment.