@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | if (is_array($band) && !empty($band[$instrument])) { |
96 | 96 | $performers = array_map( |
97 | - function ($performer) { |
|
97 | + function($performer) { |
|
98 | 98 | return $performer['performerName']; |
99 | 99 | }, |
100 | 100 | $band[$instrument] |
@@ -5,8 +5,8 @@ |
||
5 | 5 | /** |
6 | 6 | * @var Composer\Autoload\ClassLoader |
7 | 7 | */ |
8 | -$loader = require __DIR__.'/../app/autoload.php'; |
|
9 | -include_once __DIR__.'/../var/bootstrap.php.cache'; |
|
8 | +$loader = require __DIR__ . '/../app/autoload.php'; |
|
9 | +include_once __DIR__ . '/../var/bootstrap.php.cache'; |
|
10 | 10 | |
11 | 11 | // Enable APC for autoloading to improve performance. |
12 | 12 | // You should change the ApcClassLoader first argument to a unique prefix |
@@ -15,13 +15,13 @@ |
||
15 | 15 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server') |
16 | 16 | ) { |
17 | 17 | header('HTTP/1.0 403 Forbidden'); |
18 | - exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
|
18 | + exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.'); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var Composer\Autoload\ClassLoader $loader |
23 | 23 | */ |
24 | -$loader = require __DIR__.'/../app/autoload.php'; |
|
24 | +$loader = require __DIR__ . '/../app/autoload.php'; |
|
25 | 25 | Debug::enable(); |
26 | 26 | |
27 | 27 | $kernel = new AppKernel('dev', true); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | protected function concatenateEscapedFields($fields) |
17 | 17 | { |
18 | - return 'CONCAT('.implode(', ', $fields).')'; |
|
18 | + return 'CONCAT(' . implode(', ', $fields) . ')'; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param $title |
25 | 25 | * @param $songId |
26 | 26 | * |
27 | - * @return int|false |
|
27 | + * @return string|false |
|
28 | 28 | */ |
29 | 29 | public function storeNewTicket($title, $songId) |
30 | 30 | { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param $performerName |
49 | 49 | * @param bool|false $createMissing |
50 | 50 | * |
51 | - * @return mixed |
|
51 | + * @return string|boolean |
|
52 | 52 | */ |
53 | 53 | public function fetchPerformerIdByName($performerName, $createMissing = false) |
54 | 54 | { |
@@ -6,7 +6,7 @@ |
||
6 | 6 | /** |
7 | 7 | * @var ClassLoader $loader |
8 | 8 | */ |
9 | -$loader = require __DIR__.'/../vendor/autoload.php'; |
|
9 | +$loader = require __DIR__ . '/../vendor/autoload.php'; |
|
10 | 10 | |
11 | 11 | AnnotationRegistry::registerLoader([$loader, 'loadClass']); |
12 | 12 |
@@ -36,16 +36,16 @@ |
||
36 | 36 | |
37 | 37 | public function getCacheDir() |
38 | 38 | { |
39 | - return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); |
|
39 | + return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function getLogDir() |
43 | 43 | { |
44 | - return dirname(__DIR__).'/var/logs'; |
|
44 | + return dirname(__DIR__) . '/var/logs'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function registerContainerConfiguration(LoaderInterface $loader) |
48 | 48 | { |
49 | - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); |
|
49 | + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); |
|
50 | 50 | } |
51 | 51 | } |
@@ -262,6 +262,9 @@ discard block |
||
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
265 | + /** |
|
266 | + * @param string $performerName |
|
267 | + */ |
|
265 | 268 | public function fetchPerformerIdByName($performerName, $createMissing = false) |
266 | 269 | { |
267 | 270 | $conn = $this->getDbConn(); |
@@ -638,7 +641,7 @@ discard block |
||
638 | 641 | /** |
639 | 642 | * Return SQL in appropriate dialect to concatenate the listed values |
640 | 643 | * |
641 | - * @param array $fields |
|
644 | + * @param string[] $fields |
|
642 | 645 | * |
643 | 646 | * @return string |
644 | 647 | */ |
@@ -814,6 +817,9 @@ discard block |
||
814 | 817 | return $source; |
815 | 818 | } |
816 | 819 | |
820 | + /** |
|
821 | + * @param string $platformName |
|
822 | + */ |
|
817 | 823 | public function fetchPlatformByName($platformName) |
818 | 824 | { |
819 | 825 | $platform = null; |
@@ -833,7 +839,7 @@ discard block |
||
833 | 839 | } |
834 | 840 | |
835 | 841 | /** |
836 | - * @param $songId |
|
842 | + * @param integer $songId |
|
837 | 843 | * @param array $platformIds |
838 | 844 | */ |
839 | 845 | public function storeSongPlatformLinks($songId, array $platformIds) |
@@ -887,7 +893,7 @@ discard block |
||
887 | 893 | |
888 | 894 | |
889 | 895 | /** |
890 | - * @param $songId |
|
896 | + * @param integer $songId |
|
891 | 897 | * @param array $instrumentIds |
892 | 898 | * @throws \Doctrine\DBAL\Exception\InvalidArgumentException |
893 | 899 | */ |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $dataStore = $this; |
171 | 171 | $instruments = $dataStore->fetchInstrumentsForSongId($song['id']); |
172 | 172 | $instruments = array_map( |
173 | - function (Instrument $instrument) { |
|
173 | + function(Instrument $instrument) { |
|
174 | 174 | return $instrument->getName(); |
175 | 175 | }, |
176 | 176 | $instruments |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | $platforms = $dataStore->fetchPlatformsForSongId($song['id']); |
186 | 186 | $platforms = array_map( |
187 | - function (Platform $platform) { |
|
187 | + function(Platform $platform) { |
|
188 | 188 | return $platform->getName(); |
189 | 189 | }, |
190 | 190 | $platforms |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | |
915 | 915 | $dbConn = $this; |
916 | 916 | $instruments = array_map( |
917 | - function ($row) use ($dbConn) { |
|
917 | + function($row) use ($dbConn) { |
|
918 | 918 | return $dbConn->buildInstrumentFromDbRow($row); |
919 | 919 | }, |
920 | 920 | $instrumentRows |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | |
938 | 938 | $dbConn = $this; |
939 | 939 | $platforms = array_map( |
940 | - function ($row) use ($dbConn) { |
|
940 | + function($row) use ($dbConn) { |
|
941 | 941 | return $dbConn->buildPlatformFromDbRow($row); |
942 | 942 | }, |
943 | 943 | $platformRows |
@@ -172,7 +172,7 @@ |
||
172 | 172 | |
173 | 173 | $datastore = $this->dataStore; |
174 | 174 | $instrumentIds = array_map( |
175 | - function ($name) use ($datastore) { |
|
175 | + function($name) use ($datastore) { |
|
176 | 176 | $instrument = $datastore->fetchInstrumentByName($name); |
177 | 177 | return $instrument ? $instrument->getId() : null; |
178 | 178 | }, |
@@ -77,7 +77,7 @@ |
||
77 | 77 | * @noinspection RealpathInSteamContextInspection |
78 | 78 | */ |
79 | 79 | $allPlatforms = $this->dataSource->fetchAllPlatforms(); |
80 | - $platformNames = array_map(function (Platform $platform) { |
|
80 | + $platformNames = array_map(function(Platform $platform) { |
|
81 | 81 | return $platform->getName(); |
82 | 82 | }, $allPlatforms); |
83 | 83 |