diff --git a/composer.lock b/composer.lock index d1e3cdcc..da302831 100644 --- a/composer.lock +++ b/composer.lock @@ -3045,16 +3045,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", + "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", "shasum": "" }, "require": { @@ -3089,7 +3089,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2019-12-15T19:12:40+00:00" }, { "name": "phar-io/manifest", @@ -3247,16 +3247,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", "shasum": "" }, "require": { @@ -3268,6 +3268,7 @@ "require-dev": { "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4" }, "type": "library", @@ -3294,7 +3295,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2019-12-28T18:55:12+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -3345,33 +3346,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -3404,7 +3405,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2019-12-22T21:05:45+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3660,16 +3661,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.18", + "version": "7.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fcf6c4bfafaadc07785528b06385cce88935474d" + "reference": "4263f76a3fc65385e242ef7357b99f3bed36707e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fcf6c4bfafaadc07785528b06385cce88935474d", - "reference": "fcf6c4bfafaadc07785528b06385cce88935474d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4263f76a3fc65385e242ef7357b99f3bed36707e", + "reference": "4263f76a3fc65385e242ef7357b99f3bed36707e", "shasum": "" }, "require": { @@ -3740,7 +3741,7 @@ "testing", "xunit" ], - "time": "2019-12-06T05:14:37+00:00" + "time": "2020-01-06T16:53:05+00:00" }, { "name": "satooshi/php-coveralls", diff --git a/generated-classes/TechWilk/Rota/User.php b/generated-classes/TechWilk/Rota/User.php index 8ec997a8..b7974835 100644 --- a/generated-classes/TechWilk/Rota/User.php +++ b/generated-classes/TechWilk/Rota/User.php @@ -70,8 +70,8 @@ public function setPassword($v) if (!password_verify($v, $this->password)) { $bcrypt_options = [ - 'cost' => 12, - ]; + 'cost' => 12, + ]; $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options); $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true; diff --git a/generated-conf/config.php b/generated-conf/config.php index 1195e3a7..dd115f76 100644 --- a/generated-conf/config.php +++ b/generated-conf/config.php @@ -7,18 +7,18 @@ $serviceContainer->setAdapterClass('default', 'mysql'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], - 'user' => $config['db']['user'], - 'password' => $config['db']['pass'], - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], + 'user' => $config['db']['user'], + 'password' => $config['db']['pass'], + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); @@ -26,16 +26,16 @@ $serviceContainer->setAdapterClass('test', 'sqlite'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'sqlite:/var/tmp/test.db', - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'sqlite:/var/tmp/test.db', + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('test'); $serviceContainer->setConnectionManager('test', $manager); diff --git a/generated-migrations/PropelMigration_1494860053.php b/generated-migrations/PropelMigration_1494860053.php index 468dd151..9bfeb5cc 100644 --- a/generated-migrations/PropelMigration_1494860053.php +++ b/generated-migrations/PropelMigration_1494860053.php @@ -40,7 +40,7 @@ public function postDown(MigrationManager $manager) public function getUpSQL() { return [ - 'default' => ' + 'default' => ' # This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; @@ -160,7 +160,7 @@ public function getUpSQL() # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1; ', -]; + ]; } /** @@ -172,7 +172,7 @@ public function getUpSQL() public function getDownSQL() { return [ - 'default' => ' + 'default' => ' # This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; @@ -270,6 +270,6 @@ public function getDownSQL() # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1; ', -]; + ]; } } diff --git a/public/api/v1/index.php b/public/api/v1/index.php index 5fe8861e..72fdeeee 100644 --- a/public/api/v1/index.php +++ b/public/api/v1/index.php @@ -17,68 +17,66 @@ function isAdmin() } } -if (isAdmin()): +if (isAdmin()) { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Start of API -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Start of API + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -require_once __DIR__.'/../../../vendor/autoload.php'; + require_once __DIR__.'/../../../vendor/autoload.php'; -require_once __DIR__.'/../../../generated-conf/config.php'; + require_once __DIR__.'/../../../generated-conf/config.php'; -// Create and configure Slim app -$app = new \Slim\App(['settings' => $config]); + // Create and configure Slim app + $app = new \Slim\App(['settings' => $config]); -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Containers for DI -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Containers for DI + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -$container = $app->getContainer(); + $container = $app->getContainer(); -$container['db'] = function ($c) { - $db_config = $c['settings']['db']; - $db = new Database($db_config); + $container['db'] = function ($c) { + $db_config = $c['settings']['db']; + $db = new Database($db_config); - return $db; -}; + return $db; + }; -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Define app routes -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Define app routes + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~ + // ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~ -$app->post('/series', function ($request, $response, $args) { - $postData = $request->getParsedBody(); + $app->post('/series', function ($request, $response, $args) { + $postData = $request->getParsedBody(); - $name = filter_var($postData['name'], FILTER_SANITIZE_STRING); - $description = filter_var($postData['description'], FILTER_SANITIZE_STRING); + $name = filter_var($postData['name'], FILTER_SANITIZE_STRING); + $description = filter_var($postData['description'], FILTER_SANITIZE_STRING); - $series = new EventGroup(); - $series->setName($name); - $series->setDescription($description); - $series->save(); + $series = new EventGroup(); + $series->setName($name); + $series->setDescription($description); + $series->save(); - $data = [ - 'data' => [ - 'id' => $series->getId(), - 'name' => $series->getName(), - 'description' => $series->getDescription(), - ], - ]; + $data = [ + 'data' => [ + 'id' => $series->getId(), + 'name' => $series->getName(), + 'description' => $series->getDescription(), + ], + ]; - return $response->withJson($data); -}); + return $response->withJson($data); + }); -// Run app -$app->run(); + // Run app + $app->run(); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // End of very very very basic auth // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -else: -http_response_code(401); - -endif; +} else { + http_response_code(401); +} diff --git a/public/old/createEvent.php b/public/old/createEvent.php index 0ed4b2d9..a833be08 100755 --- a/public/old/createEvent.php +++ b/public/old/createEvent.php @@ -543,38 +543,38 @@ } $groups = GroupQuery::create()->joinWith('Group.Role')->joinWith('Role.UserRole')->find(); - foreach ($groups as $group): ?> + foreach ($groups as $group) { ?> getName() ?> - getRoles() as $role): ?> + getRoles() as $role) { ?>
- + - + - +
- +
- 0): ?> - + 0) { ?> +
- - + +
diff --git a/public/old/emailGroup.php b/public/old/emailGroup.php index 58eee33b..bb5199d1 100644 --- a/public/old/emailGroup.php +++ b/public/old/emailGroup.php @@ -110,13 +110,13 @@

Send to

- 0): ?> - + 0) { ?> +
- - + +
diff --git a/public/old/includes/footer.php b/public/old/includes/footer.php index 621c8d96..0c8c43c1 100755 --- a/public/old/includes/footer.php +++ b/public/old/includes/footer.php @@ -118,9 +118,11 @@ - + - + seen == false) { $unseen += 1; } - } - ?> + } ?>
  • @@ -357,7 +356,7 @@ */ - if (isset($_SESSION['userid'])): ?> + if (isset($_SESSION['userid'])) { ?> - +
  • @@ -486,11 +485,11 @@
  • > View All
  • - +
  • > Add Event
  • - + > Settings - +
  • >Login
  • - + diff --git a/public/old/linkSocialAuth.php b/public/old/linkSocialAuth.php index c97c2dca..ac5face1 100644 --- a/public/old/linkSocialAuth.php +++ b/public/old/linkSocialAuth.php @@ -88,37 +88,37 @@
    - +

    Social login has not been enabled.

    Speak with your site administrator if you think this feature should be enabled.

    - + - +

    - +
    - +
    - +
    - +

    - +
    @@ -116,9 +116,9 @@ '.$sentSuccess.'
    '; - endif; + } ?> diff --git a/public/old/pendingAccounts.php b/public/old/pendingAccounts.php index c5f45243..e866c0fe 100644 --- a/public/old/pendingAccounts.php +++ b/public/old/pendingAccounts.php @@ -102,7 +102,7 @@

    Source: source ?>

    - + - + - +

    Merge with existing user

    @@ -132,9 +132,9 @@
    @@ -143,6 +143,6 @@ - + diff --git a/public/old/recordingUpload.php b/public/old/recordingUpload.php index 66245e28..1128b209 100644 --- a/public/old/recordingUpload.php +++ b/public/old/recordingUpload.php @@ -37,7 +37,7 @@ 'POST', 'v3/tokens.json', ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'], - 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] + 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] ); if ($response->getStatusCode() == 201) { $token = json_decode($response->getBody())->token; diff --git a/public/old/series.php b/public/old/series.php index 400ca6d7..43e371ec 100644 --- a/public/old/series.php +++ b/public/old/series.php @@ -106,13 +106,13 @@ } ?> - +

    Error

    - +

    Add Series:

    diff --git a/public/old/settings.php b/public/old/settings.php index feaf241a..ce0fbcfe 100755 --- a/public/old/settings.php +++ b/public/old/settings.php @@ -342,21 +342,21 @@
    diff --git a/public/old/swap.php b/public/old/swap.php index dfd5338b..18923b49 100644 --- a/public/old/swap.php +++ b/public/old/swap.php @@ -165,15 +165,15 @@
    + if (isset($message)) { ?>

    - +

    Error:

    - + getId()); $canDeclineSwap = canDeclineSwap($swap->getId()); @@ -198,21 +198,21 @@

    This swap is awaiting approval

    ' : '' ?>
    - + - + - 0): ?> + 0) { ?> - +
    @@ -248,11 +248,11 @@
    - + - 0): ?> + 0) { ?> - +
    @@ -271,16 +271,16 @@
    - + - +

    There are no roles in the event you are skilled to cover.

    If you need adding to the rota, speak to an admin.

    - + diff --git a/public/old/swaps.php b/public/old/swaps.php index 9426c8d8..aca9d191 100644 --- a/public/old/swaps.php +++ b/public/old/swaps.php @@ -79,7 +79,7 @@
    - + getEventPerson()->getEvent() ?>
    @@ -105,20 +105,20 @@ $canAcceptSwap = canAcceptSwap($swap->getId()); $canDeclineSwap = canDeclineSwap($swap->getId()); ?> - + - +
    - +
    diff --git a/tests/Integration/BaseTestCase.php b/tests/Integration/BaseTestCase.php index 5e80c49d..4312b20d 100644 --- a/tests/Integration/BaseTestCase.php +++ b/tests/Integration/BaseTestCase.php @@ -125,16 +125,16 @@ protected function loadDatabase() $serviceContainer->setAdapterClass('default', 'sqlite'); $manager = new ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'sqlite:/var/tmp/test.db', - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'sqlite:/var/tmp/test.db', + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); @@ -151,9 +151,9 @@ protected function installDatabase() $sqlManager = new SqlManager(); $sqlManager->setConnections( ['default' => [ - 'dsn' => 'sqlite:/var/tmp/test.db', - 'adapter' => 'sqlite', - ], + 'dsn' => 'sqlite:/var/tmp/test.db', + 'adapter' => 'sqlite', + ], ] ); $sqlManager->setWorkingDirectory(__DIR__.'/../../generated-sql'); diff --git a/tests/Unit/BaseTestCase.php b/tests/Unit/BaseTestCase.php index 73afcf5d..555799e2 100644 --- a/tests/Unit/BaseTestCase.php +++ b/tests/Unit/BaseTestCase.php @@ -18,16 +18,16 @@ $serviceContainer->setAdapterClass('default', 'sqlite'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration([ - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', - 'dsn' => 'sqlite:/var/tmp/test.db', - 'attributes' => [ - 'ATTR_EMULATE_PREPARES' => false, - 'ATTR_TIMEOUT' => 30, - ], - 'model_paths' => [ - 0 => 'src', - 1 => 'vendor', - ], + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', + 'dsn' => 'sqlite:/var/tmp/test.db', + 'attributes' => [ + 'ATTR_EMULATE_PREPARES' => false, + 'ATTR_TIMEOUT' => 30, + ], + 'model_paths' => [ + 0 => 'src', + 1 => 'vendor', + ], ]); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); @@ -36,9 +36,9 @@ $sqlManager = new \Propel\Generator\Manager\SqlManager(); $sqlManager->setConnections( ['default' => [ - 'dsn' => 'sqlite:/var/tmp/test.db', - 'adapter' => 'sqlite', - ], + 'dsn' => 'sqlite:/var/tmp/test.db', + 'adapter' => 'sqlite', + ], ] ); $sqlManager->setWorkingDirectory(__DIR__.'/../../generated-sql'); diff --git a/tests/Unit/CryptTest.php b/tests/Unit/CryptTest.php index 129060aa..77945638 100644 --- a/tests/Unit/CryptTest.php +++ b/tests/Unit/CryptTest.php @@ -9,16 +9,16 @@ class CryptTest extends BaseTestCase public function providerTestGenerateToken() { return [ - [1], - [2], - [5], - [7], - [9], - [22], - [60], - [120], - [246], - ]; + [1], + [2], + [5], + [7], + [9], + [22], + [60], + [120], + [246], + ]; } /** @@ -38,13 +38,13 @@ public function testGenerateToken($length) public function providerTestGenerateIntBetween() { return [ - [1, 2], - [1, 100], - [2, 43], - [5, 555], - [7, 9233], - [5500, 6703], - ]; + [1, 2], + [1, 100], + [2, 43], + [5, 555], + [7, 9233], + [5500, 6703], + ]; } /** @@ -66,9 +66,9 @@ public function testGenerateIntBetween($min, $max) public function providerTestGenerateIntInvalidConstraints() { return [ - [100, 1], - [2, 2], - ]; + [100, 1], + [2, 2], + ]; } /** diff --git a/tests/Unit/EmailAddressTest.php b/tests/Unit/EmailAddressTest.php index 521d8b9c..015e7387 100644 --- a/tests/Unit/EmailAddressTest.php +++ b/tests/Unit/EmailAddressTest.php @@ -9,9 +9,9 @@ class EmailAddressTest extends BaseTestCase public function providerTestValidEmails() { return [ - ['test@example.com'], - ['no-password@email.com'], - ]; + ['test@example.com'], + ['no-password@email.com'], + ]; } /** @@ -29,10 +29,10 @@ public function testValidEmails($email) public function providerTestInvalidEmails() { return [ - ['not-an-email'], - ['another-not-an-email'], - [''], - ]; + ['not-an-email'], + ['another-not-an-email'], + [''], + ]; } /**