<?php tmpfile(): resource|false
<?php return $this->createWithContent($name, $kilobytes); } return tap(new File($name, tmpfile()), function ($file) use ($kilobytes, $mimeType) { $file->sizeToReport = $kilobytes * 1024; $file->mimeTypeToReport = $mimeType; });
<?php public function createWithContent($name, $content) { $tmpfile = tmpfile(); fwrite($tmpfile, $content);
<?php throw new LogicException('GD extension is not installed.'); } return tap(tmpfile(), function ($temp) use ($width, $height, $extension) { ob_start(); $extension = in_array($extension, ['jpeg', 'png', 'gif', 'webp', 'wbmp', 'bmp'])
<?php protected function dump($value) { $outputFile = stream_get_meta_data(tmpfile())['uri']; $dumper = new HtmlDumper( '/my-work-directory',
<?php public static function jsonErrorDataProvider() { $resource = tmpfile(); $recursiveObject = new stdClass;
<?php { $this->fails( File::image()->dimensions(Rule::dimensions()->width(100)->height(100)), new UploadedFileWithCustomImageSizeMethod(stream_get_meta_data($tmpFile = tmpfile())['uri'], 'foo.png'), ['validation.dimensions'], );
<?php $this->passes( File::image()->dimensions(Rule::dimensions()->width(200)->height(200)), new UploadedFileWithCustomImageSizeMethod(stream_get_meta_data($tmpFile = tmpfile())['uri'], 'foo.png'), ); }