<commit_before><?php

/** @noinspection PhpUndefinedClassInspection */

namespace App\ModelFunctions;

use App\Album;
use App\Configs;
use App\Image\ImageHandlerInterface;
use App\Logs;
use App\Metadata\Extractor;
use App\Photo;
use App\Response;
use Exception;
use FFMpeg;
use Illuminate\Database\QueryException;
use Storage;

class PhotoFunctions
{
	/**
	 * @var Extractor
	 */
	private $metadataExtractor;

	/**
	 * @var ImageHandlerInterface
	 */
	private $imageHandler;

	/**
	 * @var SessionFunctions
	 */
	private $sessionFunctions;

	/**
	 * @var array
	 */
	public $validTypes = [
		IMAGETYPE_JPEG,
		IMAGETYPE_GIF,
		IMAGETYPE_PNG,
	];

	/**
	 * @var array
	 */
	public $validVideoTypes = [
		'video/mp4',
		'video/mpeg',
		'video/ogg',
		'video/webm',
		'video/quicktime',
		'video/x-ms-asf', // wmv file
		'video/x-msvideo', // Avi
		'video/x-m4v', // Avi
	];

	/**
	 * @var array
	 */
	public $validExtensions = [
		'.jpg',
		'.jpeg',
		'.png',
		'.gif',
		'.ogv',
		'.mp4',
		'.mpg',
		'.webm',
		'.mov',
		'.m4v',
		'.avi',
		'.wmv',
	];

	/**
	 * PhotoFunctions constructor.
	 *
	 * @param Extractor             $metadataExtractor
	 * @param ImageHandlerInterface $imageHandler
	 * @param SessionFunctions      $sessionFunctions
	 */
	public function __construct(Extractor $metadataExtractor, ImageHandlerInterface $imageHandler, SessionFunctions $sessionFunctions)
	{<commit_msg>fixes https://github.com/LycheeOrg/Lychee/issues/341 (#476)<commit_after><?php

/** @noinspection PhpUndefinedClassInspection */

namespace App\ModelFunctions;

use App\Album;
use App\Configs;
use App\Image\ImageHandlerInterface;
use App\Logs;
use App\Metadata\Extractor;
use App\Photo;
use App\Response;
use Exception;
use FFMpeg;
use Illuminate\Database\QueryException;
use Storage;

class PhotoFunctions
{
	/**
	 * @var Extractor
	 */
	private $metadataExtractor;

	/**
	 * @var ImageHandlerInterface
	 */
	private $imageHandler;

	/**
	 * @var SessionFunctions
	 */
	private $sessionFunctions;

	/**
	 * @var array
	 */
	public $validTypes = [
		IMAGETYPE_JPEG,
		IMAGETYPE_GIF,
		IMAGETYPE_PNG,
	];

	/**
	 * @var array
	 */
	public $validVideoTypes = [
		'video/mp4',
		'video/mpeg',
		'video/ogg',
		'video/webm',
		'video/quicktime',
		'video/x-ms-asf', // wmv file
		'video/x-msvideo', // Avi
		'video/x-m4v', // Avi
	];

	/**
	 * @var array
	 */
	public $validExtensions = [
		'.jpg',
		'.jpeg',
		'.png',
		'.gif',
		'.ogv',
		'.mp4',
		'.mpg',
		'.webm',
		'.webp',
		'.mov',
		'.m4v',
		'.avi',
		'.wmv',
	];

	/**
	 * PhotoFunctions constructor.
	 *
	 * @param Extractor             $metadataExtractor
	 * @param ImageHandlerInterface $imageHandler
	 * @param SessionFunctions      $sessionFunctions
	 */
	public function __construct(Extractor $metadataExtractor, ImageHandlerInterface $imageHandler, SessionFunctions $sessionFunctions)
	{
{'fraction_non_alphanumeric': 0.1575991575991576, 'fraction_numerical': 0.004914004914004914, 'mean_word_length': 3.2921686746987953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4922379', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1009, 'n_words': 201}