src/Snapshot/CollectionSnapshot.php
/**
     * Snapshots a value
     *
     * If the value is already a snapshot, it won't be snapshotted ; otherwise,
     * if the class is null, then the value will be left as is.
     *
     * @param mixed  $value Value to snapshot
     * @param string $class Class to use to snapshot the value
     *
     * @return mixed A snapshot if the value was snapshotted, the original value otherwise
     */
Snapshots a value
If the value is already a snapshot, it won't be snapshotted ; otherwise,
if the class is null, then the value will be left as is.

@param mixed  $value Value to snapshot
@param string $class Class to use to snapshot the value

@return mixed A snapshot if the value was snapshotted, the original value otherwise
Snapshots a value If the value is already a snapshot it won ' t be snapshotted ; otherwise if the class is null then the value will be left as is . @param mixed $value Value to snapshot @param string $class Class to use to snapshot the value @return mixed A snapshot if the value was snapshotted the original value otherwise
private function snapshot($value, $class = null)
    {
        if (null === $class || $value instanceof AbstractSnapshot) {
            return $value;
        }
        return new $class($value);
    }
private function snapshot ( $ value , $ class = null ) { if ( null === $ class || $ value instanceof AbstractSnapshot ) { return $ value ; } return new $ class ( $ value ) ; }
Snapshots a value
 If the value is already a snapshot, it won't be snapshotted ; otherwise,
 if the class is null, then the value will be left as is.
Snapshots a value If the value is already a snapshot it won ' t be snapshotted ; otherwise if the class is null then the value will be left as is .