@@ -29,17 +29,17 @@ |
||
29 | 29 | |
30 | 30 | public function setBooleanValue($value): bool |
31 | 31 | { |
32 | - return (bool)$value; |
|
32 | + return (bool) $value; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function setDecimalValue($value): ?float |
36 | 36 | { |
37 | - return is_null($value) ? null : (float)preg_replace('/[^-\d.]/', '', $value); |
|
37 | + return is_null($value) ? null : (float) preg_replace('/[^-\d.]/', '', $value); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function setIntegerValue($value): ?int |
41 | 41 | { |
42 | - return is_null($value) ? null : (int)preg_replace('/[^-\d]/', '', $value); |
|
42 | + return is_null($value) ? null : (int) preg_replace('/[^-\d]/', '', $value); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function setTimestampValue($value): ?string |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public static $searchConditions = [ |
73 | 73 | 'Caption' => [ |
74 | - 'qualifiers' => ['any','caption'], |
|
74 | + 'qualifiers' => ['any', 'caption'], |
|
75 | 75 | 'points' => 2, |
76 | 76 | 'sql' => 'Caption LIKE "%%%s%%"', |
77 | 77 | ], |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public static $defaultFilenameFormat = 'default.%s.jpg'; |
101 | 101 | public static $newDirectoryPermissions = 0775; |
102 | 102 | public static $newFilePermissions = 0664; |
103 | - public static $magicPath = null;//'/usr/share/misc/magic.mgc'; |
|
103 | + public static $magicPath = null; //'/usr/share/misc/magic.mgc'; |
|
104 | 104 | public static $useFaceDetection = true; |
105 | 105 | public static $faceDetectionTimeLimit = 10; |
106 | 106 | |
@@ -469,10 +469,10 @@ discard block |
||
469 | 469 | |
470 | 470 | public function initializeFromAnalysis($mediaInfo) |
471 | 471 | { |
472 | - $this->setValue('MIMEType',$mediaInfo['mimeType']); |
|
473 | - $this->setValue('Width',$mediaInfo['width']); |
|
474 | - $this->setValue('Height',$mediaInfo['height']); |
|
475 | - $this->setValue('Duration',$mediaInfo['duration']); |
|
472 | + $this->setValue('MIMEType', $mediaInfo['mimeType']); |
|
473 | + $this->setValue('Width', $mediaInfo['width']); |
|
474 | + $this->setValue('Height', $mediaInfo['height']); |
|
475 | + $this->setValue('Duration', $mediaInfo['duration']); |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | // determine handler |
521 | 521 | $staticClass = get_called_class(); |
522 | 522 | if (!isset(static::$mimeHandlers[$mediaInfo['mimeType']]) || $staticClass != __CLASS__) { |
523 | - throw new Exception('No class registered for mime type "' . $mediaInfo['mimeType'] . '"'); |
|
523 | + throw new Exception('No class registered for mime type "'.$mediaInfo['mimeType'].'"'); |
|
524 | 524 | } else { |
525 | 525 | $className = $mediaInfo['className'] = static::$mimeHandlers[$mediaInfo['mimeType']]; |
526 | 526 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $PreviewMedia = Media::createFromFile($previewPath, [ |
88 | 88 | 'ContextClass' => 'Media' |
89 | 89 | ,'ContextID' => $this->getValue('ID') |
90 | - ,'Caption' => sprintf('%u sec preview (%us-%us)', static::$previewDuration, $startTime, $startTime+static::$previewDuration), |
|
90 | + ,'Caption' => sprintf('%u sec preview (%us-%us)', static::$previewDuration, $startTime, $startTime + static::$previewDuration), |
|
91 | 91 | ]); |
92 | 92 | |
93 | 93 | return $PreviewMedia; |