for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Recca0120\Upload;
class ChunkFileFactory
{
/**
* __construct.
*
* @param \Recca0120\Upload\Filesystem $files
*/
public function __construct(Filesystem $files = null)
$this->files = $files ?: new Filesystem();
files
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* create.
* @return \Recca0120\Upload\ChunkFile
public function create($name, $chunksPath, $storagePath, $token = null)
return new ChunkFile($name, $chunksPath, $storagePath, $token, $this->files);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: