@@ -98,7 +98,7 @@ |
||
98 | 98 | |
99 | 99 | // check validator |
100 | 100 | if (!is_callable($validator)) { |
101 | - throw new Exception('Validator for field ' . $options['id'] . ' is not callable'); |
|
101 | + throw new Exception('Validator for field '.$options['id'].' is not callable'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | if ($options['type'] == 'one-one') { |
70 | 70 | if (empty($options['local'])) { |
71 | - $options['local'] = $relationship . 'ID'; |
|
71 | + $options['local'] = $relationship.'ID'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | if (empty($options['foreign'])) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | if (empty($options['foreign'])) { |
83 | - $options['foreign'] = $classShortName. 'ID'; |
|
83 | + $options['foreign'] = $classShortName.'ID'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | if (!isset($options['indexField'])) { |
@@ -142,12 +142,12 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | if (empty($options['linkLocal'])) { |
145 | - $options['linkLocal'] = $classShortName . 'ID'; |
|
145 | + $options['linkLocal'] = $classShortName.'ID'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | if (empty($options['linkForeign'])) { |
149 | 149 | $foreignShortname = basename(str_replace('\\', '/', $options['class']::$rootClass)); |
150 | - $options['linkForeign'] = $foreignShortname . 'ID'; |
|
150 | + $options['linkForeign'] = $foreignShortname.'ID'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | if (empty($options['local'])) { |
@@ -66,7 +66,7 @@ |
||
66 | 66 | ]; |
67 | 67 | |
68 | 68 | if ($options['order']) { |
69 | - $query .= ' ORDER BY ' . join(',', static::_mapFieldOrder($options['order'])); |
|
69 | + $query .= ' ORDER BY '.join(',', static::_mapFieldOrder($options['order'])); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | if ($options['limit']) { |
@@ -11,7 +11,7 @@ |
||
11 | 11 | throw new \Exception(json_last_error_msg()); |
12 | 12 | } |
13 | 13 | header('Content-type: application/javascript; charset=utf-8', true); |
14 | - echo 'var data = ' . $JSON; |
|
14 | + echo 'var data = '.$JSON; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public static function translateAndRespond($data) |
@@ -101,7 +101,7 @@ |
||
101 | 101 | // update session |
102 | 102 | $Session->setFields($sessionData); |
103 | 103 | if (function_exists('fastcgi_finish_request')) { |
104 | - register_shutdown_function(function (&$Session) { |
|
104 | + register_shutdown_function(function(&$Session) { |
|
105 | 105 | $Session->save(); |
106 | 106 | }, $Session); |
107 | 107 | } else { |
@@ -90,7 +90,7 @@ |
||
90 | 90 | $PreviewMedia = Media::createFromFile($previewPath, [ |
91 | 91 | 'ContextClass' => 'Media' |
92 | 92 | ,'ContextID' => $this->ID |
93 | - ,'Caption' => sprintf('%u sec preview (%us-%us)', static::$previewDuration, $startTime, $startTime+static::$previewDuration), |
|
93 | + ,'Caption' => sprintf('%u sec preview (%us-%us)', static::$previewDuration, $startTime, $startTime + static::$previewDuration), |
|
94 | 94 | ]); |
95 | 95 | |
96 | 96 | return $PreviewMedia; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public static $searchConditions = [ |
70 | 70 | 'Caption' => [ |
71 | - 'qualifiers' => ['any','caption'] |
|
71 | + 'qualifiers' => ['any', 'caption'] |
|
72 | 72 | ,'points' => 2 |
73 | 73 | ,'sql' => 'Caption LIKE "%%%s%%"', |
74 | 74 | ] |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | public static $defaultFilenameFormat = 'default.%s.jpg'; |
98 | 98 | public static $newDirectoryPermissions = 0775; |
99 | 99 | public static $newFilePermissions = 0664; |
100 | - public static $magicPath = null;//'/usr/share/misc/magic.mgc'; |
|
100 | + public static $magicPath = null; //'/usr/share/misc/magic.mgc'; |
|
101 | 101 | public static $useFaceDetection = true; |
102 | 102 | public static $faceDetectionTimeLimit = 10; |
103 | 103 | |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | |
613 | 613 | public static function getBlankPath($contextClass) |
614 | 614 | { |
615 | - $path = ['site-root','img',sprintf(static::$defaultFilenameFormat, $contextClass)]; |
|
615 | + $path = ['site-root', 'img', sprintf(static::$defaultFilenameFormat, $contextClass)]; |
|
616 | 616 | |
617 | 617 | if ($node = Site::resolvePath($path)) { |
618 | 618 | return $node->RealPath; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | // extract video streams |
119 | - $videoStreams = array_filter($output['streams'], function ($streamInfo) { |
|
119 | + $videoStreams = array_filter($output['streams'], function($streamInfo) { |
|
120 | 120 | return $streamInfo['codec_type'] == 'video'; |
121 | 121 | }); |
122 | 122 | |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | $mediaInfo['streams'] = $output['streams']; |
129 | 129 | $mediaInfo['videoStream'] = array_shift($videoStreams); |
130 | 130 | |
131 | - $mediaInfo['width'] = (int)$mediaInfo['videoStream']['width']; |
|
132 | - $mediaInfo['height'] = (int)$mediaInfo['videoStream']['height']; |
|
133 | - $mediaInfo['duration'] = (double)$mediaInfo['videoStream']['duration']; |
|
131 | + $mediaInfo['width'] = (int) $mediaInfo['videoStream']['width']; |
|
132 | + $mediaInfo['height'] = (int) $mediaInfo['videoStream']['height']; |
|
133 | + $mediaInfo['duration'] = (double) $mediaInfo['videoStream']['duration']; |
|
134 | 134 | |
135 | 135 | return $mediaInfo; |
136 | 136 | } |
@@ -10,6 +10,6 @@ |
||
10 | 10 | use \Divergence\App as App; |
11 | 11 | |
12 | 12 | return [ |
13 | - 'debug' => file_exists(App::$App->ApplicationPath . '/.debug'), |
|
14 | - 'environment' => (file_exists(App::$App->ApplicationPath . '/.dev') ? 'dev' : 'production'), |
|
13 | + 'debug' => file_exists(App::$App->ApplicationPath.'/.debug'), |
|
14 | + 'environment' => (file_exists(App::$App->ApplicationPath.'/.dev') ? 'dev' : 'production'), |
|
15 | 15 | ]; |