@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | $source = static::connection(); |
| 45 | 45 | $pdo = $source->connection; |
| 46 | 46 | |
| 47 | - $tpgTables =& static::$tpgTables; |
|
| 47 | + $tpgTables = & static::$tpgTables; |
|
| 48 | 48 | $result = true; |
| 49 | 49 | /* @var $tpgTables string[][] */ |
| 50 | - foreach($tpgTables as $prefix) { |
|
| 50 | + foreach ($tpgTables as $prefix) { |
|
| 51 | 51 | $result = $pdo->exec("CREATE TABLE IF NOT EXISTS {$prefix}_{$groupId} LIKE {$prefix}"); |
| 52 | 52 | if ($result === false) { |
| 53 | 53 | break; |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | public static function init() |
| 61 | 61 | { |
| 62 | 62 | static::finder('tpg', |
| 63 | - function ($params, $next) { |
|
| 64 | - if (! isset($params['options']['prefix'])) { |
|
| 63 | + function($params, $next) { |
|
| 64 | + if (!isset($params['options']['prefix'])) { |
|
| 65 | 65 | throw new \InvalidArgumentException('The option "prefix" is required for the TPG finder'); |
| 66 | 66 | } |
| 67 | 67 | $params = [ |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | public static function tpg(string $prefix): array |
| 133 | 133 | { |
| 134 | - if (! \in_array($prefix, static::$tpgTables, false)) { |
|
| 134 | + if (!\in_array($prefix, static::$tpgTables, false)) { |
|
| 135 | 135 | throw new \InvalidArgumentException("Argument must be one of: 'binaries', 'collections', 'missed_parts', or 'parts'"); |
| 136 | 136 | }; |
| 137 | 137 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | |
| 81 | 81 | Filters::apply(Ypart::class, |
| 82 | 82 | 'parseBlock', |
| 83 | - function ($params, $next) { |
|
| 83 | + function($params, $next) { |
|
| 84 | 84 | return $next($params); |
| 85 | 85 | }); |
| 86 | 86 | |
@@ -26,22 +26,22 @@ |
||
| 26 | 26 | $adapter = 'Php'; |
| 27 | 27 | } else { |
| 28 | 28 | switch (true) { |
| 29 | - case extension_loaded('yenc'): |
|
| 30 | - if (method_exists('\yenc\yEnc', 'version') && |
|
| 31 | - version_compare( |
|
| 32 | - \yenc\yEnc::version(), |
|
| 33 | - '1.2.2', |
|
| 34 | - '>=' |
|
| 35 | - ) |
|
| 36 | - ) { |
|
| 37 | - $adapter = 'NzedbYenc'; |
|
| 38 | - break; |
|
| 39 | - } else { |
|
| 40 | - trigger_error('Your version of the php-yenc extension is out of date and will be |
|
| 29 | + case extension_loaded('yenc'): |
|
| 30 | + if (method_exists('\yenc\yEnc', 'version') && |
|
| 31 | + version_compare( |
|
| 32 | + \yenc\yEnc::version(), |
|
| 33 | + '1.2.2', |
|
| 34 | + '>=' |
|
| 35 | + ) |
|
| 36 | + ) { |
|
| 37 | + $adapter = 'NzedbYenc'; |
|
| 38 | + break; |
|
| 39 | + } else { |
|
| 40 | + trigger_error('Your version of the php-yenc extension is out of date and will be |
|
| 41 | 41 | ignored. Please update it to use the extension.', E_USER_WARNING); |
| 42 | - } |
|
| 43 | - default: |
|
| 44 | - $adapter = 'Php'; |
|
| 42 | + } |
|
| 43 | + default: |
|
| 44 | + $adapter = 'Php'; |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | \lithium\util\Inflector::rules('uninflected', ['predb']); |
| 78 | 78 | |
| 79 | -if (! \defined('DB_MOCK')) { |
|
| 79 | +if (!\defined('DB_MOCK')) { |
|
| 80 | 80 | // Add new condition to use DB_MOCK mode here. |
| 81 | 81 | if (\defined('MAINTENANCE_MODE_ENABLED') && MAINTENANCE_MODE_ENABLED == true) { |
| 82 | 82 | \define('DB_MOCK', true); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | } else if (file_exists(nZEDb_CONFIGS . 'dev-config.json')) { |
| 182 | 182 | $config = json_decode(file_get_contents(nZEDb_CONFIGS . 'dev-config.json'), true); |
| 183 | - $db =& $config['db']; |
|
| 183 | + $db = & $config['db']; |
|
| 184 | 184 | |
| 185 | 185 | switch ($db['system']) { |
| 186 | 186 | case 'mysql': |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | define('DB_PCONNECT', $db['persist']); |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - $usp =& $config['usp']; |
|
| 254 | + $usp = & $config['usp']; |
|
| 255 | 255 | |
| 256 | 256 | define('NNTP_USERNAME', $usp['connection1']['username']); |
| 257 | 257 | define('NNTP_PASSWORD', $usp['connection1']['password']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * directory as your application. If you use the same libraries in multiple applications, you can |
| 64 | 64 | * set this to a shared path on your server. |
| 65 | 65 | */ |
| 66 | -if(!\defined('LITHIUM_LIBRARY_PATH')) { |
|
| 66 | +if (!\defined('LITHIUM_LIBRARY_PATH')) { |
|
| 67 | 67 | \define('LITHIUM_LIBRARY_PATH', \realpath(\dirname(__DIR__, 3) . '/libraries')); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | $pdo = new DB(); |
| 34 | 34 | |
| 35 | -if (! Settings::value('..tablepergroup')) { |
|
| 35 | +if (!Settings::value('..tablepergroup')) { |
|
| 36 | 36 | exit("Tables per groups is not enabled, quitting!"); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $conditions += empty($groupname) ? [] : ['name' => ['LIKE' => "%$groupname%"]]; |
| 15 | 15 | |
| 16 | 16 | $count = Groups::find('count', ['conditions' => $conditions]); |
| 17 | -$grouplist = Groups::getRange($pageno,ITEMS_PER_PAGE, $groupname, false); |
|
| 17 | +$grouplist = Groups::getRange($pageno, ITEMS_PER_PAGE, $groupname, false); |
|
| 18 | 18 | |
| 19 | 19 | $groupsearch = empty($_REQUEST['groupname']) ? '' : '&groupname=' . $_REQUEST['groupname']; |
| 20 | 20 | |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $enabled = Settings::value(self::RECAPTCHA_SETTING_ENABLED); |
| 196 | - if (!empty($enabled) && $enabled > 0 ) {// Only disable if the setting exists and is truish. |
|
| 196 | + if (!empty($enabled) && $enabled > 0) {// Only disable if the setting exists and is truish. |
|
| 197 | 197 | $this->sitekey = Settings::value(self::RECAPTCHA_SETTING_SITEKEY); |
| 198 | 198 | $this->secretkey = Settings::value(self::RECAPTCHA_SETTING_SECRETKEY); |
| 199 | 199 | |
@@ -193,7 +193,8 @@ |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $enabled = Settings::value(self::RECAPTCHA_SETTING_ENABLED); |
| 196 | - if (!empty($enabled) && $enabled > 0 ) {// Only disable if the setting exists and is truish. |
|
| 196 | + if (!empty($enabled) && $enabled > 0 ) { |
|
| 197 | +// Only disable if the setting exists and is truish. |
|
| 197 | 198 | $this->sitekey = Settings::value(self::RECAPTCHA_SETTING_SITEKEY); |
| 198 | 199 | $this->secretkey = Settings::value(self::RECAPTCHA_SETTING_SECRETKEY); |
| 199 | 200 | |
@@ -6,9 +6,9 @@ |
||
| 6 | 6 | { |
| 7 | 7 | // Anime is one of the types below. _TV if serial, _FILM if cinema or OVA, etc. |
| 8 | 8 | const TYPE_UNKNOWN = 0; |
| 9 | - const TYPE_TV = 1; // TV programme, but not a film. |
|
| 10 | - const TYPE_FILM = 2; // Film of any type, except if made for TV (i.e. TV Movie on IMDb)/ |
|
| 11 | - const TYPE_TVFILM = 3; // Made for TV Film |
|
| 9 | + const TYPE_TV = 1; // TV programme, but not a film. |
|
| 10 | + const TYPE_FILM = 2; // Film of any type, except if made for TV (i.e. TV Movie on IMDb)/ |
|
| 11 | + const TYPE_TVFILM = 3; // Made for TV Film |
|
| 12 | 12 | |
| 13 | 13 | public $validates = []; |
| 14 | 14 | } |
@@ -4,11 +4,16 @@ |
||
| 4 | 4 | |
| 5 | 5 | use app\models\Videos; |
| 6 | 6 | |
| 7 | -class VideosTest extends \lithium\test\Unit { |
|
| 7 | +class VideosTest extends \lithium\test\Unit |
|
| 8 | +{ |
|
| 8 | 9 | |
| 9 | - public function setUp() {} |
|
| 10 | + public function setUp() |
|
| 11 | + { |
|
| 12 | +} |
|
| 10 | 13 | |
| 11 | - public function tearDown() {} |
|
| 14 | + public function tearDown() |
|
| 15 | + { |
|
| 16 | +} |
|
| 12 | 17 | |
| 13 | 18 | |
| 14 | 19 | } |