diff --git a/README.md b/README.md
index 5f7c7d6d..a2111056 100755
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ Rota can be installed on almost any PHP web host, possibly even on the one your
### What you'll need:
-- Web host running PHP 7.1 or above (it may work with earlier versions, but this isn't supported)
+- Web host running PHP 7.4 or above (it may work with earlier versions, but we don't test it)
- MySQL database (or an alternate DB which works with [PDO](http://php.net/manual/en/pdo.drivers.php), we've only tested MySQL though)
- [Mailgun](https://www.mailgun.com/) account for email sending (10,000 email/month free) - or sendmail if you're feeling brave...
diff --git a/composer.json b/composer.json
index ecfe95da..b2574b9b 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,10 @@
},
"config": {
"platform": {
- "php": "7.1.0"
+ "php": "7.4.0"
+ },
+ "allow-plugins": {
+ "php-http/discovery": true
}
},
"require": {
@@ -41,7 +44,8 @@
"slim/twig-view": "^2.2",
"techwilk/twig-linewrap": "^1.0",
"techwilk/twig-slim-csrf": "^1.0",
- "twig/extensions": "^1.4"
+ "twig/extensions": "^1.4",
+ "http-interop/http-factory-guzzle": "^1.1"
},
"autoload": {
"psr-4": {
@@ -52,12 +56,12 @@
}
},
"require-dev": {
- "phpunit/phpunit": "^7.5.9",
+ "phpunit/phpunit": "^8.5.41",
"satooshi/php-coveralls": "^2.0"
},
"scripts": {
"start": "php -S 0.0.0.0:8080 -t public public/index.php",
- "test": "phpunit --coverage-clover build/logs/clover.xml",
+ "test": "phpunit",
"format": "php-cs-fixer fix ."
},
"autoload-dev": {
@@ -65,4 +69,4 @@
"Tests\\": "tests/"
}
}
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index d1e3cdcc..7afd1188 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,33 +4,35 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e0b211d308d7cf20e3bf529c4374c471",
+ "content-hash": "6ec1160547bc3dbf2321fab4eef60377",
"packages": [
{
"name": "aptoma/twig-markdown",
- "version": "3.1.0",
+ "version": "3.4.1",
"source": {
"type": "git",
"url": "https://github.com/aptoma/twig-markdown.git",
- "reference": "dd287a4c60bd7ca44b6f74795a4c3b96d7497e83"
+ "reference": "849248b26f0079f380e6559017e69114c57ef52a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aptoma/twig-markdown/zipball/dd287a4c60bd7ca44b6f74795a4c3b96d7497e83",
- "reference": "dd287a4c60bd7ca44b6f74795a4c3b96d7497e83",
+ "url": "https://api.github.com/repos/aptoma/twig-markdown/zipball/849248b26f0079f380e6559017e69114c57ef52a",
+ "reference": "849248b26f0079f380e6559017e69114c57ef52a",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "twig/twig": "^2.7.0"
+ "php": "^7.0|^8.0",
+ "twig/twig": "^2.7.0|^3.0"
},
"require-dev": {
- "codeclimate/php-test-reporter": "dev-master",
"erusev/parsedown": "^1.6",
- "knplabs/github-api": "~1.4",
+ "guzzlehttp/guzzle": "^7.2",
+ "http-interop/http-factory-guzzle": "^1.0",
+ "knplabs/github-api": "~3.0",
"league/commonmark": "~0.5",
"michelf/php-markdown": "~1",
- "phpunit/phpunit": "~6.0||~5.0"
+ "php": "^7.2.5|^8.0",
+ "phpunit/phpunit": "~6.0|~5.0|~8.0"
},
"suggest": {
"knplabs/github-api": "Needed for using GitHub's Markdown engine provided through their API.",
@@ -47,13 +49,13 @@
"MIT"
],
"authors": [
- {
- "name": "Joris Berthelot",
- "email": "joris@berthelot.tel"
- },
{
"name": "Gunnar Lium",
"email": "gunnar@aptoma.com"
+ },
+ {
+ "name": "Joris Berthelot",
+ "email": "joris@berthelot.tel"
}
],
"description": "Twig extension to work with Markdown content",
@@ -61,36 +63,41 @@
"markdown",
"twig"
],
- "time": "2019-03-13T11:25:31+00:00"
+ "support": {
+ "issues": "https://github.com/aptoma/twig-markdown/issues",
+ "source": "https://github.com/aptoma/twig-markdown/tree/3.4.1"
+ },
+ "abandoned": true,
+ "time": "2021-12-14T11:12:21+00:00"
},
{
"name": "clue/stream-filter",
- "version": "v1.4.1",
+ "version": "v1.7.0",
"source": {
"type": "git",
- "url": "https://github.com/clue/php-stream-filter.git",
- "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71"
+ "url": "https://github.com/clue/stream-filter.git",
+ "reference": "049509fef80032cb3f051595029ab75b49a3c2f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71",
- "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71",
+ "url": "https://api.github.com/repos/clue/stream-filter/zipball/049509fef80032cb3f051595029ab75b49a3c2f7",
+ "reference": "049509fef80032cb3f051595029ab75b49a3c2f7",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
- "phpunit/phpunit": "^5.0 || ^4.8"
+ "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
},
"type": "library",
"autoload": {
- "psr-4": {
- "Clue\\StreamFilter\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "Clue\\StreamFilter\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -99,11 +106,11 @@
"authors": [
{
"name": "Christian Lück",
- "email": "christian@lueck.tv"
+ "email": "christian@clue.engineering"
}
],
"description": "A simple and modern approach to stream filtering in PHP",
- "homepage": "https://github.com/clue/php-stream-filter",
+ "homepage": "https://github.com/clue/stream-filter",
"keywords": [
"bucket brigade",
"callback",
@@ -113,39 +120,21 @@
"stream_filter_append",
"stream_filter_register"
],
- "time": "2019-04-09T12:31:48+00:00"
- },
- {
- "name": "container-interop/container-interop",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/container-interop/container-interop.git",
- "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
- "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
- "shasum": ""
- },
- "require": {
- "psr/container": "^1.0"
+ "support": {
+ "issues": "https://github.com/clue/stream-filter/issues",
+ "source": "https://github.com/clue/stream-filter/tree/v1.7.0"
},
- "type": "library",
- "autoload": {
- "psr-4": {
- "Interop\\Container\\": "src/Interop/Container/"
+ "funding": [
+ {
+ "url": "https://clue.engineering/support",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/clue",
+ "type": "github"
}
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
],
- "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
- "homepage": "https://github.com/container-interop/container-interop",
- "abandoned": "psr/container",
- "time": "2017-02-14T19:40:03+00:00"
+ "time": "2023-12-20T15:40:13+00:00"
},
{
"name": "dpolac/dictionary",
@@ -191,6 +180,10 @@
"dictionary",
"hash"
],
+ "support": {
+ "issues": "https://github.com/dpolac/dictionary/issues",
+ "source": "https://github.com/dpolac/dictionary/tree/master"
+ },
"time": "2016-06-05T18:29:47+00:00"
},
{
@@ -245,20 +238,24 @@
"sort",
"unique"
],
+ "support": {
+ "issues": "https://github.com/dpolac/twig-lambda/issues",
+ "source": "https://github.com/dpolac/twig-lambda/tree/master"
+ },
"time": "2018-06-06T16:44:04+00:00"
},
{
"name": "erusev/parsedown",
- "version": "1.7.3",
+ "version": "1.7.4",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7"
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
- "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
"shasum": ""
},
"require": {
@@ -291,7 +288,11 @@
"markdown",
"parser"
],
- "time": "2019-03-17T18:48:37+00:00"
+ "support": {
+ "issues": "https://github.com/erusev/parsedown/issues",
+ "source": "https://github.com/erusev/parsedown/tree/1.7.x"
+ },
+ "time": "2019-12-30T22:54:17+00:00"
},
{
"name": "facebook/graph-sdk",
@@ -326,12 +327,12 @@
}
},
"autoload": {
- "psr-4": {
- "Facebook\\": "src/Facebook/"
- },
"files": [
"src/Facebook/polyfills.php"
- ]
+ ],
+ "psr-4": {
+ "Facebook\\": "src/Facebook/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -349,27 +350,33 @@
"facebook",
"sdk"
],
+ "support": {
+ "issues": "https://github.com/facebook/php-graph-sdk/issues",
+ "source": "https://github.com/facebook/php-graph-sdk/tree/5.7.0"
+ },
+ "abandoned": true,
"time": "2018-12-11T22:56:31+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.5.2",
+ "version": "6.5.8",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
- "reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.6.1",
- "php": ">=5.5"
+ "guzzlehttp/psr7": "^1.9",
+ "php": ">=5.5",
+ "symfony/polyfill-intl-idn": "^1.17"
},
"require-dev": {
"ext-curl": "*",
@@ -377,7 +384,6 @@
"psr/log": "^1.1"
},
"suggest": {
- "ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware"
},
"type": "library",
@@ -387,22 +393,52 @@
}
},
"autoload": {
- "psr-4": {
- "GuzzleHttp\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "jeremeamia@gmail.com",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle is a PHP HTTP client library",
@@ -416,71 +452,117 @@
"rest",
"web service"
],
- "time": "2019-12-23T11:57:10+00:00"
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/6.5.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-06-20T22:16:07+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "v1.3.1",
+ "version": "1.5.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+ "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+ "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
"shasum": ""
},
"require": {
- "php": ">=5.5.0"
+ "php": ">=5.5"
},
"require-dev": {
- "phpunit/phpunit": "^4.0"
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
- },
"autoload": {
- "psr-4": {
- "GuzzleHttp\\Promise\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
- "time": "2016-12-20T10:07:11+00:00"
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/1.5.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-05-21T12:31:43+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "1.6.1",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+ "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
+ "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
"shasum": ""
},
"require": {
@@ -493,37 +575,53 @@
},
"require-dev": {
"ext-zlib": "*",
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.6-dev"
- }
- },
"autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
{
"name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
@@ -538,20 +636,96 @@
"uri",
"url"
],
- "time": "2019-07-01T23:21:34+00:00"
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/1.9.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-04-17T16:00:37+00:00"
+ },
+ {
+ "name": "http-interop/http-factory-guzzle",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/http-interop/http-factory-guzzle.git",
+ "reference": "8f06e92b95405216b237521cc64c804dd44c4a81"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/8f06e92b95405216b237521cc64c804dd44c4a81",
+ "reference": "8f06e92b95405216b237521cc64c804dd44c4a81",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/psr7": "^1.7||^2.0",
+ "php": ">=7.3",
+ "psr/http-factory": "^1.0"
+ },
+ "provide": {
+ "psr/http-factory-implementation": "^1.0"
+ },
+ "require-dev": {
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^9.5"
+ },
+ "suggest": {
+ "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Http\\Factory\\Guzzle\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "An HTTP Factory using Guzzle PSR7",
+ "keywords": [
+ "factory",
+ "http",
+ "psr-17",
+ "psr-7"
+ ],
+ "support": {
+ "issues": "https://github.com/http-interop/http-factory-guzzle/issues",
+ "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0"
+ },
+ "time": "2021-07-21T13:50:14+00:00"
},
{
"name": "mailgun/mailgun-php",
- "version": "3.0.0",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/mailgun/mailgun-php.git",
- "reference": "4055fea33deb038df067e78a2116f9ccb0125e16"
+ "reference": "a084abdb8601c0380b668651c169e0560fb435d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/4055fea33deb038df067e78a2116f9ccb0125e16",
- "reference": "4055fea33deb038df067e78a2116f9ccb0125e16",
+ "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/a084abdb8601c0380b668651c169e0560fb435d0",
+ "reference": "a084abdb8601c0380b668651c169e0560fb435d0",
"shasum": ""
},
"require": {
@@ -560,12 +734,12 @@
"php-http/discovery": "^1.6",
"php-http/multipart-stream-builder": "^1.0",
"psr/http-client": "^1.0",
- "webmozart/assert": "^1.2"
+ "webmozart/assert": "^1.6"
},
"require-dev": {
"nyholm/nsa": "^1.1",
"nyholm/psr7": "^1.0",
- "php-http/guzzle6-adapter": "^1.0",
+ "php-http/guzzle6-adapter": "^1.0 || ^2.0",
"phpunit/phpunit": "^7.5"
},
"suggest": {
@@ -594,20 +768,24 @@
}
],
"description": "The Mailgun SDK provides methods for all API functions.",
- "time": "2019-09-13T20:14:46+00:00"
+ "support": {
+ "issues": "https://github.com/mailgun/mailgun-php/issues",
+ "source": "https://github.com/mailgun/mailgun-php/tree/3.2.0"
+ },
+ "time": "2020-11-25T07:33:50+00:00"
},
{
"name": "michelf/php-markdown",
- "version": "1.9.0",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
- "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c"
+ "reference": "5024d623c1a057dcd2d076d25b7d270a1d0d55f3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
- "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
+ "url": "https://api.github.com/repos/michelf/php-markdown/zipball/5024d623c1a057dcd2d076d25b7d270a1d0d55f3",
+ "reference": "5024d623c1a057dcd2d076d25b7d270a1d0d55f3",
"shasum": ""
},
"require": {
@@ -643,20 +821,24 @@
"keywords": [
"markdown"
],
- "time": "2019-12-02T02:32:27+00:00"
+ "support": {
+ "issues": "https://github.com/michelf/php-markdown/issues",
+ "source": "https://github.com/michelf/php-markdown/tree/1.9.1"
+ },
+ "time": "2021-11-24T02:52:38+00:00"
},
{
"name": "monolog/monolog",
- "version": "1.25.3",
+ "version": "1.27.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
+ "reference": "904713c5929655dc9b97288b69cfeedad610c9a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
- "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1",
+ "reference": "904713c5929655dc9b97288b69cfeedad610c9a1",
"shasum": ""
},
"require": {
@@ -670,11 +852,10 @@
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
- "jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
+ "phpstan/phpstan": "^0.12.59",
"phpunit/phpunit": "~4.5",
- "phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
@@ -693,11 +874,6 @@
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
@@ -721,7 +897,21 @@
"logging",
"psr-3"
],
- "time": "2019-12-20T14:15:16+00:00"
+ "support": {
+ "issues": "https://github.com/Seldaek/monolog/issues",
+ "source": "https://github.com/Seldaek/monolog/tree/1.27.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Seldaek",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-06-09T08:53:42+00:00"
},
{
"name": "nikic/fast-route",
@@ -745,12 +935,12 @@
},
"type": "library",
"autoload": {
- "psr-4": {
- "FastRoute\\": "src/"
- },
"files": [
"src/functions.php"
- ]
+ ],
+ "psr-4": {
+ "FastRoute\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -767,6 +957,10 @@
"router",
"routing"
],
+ "support": {
+ "issues": "https://github.com/nikic/FastRoute/issues",
+ "source": "https://github.com/nikic/FastRoute/tree/master"
+ },
"time": "2018-02-13T20:26:39+00:00"
},
{
@@ -864,38 +1058,39 @@
"psr-7",
"psr-messages"
],
+ "support": {
+ "email": "oom@oscarotero.com",
+ "issues": "https://github.com/oscarotero/psr7-middlewares/issues",
+ "source": "https://github.com/oscarotero/psr7-middlewares/tree/master"
+ },
"abandoned": "middlewares/*",
"time": "2017-09-28T21:21:24+00:00"
},
{
"name": "paragonie/random_compat",
- "version": "v2.0.17",
+ "version": "v9.99.100",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d"
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d",
- "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
"shasum": ""
},
"require": {
- "php": ">=5.2.0"
+ "php": ">= 7"
},
"require-dev": {
- "phpunit/phpunit": "4.*|5.*"
+ "phpunit/phpunit": "4.*|5.*",
+ "vimeo/psalm": "^1"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
- "autoload": {
- "files": [
- "lib/random.php"
- ]
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
@@ -914,20 +1109,25 @@
"pseudorandom",
"random"
],
- "time": "2018-07-04T16:31:37+00:00"
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/random_compat/issues",
+ "source": "https://github.com/paragonie/random_compat"
+ },
+ "time": "2020-10-15T08:29:30+00:00"
},
{
"name": "php-http/client-common",
- "version": "1.10.0",
+ "version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/client-common.git",
- "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4"
+ "reference": "11d34cad40647848aa98536494f9da63571af9da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/client-common/zipball/c0390ae3c8f2ae9d50901feef0127fb9e396f6b4",
- "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4",
+ "url": "https://api.github.com/repos/php-http/client-common/zipball/11d34cad40647848aa98536494f9da63571af9da",
+ "reference": "11d34cad40647848aa98536494f9da63571af9da",
"shasum": ""
},
"require": {
@@ -975,7 +1175,11 @@
"http",
"httplug"
],
- "time": "2019-11-18T08:54:36+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/client-common/issues",
+ "source": "https://github.com/php-http/client-common/tree/1.11.0"
+ },
+ "time": "2021-07-11T14:33:59+00:00"
},
{
"name": "php-http/curl-client",
@@ -1031,49 +1235,62 @@
"curl",
"http"
],
+ "support": {
+ "issues": "https://github.com/php-http/curl-client/issues",
+ "source": "https://github.com/php-http/curl-client/tree/v1.7.1"
+ },
"time": "2018-03-26T19:21:48+00:00"
},
{
"name": "php-http/discovery",
- "version": "1.7.0",
+ "version": "1.20.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/discovery.git",
- "reference": "e822f86a6983790aa17ab13aa7e69631e86806b6"
+ "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/discovery/zipball/e822f86a6983790aa17ab13aa7e69631e86806b6",
- "reference": "e822f86a6983790aa17ab13aa7e69631e86806b6",
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d",
+ "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "composer-plugin-api": "^1.0|^2.0",
+ "php": "^7.1 || ^8.0"
},
"conflict": {
- "nyholm/psr7": "<1.0"
+ "nyholm/psr7": "<1.0",
+ "zendframework/zend-diactoros": "*"
+ },
+ "provide": {
+ "php-http/async-client-implementation": "*",
+ "php-http/client-implementation": "*",
+ "psr/http-client-implementation": "*",
+ "psr/http-factory-implementation": "*",
+ "psr/http-message-implementation": "*"
},
"require-dev": {
- "akeneo/phpspec-skip-example-extension": "^4.0",
+ "composer/composer": "^1.0.2|^2.0",
+ "graham-campbell/phpspec-skip-example-extension": "^5.0",
"php-http/httplug": "^1.0 || ^2.0",
"php-http/message-factory": "^1.0",
- "phpspec/phpspec": "^5.1",
- "puli/composer-plugin": "1.0.0-beta10"
- },
- "suggest": {
- "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories",
- "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details."
+ "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3",
+ "sebastian/comparator": "^3.0.5 || ^4.0.8",
+ "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1"
},
- "type": "library",
+ "type": "composer-plugin",
"extra": {
- "branch-alias": {
- "dev-master": "1.7-dev"
- }
+ "class": "Http\\Discovery\\Composer\\Plugin",
+ "plugin-optional": true
},
"autoload": {
"psr-4": {
"Http\\Discovery\\": "src/"
- }
+ },
+ "exclude-from-classmap": [
+ "src/Composer/Plugin.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1085,7 +1302,7 @@
"email": "mark.sagikazar@gmail.com"
}
],
- "description": "Finds installed HTTPlug implementations and PSR-7 message factories",
+ "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations",
"homepage": "http://php-http.org",
"keywords": [
"adapter",
@@ -1094,9 +1311,14 @@
"factory",
"http",
"message",
+ "psr17",
"psr7"
],
- "time": "2019-06-30T09:04:27+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/discovery/issues",
+ "source": "https://github.com/php-http/discovery/tree/1.20.0"
+ },
+ "time": "2024-10-02T11:20:13+00:00"
},
{
"name": "php-http/httplug",
@@ -1152,60 +1374,57 @@
"client",
"http"
],
+ "support": {
+ "issues": "https://github.com/php-http/httplug/issues",
+ "source": "https://github.com/php-http/httplug/tree/master"
+ },
"time": "2016-08-31T08:30:17+00:00"
},
{
"name": "php-http/message",
- "version": "1.8.0",
+ "version": "1.16.2",
"source": {
"type": "git",
"url": "https://github.com/php-http/message.git",
- "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c"
+ "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/message/zipball/ce8f43ac1e294b54aabf5808515c3554a19c1e1c",
- "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c",
+ "url": "https://api.github.com/repos/php-http/message/zipball/06dd5e8562f84e641bf929bfe699ee0f5ce8080a",
+ "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a",
"shasum": ""
},
"require": {
- "clue/stream-filter": "^1.4",
- "php": "^7.1",
- "php-http/message-factory": "^1.0.2",
- "psr/http-message": "^1.0"
+ "clue/stream-filter": "^1.5",
+ "php": "^7.2 || ^8.0",
+ "psr/http-message": "^1.1 || ^2.0"
},
"provide": {
"php-http/message-factory-implementation": "1.0"
},
"require-dev": {
- "akeneo/phpspec-skip-example-extension": "^1.0",
- "coduo/phpspec-data-provider-extension": "^1.0",
+ "ergebnis/composer-normalize": "^2.6",
"ext-zlib": "*",
- "guzzlehttp/psr7": "^1.0",
- "henrikbjorn/phpspec-code-coverage": "^1.0",
- "phpspec/phpspec": "^2.4",
- "slim/slim": "^3.0",
- "zendframework/zend-diactoros": "^1.0"
+ "guzzlehttp/psr7": "^1.0 || ^2.0",
+ "laminas/laminas-diactoros": "^2.0 || ^3.0",
+ "php-http/message-factory": "^1.0.2",
+ "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
+ "slim/slim": "^3.0"
},
"suggest": {
"ext-zlib": "Used with compressor/decompressor streams",
"guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories",
- "slim/slim": "Used with Slim Framework PSR-7 implementation",
- "zendframework/zend-diactoros": "Used with Diactoros Factories"
+ "laminas/laminas-diactoros": "Used with Diactoros Factories",
+ "slim/slim": "Used with Slim Framework PSR-7 implementation"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.8-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Http\\Message\\": "src/"
- },
"files": [
"src/filters.php"
- ]
+ ],
+ "psr-4": {
+ "Http\\Message\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1224,30 +1443,34 @@
"message",
"psr-7"
],
- "time": "2019-08-05T06:55:08+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/message/issues",
+ "source": "https://github.com/php-http/message/tree/1.16.2"
+ },
+ "time": "2024-10-02T11:34:13+00:00"
},
{
"name": "php-http/message-factory",
- "version": "v1.0.2",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/message-factory.git",
- "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
+ "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
- "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
+ "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
+ "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
"shasum": ""
},
"require": {
"php": ">=5.4",
- "psr/http-message": "^1.0"
+ "psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -1274,40 +1497,39 @@
"stream",
"uri"
],
- "time": "2015-12-19T14:08:53+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/message-factory/issues",
+ "source": "https://github.com/php-http/message-factory/tree/1.1.0"
+ },
+ "abandoned": "psr/http-factory",
+ "time": "2023-04-14T14:16:17+00:00"
},
{
"name": "php-http/multipart-stream-builder",
- "version": "1.1.0",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/php-http/multipart-stream-builder.git",
- "reference": "5d73adad53cf1d674dcc6c5b288a3ff3f76c4849"
+ "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/5d73adad53cf1d674dcc6c5b288a3ff3f76c4849",
- "reference": "5d73adad53cf1d674dcc6c5b288a3ff3f76c4849",
+ "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/10086e6de6f53489cca5ecc45b6f468604d3460e",
+ "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e",
"shasum": ""
},
"require": {
- "php": "^7.1",
- "php-http/discovery": "^1.7",
- "php-http/message-factory": "^1.0.2",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.0"
+ "php": "^7.1 || ^8.0",
+ "php-http/discovery": "^1.15",
+ "psr/http-factory-implementation": "^1.0"
},
"require-dev": {
"nyholm/psr7": "^1.0",
"php-http/message": "^1.5",
- "phpunit/phpunit": "^7.5 || ^8.3"
+ "php-http/message-factory": "^1.0.2",
+ "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
"autoload": {
"psr-4": {
"Http\\Message\\MultipartStream\\": "src/"
@@ -1332,32 +1554,34 @@
"multipart stream",
"stream"
],
- "time": "2019-08-22T14:13:19+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/multipart-stream-builder/issues",
+ "source": "https://github.com/php-http/multipart-stream-builder/tree/1.4.2"
+ },
+ "time": "2024-09-04T13:22:54+00:00"
},
{
"name": "php-http/promise",
- "version": "v1.0.0",
+ "version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/php-http/promise.git",
- "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980"
+ "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980",
- "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/fc85b1fba37c169a69a07ef0d5a8075770cc1f83",
+ "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83",
"shasum": ""
},
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
"require-dev": {
- "henrikbjorn/phpspec-code-coverage": "^1.0",
- "phpspec/phpspec": "^2.4"
+ "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3",
+ "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
"autoload": {
"psr-4": {
"Http\\Promise\\": "src/"
@@ -1368,13 +1592,13 @@
"MIT"
],
"authors": [
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com"
- },
{
"name": "Joel Wurtz",
"email": "joel.wurtz@gmail.com"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com"
}
],
"description": "Promise used for asynchronous HTTP requests",
@@ -1382,33 +1606,37 @@
"keywords": [
"promise"
],
- "time": "2016-01-26T13:27:02+00:00"
+ "support": {
+ "issues": "https://github.com/php-http/promise/issues",
+ "source": "https://github.com/php-http/promise/tree/1.3.1"
+ },
+ "time": "2024-03-15T13:55:21+00:00"
},
{
"name": "pimple/pimple",
- "version": "v3.2.3",
+ "version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
- "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
+ "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
- "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
+ "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": ""
},
"require": {
- "php": ">=5.3.0",
- "psr/container": "^1.0"
+ "php": ">=7.2.5",
+ "psr/container": "^1.1 || ^2.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^3.2"
+ "symfony/phpunit-bridge": "^5.4@dev"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2.x-dev"
+ "dev-master": "3.4.x-dev"
}
},
"autoload": {
@@ -1427,12 +1655,15 @@
}
],
"description": "Pimple, a simple Dependency Injection Container",
- "homepage": "http://pimple.sensiolabs.org",
+ "homepage": "https://pimple.symfony.com",
"keywords": [
"container",
"dependency injection"
],
- "time": "2018-01-21T07:42:36+00:00"
+ "support": {
+ "source": "https://github.com/silexphp/Pimple/tree/v3.5.0"
+ },
+ "time": "2021-10-28T11:13:42+00:00"
},
{
"name": "propel/propel",
@@ -1440,31 +1671,40 @@
"source": {
"type": "git",
"url": "https://github.com/propelorm/Propel2.git",
- "reference": "297473a6ddf0dcbbd6f88cb852c2c549814f908e"
+ "reference": "bbb64a859790230bf2e8ea83e1f26f7253adf685"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/propelorm/Propel2/zipball/297473a6ddf0dcbbd6f88cb852c2c549814f908e",
- "reference": "297473a6ddf0dcbbd6f88cb852c2c549814f908e",
+ "url": "https://api.github.com/repos/propelorm/Propel2/zipball/bbb64a859790230bf2e8ea83e1f26f7253adf685",
+ "reference": "bbb64a859790230bf2e8ea83e1f26f7253adf685",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "psr/log": "~1.0",
- "symfony/config": "~2.3||~3.0||~4.0",
- "symfony/console": "~2.3||~3.0||~4.0",
- "symfony/filesystem": "~2.3||~3.0||~4.0",
- "symfony/finder": "~2.3||~3.0||~4.0",
- "symfony/validator": "~2.3||~3.0.0||~3.1.0||^3.2.4||~4.0",
- "symfony/yaml": "~2.3||~3.0||~4.0"
+ "php": ">=7.4",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
+ "symfony/config": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/console": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/filesystem": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/finder": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/translation": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/validator": "^5.0.0 || ^6.0.0 || ^7.0.0",
+ "symfony/yaml": "^5.0.0 || ^6.0.0 || ^7.0.0"
},
"require-dev": {
- "monolog/monolog": "~1.3",
- "phpunit/phpunit": "~4.0||~5.0"
+ "ext-json": "*",
+ "ext-pdo": "*",
+ "ext-xml": "*",
+ "mikey179/vfsstream": "^1.6",
+ "monolog/monolog": "^1.3 || ^2.3 || ^3.0",
+ "phpstan/phpstan": "^1.2",
+ "phpunit/phpunit": "^9.5.0",
+ "psalm/phar": "^4.23",
+ "spryker/code-sniffer": "^0.17.2"
},
"suggest": {
"monolog/monolog": "The recommended logging library to use with Propel."
},
+ "default-branch": true,
"bin": [
"bin/propel"
],
@@ -1475,8 +1715,8 @@
}
},
"autoload": {
- "psr-0": {
- "Propel": "src/"
+ "psr-4": {
+ "Propel\\": "src/Propel/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1489,38 +1729,37 @@
"email": "william.durand1@gmail.com"
}
],
- "description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.5 and up.",
+ "description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP.",
"homepage": "http://www.propelorm.org/",
"keywords": [
"Active Record",
"orm",
"persistence"
],
- "time": "2019-11-08T13:12:55+00:00"
+ "support": {
+ "issues": "https://github.com/propelorm/Propel2/issues",
+ "source": "https://github.com/propelorm/Propel2/tree/master"
+ },
+ "time": "2024-12-10T13:03:49+00:00"
},
{
"name": "psr/container",
- "version": "1.0.0",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=7.4.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -1533,7 +1772,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@@ -1545,25 +1784,29 @@
"container-interop",
"psr"
],
- "time": "2017-02-14T16:28:37+00:00"
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
+ "time": "2021-11-05T16:50:12+00:00"
},
{
"name": "psr/http-client",
- "version": "1.0.0",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-client.git",
- "reference": "496a823ef742b632934724bf769560c2a5c7c44e"
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/496a823ef742b632934724bf769560c2a5c7c44e",
- "reference": "496a823ef742b632934724bf769560c2a5c7c44e",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "psr/http-message": "^1.0"
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
"extra": {
@@ -1583,7 +1826,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP clients",
@@ -1594,25 +1837,28 @@
"psr",
"psr-18"
],
- "time": "2018-10-30T23:29:13+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
+ "time": "2023-09-23T14:17:50+00:00"
},
{
"name": "psr/http-factory",
- "version": "1.0.1",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-factory.git",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"shasum": ""
},
"require": {
- "php": ">=7.0.0",
- "psr/http-message": "^1.0"
+ "php": ">=7.1",
+ "psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
"extra": {
@@ -1632,10 +1878,10 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
- "description": "Common interfaces for PSR-7 HTTP message factories",
+ "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
"keywords": [
"factory",
"http",
@@ -1646,29 +1892,32 @@
"request",
"response"
],
- "time": "2019-04-30T12:38:16+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/http-factory"
+ },
+ "time": "2024-04-15T12:06:14+00:00"
},
{
"name": "psr/http-message",
- "version": "1.0.1",
+ "version": "1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
@@ -1696,20 +1945,23 @@
"request",
"response"
],
- "time": "2016-08-06T14:39:51+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/1.1"
+ },
+ "time": "2023-04-04T09:50:52+00:00"
},
{
"name": "psr/log",
- "version": "1.1.2",
+ "version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
@@ -1733,7 +1985,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@@ -1743,7 +1995,10 @@
"psr",
"psr-3"
],
- "time": "2019-11-01T11:05:21+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "time": "2021-05-03T11:20:27+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -1783,6 +2038,10 @@
}
],
"description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
"time": "2019-03-08T08:55:37+00:00"
},
{
@@ -1833,24 +2092,30 @@
"middleware",
"slim"
],
+ "support": {
+ "issues": "https://github.com/slimphp/Slim-Csrf/issues",
+ "source": "https://github.com/slimphp/Slim-Csrf/tree/master"
+ },
"time": "2018-08-22T16:12:18+00:00"
},
{
"name": "slim/slim",
- "version": "3.12.1",
+ "version": "3.12.5",
"source": {
"type": "git",
"url": "https://github.com/slimphp/Slim.git",
- "reference": "eaee12ef8d0750db62b8c548016d82fb33addb6b"
+ "reference": "565632b2d9b64ecedf89546edbbf4f3648089f0c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/slimphp/Slim/zipball/eaee12ef8d0750db62b8c548016d82fb33addb6b",
- "reference": "eaee12ef8d0750db62b8c548016d82fb33addb6b",
+ "url": "https://api.github.com/repos/slimphp/Slim/zipball/565632b2d9b64ecedf89546edbbf4f3648089f0c",
+ "reference": "565632b2d9b64ecedf89546edbbf4f3648089f0c",
"shasum": ""
},
"require": {
- "container-interop/container-interop": "^1.2",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-simplexml": "*",
"nikic/fast-route": "^1.0",
"php": ">=5.5.0",
"pimple/pimple": "^3.0",
@@ -1862,7 +2127,7 @@
},
"require-dev": {
"phpunit/phpunit": "^4.0",
- "squizlabs/php_codesniffer": "^2.5"
+ "squizlabs/php_codesniffer": "^3.6.0"
},
"type": "library",
"autoload": {
@@ -1875,25 +2140,25 @@
"MIT"
],
"authors": [
- {
- "name": "Rob Allen",
- "email": "rob@akrabat.com",
- "homepage": "http://akrabat.com"
- },
{
"name": "Josh Lockhart",
"email": "hello@joshlockhart.com",
"homepage": "https://joshlockhart.com"
},
- {
- "name": "Gabriel Manricks",
- "email": "gmanricks@me.com",
- "homepage": "http://gabrielmanricks.com"
- },
{
"name": "Andrew Smith",
"email": "a.smith@silentworks.co.uk",
"homepage": "http://silentworks.co.uk"
+ },
+ {
+ "name": "Rob Allen",
+ "email": "rob@akrabat.com",
+ "homepage": "http://akrabat.com"
+ },
+ {
+ "name": "Gabriel Manricks",
+ "email": "gmanricks@me.com",
+ "homepage": "http://gabrielmanricks.com"
}
],
"description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs",
@@ -1904,26 +2169,40 @@
"micro",
"router"
],
- "time": "2019-04-16T16:47:29+00:00"
+ "support": {
+ "issues": "https://github.com/slimphp/Slim/issues",
+ "source": "https://github.com/slimphp/Slim/tree/3.12.5"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/slimphp",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/slim/slim",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-07-23T04:32:51+00:00"
},
{
"name": "slim/twig-view",
- "version": "2.5.0",
+ "version": "2.5.1",
"source": {
"type": "git",
"url": "https://github.com/slimphp/Twig-View.git",
- "reference": "06ef39b58d60b11a9546893fd0b7fff2bd901798"
+ "reference": "47bd5cc1cbbdf5196d0873ece0ee97c6c7b352e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/slimphp/Twig-View/zipball/06ef39b58d60b11a9546893fd0b7fff2bd901798",
- "reference": "06ef39b58d60b11a9546893fd0b7fff2bd901798",
+ "url": "https://api.github.com/repos/slimphp/Twig-View/zipball/47bd5cc1cbbdf5196d0873ece0ee97c6c7b352e9",
+ "reference": "47bd5cc1cbbdf5196d0873ece0ee97c6c7b352e9",
"shasum": ""
},
"require": {
"php": ">=5.5.0",
"psr/http-message": "^1.0",
- "twig/twig": "^1.38|^2.7"
+ "twig/twig": "^1.38|^2.7|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.7",
@@ -1955,46 +2234,48 @@
"twig",
"view"
],
- "time": "2019-04-06T16:34:38+00:00"
+ "support": {
+ "issues": "https://github.com/slimphp/Twig-View/issues",
+ "source": "https://github.com/slimphp/Twig-View/tree/master"
+ },
+ "time": "2019-11-28T18:03:50+00:00"
},
{
"name": "symfony/config",
- "version": "v3.4.22",
+ "version": "v5.4.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "c9bc510c217075d42d4a927e285917d0c2001cf4"
+ "reference": "977c88a02d7d3f16904a81907531b19666a08e78"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/c9bc510c217075d42d4a927e285917d0c2001cf4",
- "reference": "c9bc510c217075d42d4a927e285917d0c2001cf4",
+ "url": "https://api.github.com/repos/symfony/config/zipball/977c88a02d7d3f16904a81907531b19666a08e78",
+ "reference": "977c88a02d7d3f16904a81907531b19666a08e78",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/filesystem": "~2.8|~3.0|~4.0",
- "symfony/polyfill-ctype": "~1.8"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/filesystem": "^4.4|^5.0|^6.0",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/polyfill-php81": "^1.22"
},
"conflict": {
- "symfony/dependency-injection": "<3.3",
- "symfony/finder": "<3.3"
+ "symfony/finder": "<4.4"
},
"require-dev": {
- "symfony/dependency-injection": "~3.3|~4.0",
- "symfony/event-dispatcher": "~3.3|~4.0",
- "symfony/finder": "~3.3|~4.0",
- "symfony/yaml": "~3.0|~4.0"
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/finder": "^4.4|^5.0|^6.0",
+ "symfony/messenger": "^4.4|^5.0|^6.0",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/yaml": "^4.4|^5.0|^6.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
@@ -2017,43 +2298,69 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Config Component",
+ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
- "time": "2019-01-30T11:33:42+00:00"
+ "support": {
+ "source": "https://github.com/symfony/config/tree/v5.4.46"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-10-30T07:58:02+00:00"
},
{
"name": "symfony/console",
- "version": "v3.4.22",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be"
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/069bf3f0e8f871a2169a06e43d9f3f03f355e9be",
- "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/debug": "~2.8|~3.0|~4.0",
- "symfony/polyfill-mbstring": "~1.0"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.9",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/string": "^5.1|^6.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.4",
- "symfony/process": "<3.3"
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "~3.3|~4.0",
- "symfony/dependency-injection": "~3.4|~4.0",
- "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
- "symfony/lock": "~3.4|~4.0",
- "symfony/process": "~3.3|~4.0"
+ "psr/log": "^1|^2",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/lock": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/var-dumper": "^4.4|^5.0|^6.0"
},
"suggest": {
"psr/log": "For using the console logger",
@@ -2062,11 +2369,6 @@
"symfony/process": ""
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
@@ -2089,46 +2391,63 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Console Component",
+ "description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
- "time": "2019-01-25T10:42:12+00:00"
+ "keywords": [
+ "cli",
+ "command-line",
+ "console",
+ "terminal"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v5.4.47"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-06T11:30:55+00:00"
},
{
- "name": "symfony/debug",
- "version": "v3.4.22",
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.5.4",
"source": {
"type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8"
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8",
- "reference": "667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
+ "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "psr/log": "~1.0"
- },
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
- },
- "require-dev": {
- "symfony/http-kernel": "~2.8|~3.0|~4.0"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
"branch-alias": {
- "dev-master": "3.4-dev"
+ "dev-main": "2.5-dev"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Component\\Debug\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
+ "files": [
+ "function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2137,42 +2456,59 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Debug Component",
+ "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
- "time": "2019-01-25T10:19:25+00:00"
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.4.22",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "b52454ec66fe5082b7a66a491339d1f1da9a5a0d"
+ "reference": "57c8294ed37d4a055b77057827c67f9558c95c54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b52454ec66fe5082b7a66a491339d1f1da9a5a0d",
- "reference": "b52454ec66fe5082b7a66a491339d1f1da9a5a0d",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54",
+ "reference": "57c8294ed37d4a055b77057827c67f9558c95c54",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-ctype": "~1.8"
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
+ "require-dev": {
+ "symfony/process": "^5.4|^6.4"
},
+ "type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
@@ -2195,33 +2531,47 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Filesystem Component",
+ "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
- "time": "2019-01-16T13:27:11+00:00"
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-10-22T13:05:35+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.4.1",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a"
+ "reference": "63741784cd7b9967975eec610b256eed3ede022b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/dac8d7db537bac7ad8143eb11360a8c2231f251a",
- "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b",
+ "reference": "63741784cd7b9967975eec610b256eed3ede022b",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
@@ -2244,33 +2594,48 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Finder Component",
+ "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
- "time": "2017-11-05T16:10:10+00:00"
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-28T13:32:08+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v3.4.36",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "b224d20be60e6f7b55cd66914379a13a0b28651a"
+ "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b224d20be60e6f7b55cd66914379a13a0b28651a",
- "reference": "b224d20be60e6f7b55cd66914379a13a0b28651a",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6",
+ "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
@@ -2293,48 +2658,69 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony OptionsResolver Component",
+ "description": "Provides an improved replacement for the array_replace PHP function",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
- "time": "2019-10-26T11:02:01+00:00"
+ "support": {
+ "source": "https://github.com/symfony/options-resolver/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.13.1",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2358,41 +2744,59 @@
"polyfill",
"portable"
],
- "time": "2019-11-27T13:56:44+00:00"
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.11.0",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.31.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
- "reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
+ "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.11-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2408,66 +2812,70 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
+ "grapheme",
+ "intl",
"polyfill",
"portable",
"shim"
],
- "time": "2019-02-06T07:57:58+00:00"
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
},
{
- "name": "symfony/translation",
- "version": "v3.4.1",
+ "name": "symfony/polyfill-intl-idn",
+ "version": "v1.31.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/translation.git",
- "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa"
+ "url": "https://github.com/symfony/polyfill-intl-idn.git",
+ "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa",
- "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773",
+ "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "conflict": {
- "symfony/config": "<2.8",
- "symfony/dependency-injection": "<3.4",
- "symfony/yaml": "<3.4"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0|~4.0",
- "symfony/dependency-injection": "~3.4|~4.0",
- "symfony/finder": "~2.8|~3.0|~4.0",
- "symfony/intl": "^2.8.18|^3.2.5|~4.0",
- "symfony/yaml": "~3.4|~4.0"
+ "php": ">=7.2",
+ "symfony/polyfill-intl-normalizer": "^1.10"
},
"suggest": {
- "psr/log": "To use logging capability in translator",
- "symfony/config": "",
- "symfony/yaml": ""
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Symfony\\Component\\Translation\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "Symfony\\Polyfill\\Intl\\Idn\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2475,82 +2883,925 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Laurent Bassin",
+ "email": "laurent@bassin.info"
+ },
+ {
+ "name": "Trevor Rowbotham",
+ "email": "trevor.rowbotham@pm.me"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Translation Component",
+ "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
"homepage": "https://symfony.com",
- "time": "2017-11-27T14:23:00+00:00"
+ "keywords": [
+ "compatibility",
+ "idn",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
},
{
- "name": "symfony/validator",
- "version": "v3.4.1",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.31.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/validator.git",
- "reference": "1a46cfa4f80ddbd82a01d0980fcf646940cea5bb"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/validator/zipball/1a46cfa4f80ddbd82a01d0980fcf646940cea5bb",
- "reference": "1a46cfa4f80ddbd82a01d0980fcf646940cea5bb",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/translation": "~2.8|~3.0|~4.0"
+ "php": ">=7.2"
},
- "conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
- "symfony/dependency-injection": "<3.3",
- "symfony/http-kernel": "<3.3.5",
- "symfony/yaml": "<3.4"
+ "suggest": {
+ "ext-intl": "For best performance"
},
- "require-dev": {
- "doctrine/annotations": "~1.0",
- "doctrine/cache": "~1.0",
- "egulias/email-validator": "^1.2.8|~2.0",
- "symfony/cache": "~3.1|~4.0",
- "symfony/config": "~2.8|~3.0|~4.0",
- "symfony/dependency-injection": "~3.3|~4.0",
- "symfony/expression-language": "~2.8|~3.0|~4.0",
- "symfony/http-foundation": "~2.8|~3.0|~4.0",
- "symfony/http-kernel": "^3.3.5|~4.0",
- "symfony/intl": "^2.8.18|^3.2.5|~4.0",
- "symfony/property-access": "~2.8|~3.0|~4.0",
- "symfony/var-dumper": "~3.3|~4.0",
- "symfony/yaml": "~3.4|~4.0"
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.31.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
+ "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.31.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
+ "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "type": "metapackage",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.31.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.31.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
+ "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.31.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
+ "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v2.5.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "f37b419f7aea2e9abf10abd261832cace12e3300"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f37b419f7aea2e9abf10abd261832cace12e3300",
+ "reference": "f37b419f7aea2e9abf10abd261832cace12e3300",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1|^3"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
},
"suggest": {
- "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
- "doctrine/cache": "For using the default cached annotation reader and metadata cache.",
- "egulias/email-validator": "Strict (RFC compliant) email validation",
- "psr/cache-implementation": "For using the metadata cache.",
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v2.5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "v5.4.47",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799",
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "conflict": {
+ "symfony/translation-contracts": ">=3.0"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0|^6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "Resources/functions.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/v5.4.47"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-10T20:33:58+00:00"
+ },
+ {
+ "name": "symfony/translation",
+ "version": "v5.4.45",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/translation.git",
+ "reference": "98f26acc99341ca4bab345fb14d7b1d7cb825bed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/98f26acc99341ca4bab345fb14d7b1d7cb825bed",
+ "reference": "98f26acc99341ca4bab345fb14d7b1d7cb825bed",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/translation-contracts": "^2.3"
+ },
+ "conflict": {
+ "symfony/config": "<4.4",
+ "symfony/console": "<5.3",
+ "symfony/dependency-injection": "<5.0",
+ "symfony/http-kernel": "<5.0",
+ "symfony/twig-bundle": "<5.0",
+ "symfony/yaml": "<4.4"
+ },
+ "provide": {
+ "symfony/translation-implementation": "2.3"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2|^3",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/console": "^5.4|^6.0",
+ "symfony/dependency-injection": "^5.0|^6.0",
+ "symfony/finder": "^4.4|^5.0|^6.0",
+ "symfony/http-client-contracts": "^1.1|^2.0|^3.0",
+ "symfony/http-kernel": "^5.0|^6.0",
+ "symfony/intl": "^4.4|^5.0|^6.0",
+ "symfony/polyfill-intl-icu": "^1.21",
+ "symfony/service-contracts": "^1.1.2|^2|^3",
+ "symfony/yaml": "^4.4|^5.0|^6.0"
+ },
+ "suggest": {
+ "psr/log-implementation": "To use logging capability in translator",
"symfony/config": "",
- "symfony/expression-language": "For using the Expression validator",
- "symfony/http-foundation": "",
- "symfony/intl": "",
- "symfony/property-access": "For accessing properties within comparison constraints",
"symfony/yaml": ""
},
"type": "library",
+ "autoload": {
+ "files": [
+ "Resources/functions.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\Translation\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides tools to internationalize your application",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/translation/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
+ },
+ {
+ "name": "symfony/translation-contracts",
+ "version": "v2.5.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/translation-contracts.git",
+ "reference": "450d4172653f38818657022252f9d81be89ee9a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/450d4172653f38818657022252f9d81be89ee9a8",
+ "reference": "450d4172653f38818657022252f9d81be89ee9a8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5"
+ },
+ "suggest": {
+ "symfony/translation-implementation": ""
+ },
+ "type": "library",
"extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
"branch-alias": {
- "dev-master": "3.4-dev"
+ "dev-main": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Translation\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to translation",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/translation-contracts/tree/v2.5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
}
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
+ },
+ {
+ "name": "symfony/validator",
+ "version": "v5.4.48",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/validator.git",
+ "reference": "883667679d93d6c30f1b7490d669801712d3be2f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/validator/zipball/883667679d93d6c30f1b7490d669801712d3be2f",
+ "reference": "883667679d93d6c30f1b7490d669801712d3be2f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/polyfill-php81": "^1.22",
+ "symfony/translation-contracts": "^1.1|^2|^3"
+ },
+ "conflict": {
+ "doctrine/annotations": "<1.13",
+ "doctrine/cache": "<1.11",
+ "doctrine/lexer": "<1.1",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/expression-language": "<5.1",
+ "symfony/http-kernel": "<4.4",
+ "symfony/intl": "<4.4",
+ "symfony/property-info": "<5.3",
+ "symfony/translation": "<5.4.35|>=6.0,<6.3.12|>=6.4,<6.4.3",
+ "symfony/yaml": "<4.4"
+ },
+ "require-dev": {
+ "doctrine/annotations": "^1.13|^2",
+ "doctrine/cache": "^1.11|^2.0",
+ "egulias/email-validator": "^2.1.10|^3|^4",
+ "symfony/cache": "^4.4|^5.0|^6.0",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/console": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/expression-language": "^5.1|^6.0",
+ "symfony/finder": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/http-foundation": "^4.4|^5.0|^6.0",
+ "symfony/http-kernel": "^4.4|^5.0|^6.0",
+ "symfony/intl": "^4.4|^5.0|^6.0",
+ "symfony/mime": "^4.4|^5.0|^6.0",
+ "symfony/property-access": "^5.4|^6.0",
+ "symfony/property-info": "^5.3|^6.0",
+ "symfony/translation": "^5.4.35|~6.3.12|^6.4.3",
+ "symfony/yaml": "^4.4|^5.0|^6.0"
+ },
+ "suggest": {
+ "egulias/email-validator": "Strict (RFC compliant) email validation",
+ "psr/cache-implementation": "For using the mapping cache.",
+ "symfony/config": "",
+ "symfony/expression-language": "For using the Expression validator and the ExpressionLanguageSyntax constraints",
+ "symfony/http-foundation": "",
+ "symfony/intl": "",
+ "symfony/property-access": "For accessing properties within comparison constraints",
+ "symfony/property-info": "To automatically add NotNull and Type constraints",
+ "symfony/translation": "For translating validation errors.",
+ "symfony/yaml": ""
},
+ "type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Validator\\": ""
},
"exclude-from-classmap": [
- "/Tests/"
+ "/Tests/",
+ "/Resources/bin/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2567,43 +3818,59 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Validator Component",
+ "description": "Provides tools to validate values",
"homepage": "https://symfony.com",
- "time": "2017-12-04T12:17:59+00:00"
+ "support": {
+ "source": "https://github.com/symfony/validator/tree/v5.4.48"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-27T08:58:20+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.4.27",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996"
+ "reference": "a454d47278cc16a5db371fe73ae66a78a633371e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996",
- "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/a454d47278cc16a5db371fe73ae66a78a633371e",
+ "reference": "a454d47278cc16a5db371fe73ae66a78a633371e",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-ctype": "~1.8"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-ctype": "^1.8"
},
"conflict": {
- "symfony/console": "<3.4"
+ "symfony/console": "<5.3"
},
"require-dev": {
- "symfony/console": "~3.4|~4.0"
+ "symfony/console": "^5.3|^6.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
@@ -2626,9 +3893,26 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Yaml Component",
+ "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
- "time": "2019-03-25T07:48:46+00:00"
+ "support": {
+ "source": "https://github.com/symfony/yaml/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
},
{
"name": "techwilk/twig-linewrap",
@@ -2672,6 +3956,10 @@
"linewrap",
"twig"
],
+ "support": {
+ "issues": "https://github.com/TechWilk/twig-linewrap/issues",
+ "source": "https://github.com/TechWilk/twig-linewrap/tree/master"
+ },
"time": "2017-07-06T18:40:14+00:00"
},
{
@@ -2717,6 +4005,10 @@
"twig",
"value"
],
+ "support": {
+ "issues": "https://github.com/TechWilk/twig-slim-csrf/issues",
+ "source": "https://github.com/TechWilk/twig-slim-csrf/tree/master"
+ },
"time": "2017-12-10T17:36:31+00:00"
},
{
@@ -2772,36 +4064,41 @@
"i18n",
"text"
],
+ "support": {
+ "issues": "https://github.com/twigphp/Twig-extensions/issues",
+ "source": "https://github.com/twigphp/Twig-extensions/tree/master"
+ },
+ "abandoned": true,
"time": "2018-12-05T18:34:18+00:00"
},
{
"name": "twig/twig",
- "version": "v2.9.0",
+ "version": "v2.16.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "82a1c055c8ed4c4705023bfd0405f3c74db6e3ae"
+ "reference": "19185947ec75d433a3ac650af32fc05649b95ee1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/82a1c055c8ed4c4705023bfd0405f3c74db6e3ae",
- "reference": "82a1c055c8ed4c4705023bfd0405f3c74db6e3ae",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/19185947ec75d433a3ac650af32fc05649b95ee1",
+ "reference": "19185947ec75d433a3ac650af32fc05649b95ee1",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.1.3",
"symfony/polyfill-ctype": "^1.8",
- "symfony/polyfill-mbstring": "^1.3"
+ "symfony/polyfill-mbstring": "^1.3",
+ "symfony/polyfill-php72": "^1.8"
},
"require-dev": {
"psr/container": "^1.0",
- "symfony/debug": "^2.7",
- "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
+ "symfony/phpunit-bridge": "^5.4.9|^6.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.9-dev"
+ "dev-master": "2.16-dev"
}
},
"autoload": {
@@ -2823,15 +4120,14 @@
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
+ {
+ "name": "Twig Team",
+ "role": "Contributors"
+ },
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
- },
- {
- "name": "Twig Team",
- "homepage": "https://twig.symfony.com/contributors",
- "role": "Contributors"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
@@ -2839,33 +4135,53 @@
"keywords": [
"templating"
],
- "time": "2019-04-28T06:57:38+00:00"
+ "support": {
+ "issues": "https://github.com/twigphp/Twig/issues",
+ "source": "https://github.com/twigphp/Twig/tree/v2.16.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/twig/twig",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T17:53:56+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.6.0",
+ "version": "1.11.0",
"source": {
"type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925"
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925",
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0",
- "symfony/polyfill-ctype": "^1.8"
+ "ext-ctype": "*",
+ "php": "^7.2 || ^8.0"
},
"conflict": {
- "vimeo/psalm": "<3.6.0"
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+ "phpunit/phpunit": "^8.5.13"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.10-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@@ -2887,42 +4203,42 @@
"check",
"validate"
],
- "time": "2019-11-24T13:36:37+00:00"
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.11.0"
+ },
+ "time": "2022-06-03T18:03:27+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.3.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^6.0",
+ "doctrine/coding-standard": "^9 || ^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^0.13",
- "phpstan/phpstan-phpunit": "^0.11",
- "phpstan/phpstan-shim": "^0.11",
- "phpunit/phpunit": "^7.0"
+ "phpbench/phpbench": "^0.16 || ^1",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.30 || ^5.4"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -2936,7 +4252,7 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
@@ -2945,137 +4261,61 @@
"constructor",
"instantiate"
],
- "time": "2019-10-21T16:45:58+00:00"
- },
- {
- "name": "guzzle/guzzle",
- "version": "v3.9.3",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/guzzle3.git",
- "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9",
- "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9",
- "shasum": ""
- },
- "require": {
- "ext-curl": "*",
- "php": ">=5.3.3",
- "symfony/event-dispatcher": "~2.1"
- },
- "replace": {
- "guzzle/batch": "self.version",
- "guzzle/cache": "self.version",
- "guzzle/common": "self.version",
- "guzzle/http": "self.version",
- "guzzle/inflection": "self.version",
- "guzzle/iterator": "self.version",
- "guzzle/log": "self.version",
- "guzzle/parser": "self.version",
- "guzzle/plugin": "self.version",
- "guzzle/plugin-async": "self.version",
- "guzzle/plugin-backoff": "self.version",
- "guzzle/plugin-cache": "self.version",
- "guzzle/plugin-cookie": "self.version",
- "guzzle/plugin-curlauth": "self.version",
- "guzzle/plugin-error-response": "self.version",
- "guzzle/plugin-history": "self.version",
- "guzzle/plugin-log": "self.version",
- "guzzle/plugin-md5": "self.version",
- "guzzle/plugin-mock": "self.version",
- "guzzle/plugin-oauth": "self.version",
- "guzzle/service": "self.version",
- "guzzle/stream": "self.version"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
},
- "require-dev": {
- "doctrine/cache": "~1.3",
- "monolog/monolog": "~1.0",
- "phpunit/phpunit": "3.7.*",
- "psr/log": "~1.0",
- "symfony/class-loader": "~2.1",
- "zendframework/zend-cache": "2.*,<2.3",
- "zendframework/zend-log": "2.*,<2.3"
- },
- "suggest": {
- "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.9-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Guzzle": "src/",
- "Guzzle\\Tests": "tests/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ "funding": [
{
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
},
{
- "name": "Guzzle Community",
- "homepage": "https://github.com/guzzle/guzzle/contributors"
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
}
],
- "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
- "homepage": "http://guzzlephp.org/",
- "keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "rest",
- "web service"
- ],
- "abandoned": "guzzlehttp/guzzle",
- "time": "2015-03-18T18:23:50+00:00"
+ "time": "2022-12-30T00:15:36+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.3",
+ "version": "1.13.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
+ "reference": "024473a478be9df5fdaca2c793f2232fe788e414"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414",
+ "reference": "024473a478be9df5fdaca2c793f2232fe788e414",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
- "replace": {
- "myclabs/deep-copy": "self.version"
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^7.1"
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
"files": [
"src/DeepCopy/deep_copy.php"
- ]
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -3089,359 +4329,172 @@
"object",
"object graph"
],
- "time": "2019-08-09T12:45:53+00:00"
- },
- {
- "name": "phar-io/manifest",
- "version": "1.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/manifest.git",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-phar": "*",
- "phar-io/version": "^2.0",
- "php": "^5.6 || ^7.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2018-07-08T19:23:20+00:00"
- },
- {
- "name": "phar-io/version",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/version.git",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "shasum": ""
- },
- "require": {
- "php": "^5.6 || ^7.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Library for handling version information and constraints",
- "time": "2018-07-08T19:19:57+00:00"
- },
- {
- "name": "phpdocumentor/reflection-common",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "~6"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jaap van Otterdijk",
- "email": "opensource@ijaap.nl"
- }
- ],
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
- "homepage": "http://www.phpdoc.org",
- "keywords": [
- "FQSEN",
- "phpDocumentor",
- "phpdoc",
- "reflection",
- "static analysis"
- ],
- "time": "2018-08-07T13:53:10+00:00"
- },
- {
- "name": "phpdocumentor/reflection-docblock",
- "version": "4.3.2",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
- "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
- "shasum": ""
- },
- "require": {
- "php": "^7.0",
- "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
- "phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
- "webmozart/assert": "^1.0"
- },
- "require-dev": {
- "doctrine/instantiator": "^1.0.5",
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0"
+ },
+ "funding": [
{
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
}
],
- "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": "2025-02-12T12:17:51+00:00"
},
{
- "name": "phpdocumentor/type-resolver",
- "version": "1.0.1",
+ "name": "phar-io/manifest",
+ "version": "2.0.4",
"source": {
"type": "git",
- "url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
- "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
- "php": "^7.1",
- "phpdocumentor/reflection-common": "^2.0"
- },
- "require-dev": {
- "ext-tokenizer": "^7.1",
- "mockery/mockery": "~1",
- "phpunit/phpunit": "^7.0"
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
}
],
- "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "time": "2019-08-22T18:11:29+00:00"
+ "time": "2024-03-03T12:33:53+00:00"
},
{
- "name": "phpspec/prophecy",
- "version": "1.9.0",
+ "name": "phar-io/version",
+ "version": "3.2.1",
"source": {
"type": "git",
- "url": "https://github.com/phpspec/prophecy.git",
- "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
- "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"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/recursion-context": "^1.0|^2.0|^3.0"
- },
- "require-dev": {
- "phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.8.x-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Prophecy\\": "src/Prophecy"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
},
{
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
}
],
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "homepage": "https://github.com/phpspec/prophecy",
- "keywords": [
- "Double",
- "Dummy",
- "fake",
- "mock",
- "spy",
- "stub"
- ],
- "time": "2019-10-03T11:07:50+00:00"
+ "description": "Library for handling version information and constraints",
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
+ "time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "6.1.4",
+ "version": "7.0.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
+ "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
- "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66",
+ "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
- "php": "^7.1",
- "phpunit/php-file-iterator": "^2.0",
+ "php": ">=7.2",
+ "phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^3.0",
+ "phpunit/php-token-stream": "^3.1.3 || ^4.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^3.1 || ^4.0",
+ "sebastian/environment": "^4.2.2",
"sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1"
+ "theseer/tokenizer": "^1.1.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^8.2.2"
},
"suggest": {
- "ext-xdebug": "^2.6.0"
+ "ext-xdebug": "^2.7.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.1-dev"
+ "dev-master": "7.0-dev"
}
},
"autoload": {
@@ -3467,27 +4520,37 @@
"testing",
"xunit"
],
- "time": "2018-10-31T16:06:48+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:09:37+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "2.0.2",
+ "version": "2.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "050bedf145a257b1ff02746c31894800e5122946"
+ "reference": "69deeb8664f611f156a924154985fbd4911eb36b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
- "reference": "050bedf145a257b1ff02746c31894800e5122946",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b",
+ "reference": "69deeb8664f611f156a924154985fbd4911eb36b",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -3517,7 +4580,17 @@
"filesystem",
"iterator"
],
- "time": "2018-09-13T20:33:42+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:39:50+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -3558,27 +4631,31 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ },
"time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "2.1.2",
+ "version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
+ "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb",
+ "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -3607,33 +4684,43 @@
"keywords": [
"timer"
],
- "time": "2019-06-07T04:22:29+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:42:41+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "3.1.1",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
- "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": "^7.1"
+ "php": "^7.3 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -3656,57 +4743,63 @@
"keywords": [
"tokenizer"
],
- "time": "2019-09-17T06:23:10+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "abandoned": true,
+ "time": "2020-08-04T08:28:15+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "7.5.18",
+ "version": "8.5.41",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "fcf6c4bfafaadc07785528b06385cce88935474d"
+ "reference": "d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fcf6c4bfafaadc07785528b06385cce88935474d",
- "reference": "fcf6c4bfafaadc07785528b06385cce88935474d",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa",
+ "reference": "d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.1",
+ "doctrine/instantiator": "^1.5.0",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.7",
- "phar-io/manifest": "^1.0.2",
- "phar-io/version": "^2.0",
- "php": "^7.1",
- "phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^6.0.7",
- "phpunit/php-file-iterator": "^2.0.1",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.12.1",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
+ "php": ">=7.2",
+ "phpunit/php-code-coverage": "^7.0.17",
+ "phpunit/php-file-iterator": "^2.0.6",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^2.1",
- "sebastian/comparator": "^3.0",
- "sebastian/diff": "^3.0",
- "sebastian/environment": "^4.0",
- "sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^2.0",
+ "phpunit/php-timer": "^2.1.4",
+ "sebastian/comparator": "^3.0.5",
+ "sebastian/diff": "^3.0.6",
+ "sebastian/environment": "^4.2.5",
+ "sebastian/exporter": "^3.1.6",
+ "sebastian/global-state": "^3.0.5",
+ "sebastian/object-enumerator": "^3.0.5",
+ "sebastian/resource-operations": "^2.0.3",
+ "sebastian/type": "^1.1.5",
"sebastian/version": "^2.0.1"
},
- "conflict": {
- "phpunit/phpunit-mock-objects": "*"
- },
- "require-dev": {
- "ext-pdo": "*"
- },
"suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^2.0"
+ "ext-soap": "To be able to generate mocks based on WSDL files",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage",
+ "phpunit/php-invoker": "To allow enforcing time limits"
},
"bin": [
"phpunit"
@@ -3714,7 +4807,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "7.5-dev"
+ "dev-master": "8.5-dev"
}
},
"autoload": {
@@ -3740,20 +4833,39 @@
"testing",
"xunit"
],
- "time": "2019-12-06T05:14:37+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.41"
+ },
+ "funding": [
+ {
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-12-05T13:44:26+00:00"
},
{
"name": "satooshi/php-coveralls",
- "version": "v2.1.0",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/php-coveralls/php-coveralls.git",
- "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d"
+ "reference": "3e6420fa666ef7bae5e750ddeac903153e193bae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d",
- "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d",
+ "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3e6420fa666ef7bae5e750ddeac903153e193bae",
+ "reference": "3e6420fa666ef7bae5e750ddeac903153e193bae",
"shasum": ""
},
"require": {
@@ -3762,10 +4874,10 @@
"guzzlehttp/guzzle": "^6.0",
"php": "^5.5 || ^7.0",
"psr/log": "^1.0",
- "symfony/config": "^2.1 || ^3.0 || ^4.0",
- "symfony/console": "^2.1 || ^3.0 || ^4.0",
- "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0",
- "symfony/yaml": "^2.0 || ^3.0 || ^4.0"
+ "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0",
+ "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0",
+ "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0",
+ "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0"
@@ -3779,7 +4891,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1-dev"
+ "dev-master": "2.2-dev"
}
},
"autoload": {
@@ -3823,28 +4935,32 @@
"github",
"test"
],
+ "support": {
+ "issues": "https://github.com/php-coveralls/php-coveralls/issues",
+ "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.2.0"
+ },
"abandoned": "php-coveralls/php-coveralls",
- "time": "2018-05-22T23:11:08+00:00"
+ "time": "2019-11-20T16:29:20+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -3869,29 +4985,39 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04T06:30:41+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:45:45+00:00"
},
{
"name": "sebastian/comparator",
- "version": "3.0.2",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
"shasum": ""
},
"require": {
- "php": "^7.1",
+ "php": ">=7.1",
"sebastian/diff": "^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -3909,6 +5035,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -3920,10 +5050,6 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality",
@@ -3933,24 +5059,34 @@
"compare",
"equality"
],
- "time": "2018-07-12T15:12:46+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2022-09-14T12:31:48+00:00"
},
{
"name": "sebastian/diff",
- "version": "3.0.2",
+ "version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
+ "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6",
+ "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || ^8.0",
@@ -3972,13 +5108,13 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
@@ -3989,24 +5125,34 @@
"unidiff",
"unified diff"
],
- "time": "2019-02-04T06:01:07+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:16:36+00:00"
},
{
"name": "sebastian/environment",
- "version": "4.2.3",
+ "version": "4.2.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368"
+ "reference": "56932f6049a0482853056ffd617c91ffcc754205"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
- "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205",
+ "reference": "56932f6049a0482853056ffd617c91ffcc754205",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
@@ -4042,29 +5188,39 @@
"environment",
"hhvm"
],
- "time": "2019-11-20T08:46:58+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:49:59+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.2",
+ "version": "3.1.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
+ "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56",
+ "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.2",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -4109,27 +5265,40 @@
"export",
"exporter"
],
- "time": "2019-09-14T09:02:43+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:21:38+00:00"
},
{
"name": "sebastian/global-state",
- "version": "2.0.0",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9",
+ "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.2",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "ext-dom": "*",
+ "phpunit/phpunit": "^8.0"
},
"suggest": {
"ext-uopz": "*"
@@ -4137,7 +5306,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -4160,24 +5329,34 @@
"keywords": [
"global state"
],
- "time": "2017-04-27T15:39:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:13:16+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.3",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541",
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.0",
"sebastian/object-reflector": "^1.1.1",
"sebastian/recursion-context": "^3.0"
},
@@ -4207,24 +5386,34 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-08-03T12:35:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:54:02+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.1",
+ "version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def",
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -4252,24 +5441,34 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2017-03-29T09:07:27+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:56:04+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.0",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c",
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -4290,14 +5489,14 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
@@ -4305,24 +5504,34 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2017-03-03T06:23:57+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T14:07:30+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "2.0.1",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
+ "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee",
+ "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
@@ -4347,29 +5556,41 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2018-10-04T04:07:39+00:00"
+ "support": {
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:59:09+00:00"
},
{
- "name": "sebastian/version",
- "version": "2.0.1",
+ "name": "sebastian/type",
+ "version": "1.1.5",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874",
+ "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "1.1-dev"
}
},
"autoload": {
@@ -4388,93 +5609,86 @@
"role": "lead"
}
],
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "time": "2016-10-03T07:35:21+00:00"
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/1.1.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T14:04:07+00:00"
},
{
- "name": "symfony/event-dispatcher",
- "version": "v2.8.32",
+ "name": "sebastian/version",
+ "version": "2.0.1",
"source": {
"type": "git",
- "url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "b59aacf238fadda50d612c9de73b74751872a903"
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b59aacf238fadda50d612c9de73b74751872a903",
- "reference": "b59aacf238fadda50d612c9de73b74751872a903",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
"shasum": ""
},
"require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "^2.0.5|~3.0.0",
- "symfony/dependency-injection": "~2.6|~3.0.0",
- "symfony/expression-language": "~2.6|~3.0.0",
- "symfony/stopwatch": "~2.3|~3.0.0"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
+ "php": ">=5.6"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.8-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Component\\EventDispatcher\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
+ "classmap": [
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "Symfony EventDispatcher Component",
- "homepage": "https://symfony.com",
- "time": "2017-11-05T15:25:56+00:00"
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+ "homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/master"
+ },
+ "time": "2016-10-03T07:35:21+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v3.4.22",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "2a651c2645c10bbedd21170771f122d935e0dd58"
+ "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2a651c2645c10bbedd21170771f122d935e0dd58",
- "reference": "2a651c2645c10bbedd21170771f122d935e0dd58",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004",
+ "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1|^2|^3"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
@@ -4497,29 +5711,46 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Stopwatch Component",
+ "description": "Provides a way to profile code",
"homepage": "https://symfony.com",
- "time": "2019-01-16T09:39:14+00:00"
+ "support": {
+ "source": "https://github.com/symfony/stopwatch/tree/v5.4.45"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.1.3",
+ "version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": "^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -4539,7 +5770,17 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2019-06-13T22:48:21+00:00"
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:36:25+00:00"
}
],
"aliases": [],
@@ -4552,6 +5793,7 @@
"platform": [],
"platform-dev": [],
"platform-overrides": {
- "php": "7.1.0"
- }
+ "php": "7.4.0"
+ },
+ "plugin-api-version": "2.3.0"
}
diff --git a/config/auth.default.php b/config/auth.default.php
index 5845fe9b..c1cc5cb3 100644
--- a/config/auth.default.php
+++ b/config/auth.default.php
@@ -1,5 +1,7 @@
available = true;
}
@@ -140,9 +142,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -150,10 +152,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -162,7 +164,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -172,9 +174,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -183,45 +185,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -230,10 +230,10 @@ public function resetModified($col = null)
* obj is an instance of Availability, delegates to
* equals(Availability). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -255,7 +255,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -263,10 +263,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -274,15 +274,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -291,12 +291,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|Availability The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -306,13 +306,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -323,24 +323,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -348,7 +351,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -408,7 +411,7 @@ public function isAvailable()
/**
* Get the [comment] column value.
*
- * @return string
+ * @return string|null
*/
public function getComment()
{
@@ -418,8 +421,8 @@ public function getComment()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -433,13 +436,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [eventid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventId($v)
{
@@ -457,13 +460,13 @@ public function setEventId($v)
}
return $this;
- } // setEventId()
+ }
/**
* Set the value of [userid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setUserId($v)
{
@@ -481,7 +484,7 @@ public function setUserId($v)
}
return $this;
- } // setUserId()
+ }
/**
* Sets the value of the [available] column.
@@ -490,8 +493,8 @@ public function setUserId($v)
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
- * @param boolean|integer|string $v The new value
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
+ * @param bool|integer|string $v The new value
+ * @return $this The current object (for fluent API support)
*/
public function setAvailable($v)
{
@@ -509,13 +512,13 @@ public function setAvailable($v)
}
return $this;
- } // setAvailable()
+ }
/**
* Set the value of [comment] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setComment($v)
{
@@ -529,7 +532,7 @@ public function setComment($v)
}
return $this;
- } // setComment()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -537,17 +540,17 @@ public function setComment($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->available !== true) {
- return false;
- }
+ if ($this->available !== true) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -557,19 +560,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AvailabilityTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -584,8 +588,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : AvailabilityTableMap::translateFieldName('Comment', TableMap::TYPE_PHPNAME, $indexType)];
$this->comment = (null !== $col) ? (string) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -593,6 +597,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 5; // 5 = AvailabilityTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\Availability'), 0, $e);
}
@@ -609,9 +614,10 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aEvent !== null && $this->eventid !== $this->aEvent->getId()) {
$this->aEvent = null;
@@ -619,19 +625,19 @@ public function ensureConsistency()
if ($this->aUser !== null && $this->userid !== $this->aUser->getId()) {
$this->aUser = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -666,13 +672,13 @@ public function reload($deep = false, ConnectionInterface $con = null)
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see Availability::setDeleted()
* @see Availability::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -702,12 +708,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -752,12 +758,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -794,22 +800,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[AvailabilityTableMap::COL_ID] = true;
@@ -846,18 +853,23 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'eventId':
$stmt->bindValue($identifier, $this->eventid, PDO::PARAM_INT);
+
break;
case 'userId':
$stmt->bindValue($identifier, $this->userid, PDO::PARAM_INT);
+
break;
case 'available':
$stmt->bindValue($identifier, (int) $this->available, PDO::PARAM_INT);
+
break;
case 'comment':
$stmt->bindValue($identifier, $this->comment, PDO::PARAM_STR);
+
break;
}
}
@@ -880,12 +892,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -896,14 +908,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = AvailabilityTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -915,30 +927,29 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getEventId();
- break;
+
case 2:
return $this->getUserId();
- break;
+
case 3:
return $this->getAvailable();
- break;
+
case 4:
return $this->getComment();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -948,29 +959,29 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['Availability'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['Availability'][$this->hashCode()] = true;
$keys = AvailabilityTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getEventId(),
$keys[2] => $this->getUserId(),
$keys[3] => $this->getAvailable(),
$keys[4] => $this->getComment(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -978,6 +989,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aUser) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'user';
@@ -989,9 +1001,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'User';
}
- $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aEvent) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'event';
@@ -1003,7 +1016,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'Event';
}
- $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
}
@@ -1013,30 +1026,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\Availability
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = AvailabilityTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\Availability
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1072,11 +1087,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = AvailabilityTableMap::getFieldNames($keyType);
@@ -1095,6 +1110,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[4], $arr)) {
$this->setComment($arr[$keys[4]]);
}
+
+ return $this;
}
/**
@@ -1114,9 +1131,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\Availability The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1130,9 +1147,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(AvailabilityTableMap::DATABASE_NAME);
@@ -1159,13 +1176,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildAvailabilityQuery::create();
$criteria->add(AvailabilityTableMap::COL_ID, $this->id);
@@ -1177,7 +1194,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1207,19 +1224,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1230,12 +1248,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\Availability (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\Availability (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setEventId($this->getEventId());
$copyObj->setUserId($this->getUserId());
@@ -1243,7 +1262,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setComment($this->getComment());
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1255,11 +1274,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\Availability Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1272,14 +1291,14 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildUser object.
*
- * @param ChildUser $v
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildUser $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setUser(ChildUser $v = null)
{
if ($v === null) {
- $this->setUserId(null);
+ $this->setUserId(NULL);
} else {
$this->setUserId($v->getId());
}
@@ -1300,11 +1319,11 @@ public function setUser(ChildUser $v = null)
/**
* Get the associated ChildUser object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildUser The associated ChildUser object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getUser(ConnectionInterface $con = null)
+ public function getUser(?ConnectionInterface $con = null)
{
if ($this->aUser === null && ($this->userid != 0)) {
$this->aUser = ChildUserQuery::create()->findPk($this->userid, $con);
@@ -1323,14 +1342,14 @@ public function getUser(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildEvent object.
*
- * @param ChildEvent $v
- * @return $this|\TechWilk\Rota\Availability The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEvent $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEvent(ChildEvent $v = null)
{
if ($v === null) {
- $this->setEventId(null);
+ $this->setEventId(NULL);
} else {
$this->setEventId($v->getId());
}
@@ -1351,11 +1370,11 @@ public function setEvent(ChildEvent $v = null)
/**
* Get the associated ChildEvent object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildEvent The associated ChildEvent object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvent(ConnectionInterface $con = null)
+ public function getEvent(?ConnectionInterface $con = null)
{
if ($this->aEvent === null && ($this->eventid != 0)) {
$this->aEvent = ChildEventQuery::create()->findPk($this->eventid, $con);
@@ -1375,6 +1394,8 @@ public function getEvent(ConnectionInterface $con = null)
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1395,6 +1416,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1403,15 +1426,17 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
} // if ($deep)
$this->aUser = null;
$this->aEvent = null;
+ return $this;
}
/**
@@ -1426,99 +1451,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1528,7 +1533,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1548,17 +1553,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/AvailabilityQuery.php b/generated-classes/TechWilk/Rota/Base/AvailabilityQuery.php
index 02649ac2..df45a891 100644
--- a/generated-classes/TechWilk/Rota/Base/AvailabilityQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/AvailabilityQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\AvailabilityTableMap;
/**
- * Base class that represents a query for the 'availability' table.
- *
- *
+ * Base class that represents a query for the `availability` table.
*
* @method ChildAvailabilityQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildAvailabilityQuery orderByEventId($order = Criteria::ASC) Order by the eventId column
@@ -62,17 +61,17 @@
*
* @method \TechWilk\Rota\UserQuery|\TechWilk\Rota\EventQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildAvailability findOne(ConnectionInterface $con = null) Return the first ChildAvailability matching the query
- * @method ChildAvailability findOneOrCreate(ConnectionInterface $con = null) Return the first ChildAvailability matching the query, or a new ChildAvailability object populated from the query conditions when no match is found
+ * @method ChildAvailability|null findOne(?ConnectionInterface $con = null) Return the first ChildAvailability matching the query
+ * @method ChildAvailability findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildAvailability matching the query, or a new ChildAvailability object populated from the query conditions when no match is found
*
- * @method ChildAvailability findOneById(int $id) Return the first ChildAvailability filtered by the id column
- * @method ChildAvailability findOneByEventId(int $eventId) Return the first ChildAvailability filtered by the eventId column
- * @method ChildAvailability findOneByUserId(int $userId) Return the first ChildAvailability filtered by the userId column
- * @method ChildAvailability findOneByAvailable(boolean $available) Return the first ChildAvailability filtered by the available column
- * @method ChildAvailability findOneByComment(string $comment) Return the first ChildAvailability filtered by the comment column *
-
- * @method ChildAvailability requirePk($key, ConnectionInterface $con = null) Return the ChildAvailability by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildAvailability requireOne(ConnectionInterface $con = null) Return the first ChildAvailability matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildAvailability|null findOneById(int $id) Return the first ChildAvailability filtered by the id column
+ * @method ChildAvailability|null findOneByEventId(int $eventId) Return the first ChildAvailability filtered by the eventId column
+ * @method ChildAvailability|null findOneByUserId(int $userId) Return the first ChildAvailability filtered by the userId column
+ * @method ChildAvailability|null findOneByAvailable(boolean $available) Return the first ChildAvailability filtered by the available column
+ * @method ChildAvailability|null findOneByComment(string $comment) Return the first ChildAvailability filtered by the comment column
+ *
+ * @method ChildAvailability requirePk($key, ?ConnectionInterface $con = null) Return the ChildAvailability by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildAvailability requireOne(?ConnectionInterface $con = null) Return the first ChildAvailability matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildAvailability requireOneById(int $id) Return the first ChildAvailability filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildAvailability requireOneByEventId(int $eventId) Return the first ChildAvailability filtered by the eventId column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -80,14 +79,22 @@
* @method ChildAvailability requireOneByAvailable(boolean $available) Return the first ChildAvailability filtered by the available column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildAvailability requireOneByComment(string $comment) Return the first ChildAvailability filtered by the comment column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildAvailability[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildAvailability objects based on current ModelCriteria
- * @method ChildAvailability[]|ObjectCollection findById(int $id) Return ChildAvailability objects filtered by the id column
- * @method ChildAvailability[]|ObjectCollection findByEventId(int $eventId) Return ChildAvailability objects filtered by the eventId column
- * @method ChildAvailability[]|ObjectCollection findByUserId(int $userId) Return ChildAvailability objects filtered by the userId column
- * @method ChildAvailability[]|ObjectCollection findByAvailable(boolean $available) Return ChildAvailability objects filtered by the available column
- * @method ChildAvailability[]|ObjectCollection findByComment(string $comment) Return ChildAvailability objects filtered by the comment column
- * @method ChildAvailability[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildAvailability[]|Collection find(?ConnectionInterface $con = null) Return ChildAvailability objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildAvailability objects based on current ModelCriteria
+ *
+ * @method ChildAvailability[]|Collection findById(int|array $id) Return ChildAvailability objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildAvailability objects filtered by the id column
+ * @method ChildAvailability[]|Collection findByEventId(int|array $eventId) Return ChildAvailability objects filtered by the eventId column
+ * @psalm-method Collection&\Traversable findByEventId(int|array $eventId) Return ChildAvailability objects filtered by the eventId column
+ * @method ChildAvailability[]|Collection findByUserId(int|array $userId) Return ChildAvailability objects filtered by the userId column
+ * @psalm-method Collection&\Traversable findByUserId(int|array $userId) Return ChildAvailability objects filtered by the userId column
+ * @method ChildAvailability[]|Collection findByAvailable(boolean|array $available) Return ChildAvailability objects filtered by the available column
+ * @psalm-method Collection&\Traversable findByAvailable(boolean|array $available) Return ChildAvailability objects filtered by the available column
+ * @method ChildAvailability[]|Collection findByComment(string|array $comment) Return ChildAvailability objects filtered by the comment column
+ * @psalm-method Collection&\Traversable findByComment(string|array $comment) Return ChildAvailability objects filtered by the comment column
*
+ * @method ChildAvailability[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class AvailabilityQuery extends ModelCriteria
{
@@ -96,9 +103,9 @@ abstract class AvailabilityQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\AvailabilityQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\Availability', $modelAlias = null)
{
@@ -108,12 +115,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildAvailabilityQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildAvailabilityQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildAvailabilityQuery) {
return $criteria;
@@ -143,7 +150,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildAvailability|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -175,8 +182,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -208,8 +215,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildAvailability|array|mixed the result, formatted by the current formatter
*/
@@ -229,12 +236,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -251,25 +258,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(AvailabilityTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(AvailabilityTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(AvailabilityTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(AvailabilityTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -282,15 +295,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -310,7 +323,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(AvailabilityTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(AvailabilityTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -325,15 +340,15 @@ public function filterById($id = null, $comparison = null)
*
* @see filterByEvent()
*
- * @param mixed $eventId The value to use as filter.
+ * @param mixed $eventId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventId($eventId = null, $comparison = null)
+ public function filterByEventId($eventId = null, ?string $comparison = null)
{
if (is_array($eventId)) {
$useMinMax = false;
@@ -353,7 +368,9 @@ public function filterByEventId($eventId = null, $comparison = null)
}
}
- return $this->addUsingAlias(AvailabilityTableMap::COL_EVENTID, $eventId, $comparison);
+ $this->addUsingAlias(AvailabilityTableMap::COL_EVENTID, $eventId, $comparison);
+
+ return $this;
}
/**
@@ -368,15 +385,15 @@ public function filterByEventId($eventId = null, $comparison = null)
*
* @see filterByUser()
*
- * @param mixed $userId The value to use as filter.
+ * @param mixed $userId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUserId($userId = null, $comparison = null)
+ public function filterByUserId($userId = null, ?string $comparison = null)
{
if (is_array($userId)) {
$useMinMax = false;
@@ -396,7 +413,9 @@ public function filterByUserId($userId = null, $comparison = null)
}
}
- return $this->addUsingAlias(AvailabilityTableMap::COL_USERID, $userId, $comparison);
+ $this->addUsingAlias(AvailabilityTableMap::COL_USERID, $userId, $comparison);
+
+ return $this;
}
/**
@@ -408,22 +427,24 @@ public function filterByUserId($userId = null, $comparison = null)
* $query->filterByAvailable('yes'); // WHERE available = true
*
*
- * @param boolean|string $available The value to use as filter.
+ * @param bool|string $available The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByAvailable($available = null, $comparison = null)
+ public function filterByAvailable($available = null, ?string $comparison = null)
{
if (is_string($available)) {
- $available = in_array(strtolower($available), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
+ $available = in_array(strtolower($available), array('false', 'off', '-', 'no', 'n', '0', ''), true) ? false : true;
}
- return $this->addUsingAlias(AvailabilityTableMap::COL_AVAILABLE, $available, $comparison);
+ $this->addUsingAlias(AvailabilityTableMap::COL_AVAILABLE, $available, $comparison);
+
+ return $this;
}
/**
@@ -433,14 +454,15 @@ public function filterByAvailable($available = null, $comparison = null)
*
* $query->filterByComment('fooValue'); // WHERE comment = 'fooValue'
* $query->filterByComment('%fooValue%', Criteria::LIKE); // WHERE comment LIKE '%fooValue%'
+ * $query->filterByComment(['foo', 'bar']); // WHERE comment IN ('foo', 'bar')
*
*
- * @param string $comment The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $comment The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByComment($comment = null, $comparison = null)
+ public function filterByComment($comment = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($comment)) {
@@ -448,20 +470,22 @@ public function filterByComment($comment = null, $comparison = null)
}
}
- return $this->addUsingAlias(AvailabilityTableMap::COL_COMMENT, $comment, $comparison);
+ $this->addUsingAlias(AvailabilityTableMap::COL_COMMENT, $comment, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\User object
*
* @param \TechWilk\Rota\User|ObjectCollection $user The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUser($user, $comparison = null)
+ public function filterByUser($user, ?string $comparison = null)
{
if ($user instanceof \TechWilk\Rota\User) {
return $this
@@ -471,8 +495,10 @@ public function filterByUser($user, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(AvailabilityTableMap::COL_USERID, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByUser() only accepts arguments of type \TechWilk\Rota\User or Collection');
}
@@ -481,12 +507,12 @@ public function filterByUser($user, $comparison = null)
/**
* Adds a JOIN clause to the query using the User relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinUser(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('User');
@@ -515,9 +541,9 @@ public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\UserQuery A secondary query class using the current class as primary query
*/
@@ -528,17 +554,113 @@ public function useUserQuery($relationAlias = null, $joinType = Criteria::INNER_
->useQuery($relationAlias ? $relationAlias : 'User', '\TechWilk\Rota\UserQuery');
}
+ /**
+ * Use the User relation User object
+ *
+ * @param callable(\TechWilk\Rota\UserQuery):\TechWilk\Rota\UserQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withUserQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useUserQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to User table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the EXISTS statement
+ */
+ public function useUserExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT EXISTS query.
+ *
+ * @see useUserExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useUserNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the IN statement
+ */
+ public function useInUserQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT IN query.
+ *
+ * @see useUserInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInUserQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\Event object
*
* @param \TechWilk\Rota\Event|ObjectCollection $event The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEvent($event, $comparison = null)
+ public function filterByEvent($event, ?string $comparison = null)
{
if ($event instanceof \TechWilk\Rota\Event) {
return $this
@@ -548,8 +670,10 @@ public function filterByEvent($event, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(AvailabilityTableMap::COL_EVENTID, $event->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEvent() only accepts arguments of type \TechWilk\Rota\Event or Collection');
}
@@ -558,12 +682,12 @@ public function filterByEvent($event, $comparison = null)
/**
* Adds a JOIN clause to the query using the Event relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEvent(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Event');
@@ -592,9 +716,9 @@ public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOI
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventQuery A secondary query class using the current class as primary query
*/
@@ -605,12 +729,108 @@ public function useEventQuery($relationAlias = null, $joinType = Criteria::INNER
->useQuery($relationAlias ? $relationAlias : 'Event', '\TechWilk\Rota\EventQuery');
}
+ /**
+ * Use the Event relation Event object
+ *
+ * @param callable(\TechWilk\Rota\EventQuery):\TechWilk\Rota\EventQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Event table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the EXISTS statement
+ */
+ public function useEventExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT EXISTS query.
+ *
+ * @see useEventExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the IN statement
+ */
+ public function useInEventQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT IN query.
+ *
+ * @see useEventInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildAvailability $availability Object to remove from the list of results
+ * @param ChildAvailability $availability Object to remove from the list of results
*
- * @return $this|ChildAvailabilityQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($availability = null)
{
@@ -627,7 +847,7 @@ public function prune($availability = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(AvailabilityTableMap::DATABASE_NAME);
@@ -652,12 +872,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(AvailabilityTableMap::DATABASE_NAME);
@@ -681,4 +901,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // AvailabilityQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/CalendarToken.php b/generated-classes/TechWilk/Rota/Base/CalendarToken.php
index 6b5968b3..ec7a3df0 100644
--- a/generated-classes/TechWilk/Rota/Base/CalendarToken.php
+++ b/generated-classes/TechWilk/Rota/Base/CalendarToken.php
@@ -17,7 +17,6 @@
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Parser\AbstractParser;
use Propel\Runtime\Util\PropelDateTime;
-use TechWilk\Rota\CalendarToken as ChildCalendarToken;
use TechWilk\Rota\CalendarTokenQuery as ChildCalendarTokenQuery;
use TechWilk\Rota\User as ChildUser;
use TechWilk\Rota\UserQuery as ChildUserQuery;
@@ -34,19 +33,21 @@ abstract class CalendarToken implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\CalendarTokenTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\CalendarTokenTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -55,14 +56,14 @@ abstract class CalendarToken implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -95,7 +96,7 @@ abstract class CalendarToken implements ActiveRecordInterface
/**
* The value for the description field.
*
- * @var string
+ * @var string|null
*/
protected $description;
@@ -110,28 +111,28 @@ abstract class CalendarToken implements ActiveRecordInterface
/**
* The value for the revokeddate field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $revokeddate;
/**
* The value for the lastfetched field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $lastfetched;
/**
* The value for the created field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $created;
/**
* The value for the updated field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $updated;
@@ -144,7 +145,7 @@ abstract class CalendarToken implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
@@ -154,7 +155,7 @@ abstract class CalendarToken implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->revoked = false;
}
@@ -171,9 +172,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -181,10 +182,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -193,7 +194,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -203,9 +204,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -214,45 +215,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -261,10 +260,10 @@ public function resetModified($col = null)
* obj is an instance of CalendarToken, delegates to
* equals(CalendarToken). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -286,7 +285,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -294,10 +293,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -305,15 +304,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -322,12 +321,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|CalendarToken The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -337,13 +336,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -354,24 +353,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -379,7 +381,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -429,7 +431,7 @@ public function getFormat()
/**
* Get the [description] column value.
*
- * @return string
+ * @return string|null
*/
public function getDescription()
{
@@ -460,12 +462,14 @@ public function isRevoked()
* Get the [optionally formatted] temporal [revokeddate] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
+ *
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getRevokedDate($format = null)
{
@@ -480,12 +484,14 @@ public function getRevokedDate($format = null)
* Get the [optionally formatted] temporal [lastfetched] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getLastFetched($format = null)
{
@@ -500,12 +506,14 @@ public function getLastFetched($format = null)
* Get the [optionally formatted] temporal [created] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
+ *
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getCreated($format = null)
{
@@ -520,12 +528,14 @@ public function getCreated($format = null)
* Get the [optionally formatted] temporal [updated] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getUpdated($format = null)
{
@@ -539,8 +549,8 @@ public function getUpdated($format = null)
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -554,13 +564,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [token] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setToken($v)
{
@@ -574,13 +584,13 @@ public function setToken($v)
}
return $this;
- } // setToken()
+ }
/**
* Set the value of [userid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setUserid($v)
{
@@ -598,13 +608,13 @@ public function setUserid($v)
}
return $this;
- } // setUserid()
+ }
/**
* Set the value of [format] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setFormat($v)
{
@@ -618,13 +628,13 @@ public function setFormat($v)
}
return $this;
- } // setFormat()
+ }
/**
* Set the value of [description] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDescription($v)
{
@@ -638,7 +648,7 @@ public function setDescription($v)
}
return $this;
- } // setDescription()
+ }
/**
* Sets the value of the [revoked] column.
@@ -647,8 +657,8 @@ public function setDescription($v)
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
- * @param boolean|integer|string $v The new value
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @param bool|integer|string $v The new value
+ * @return $this The current object (for fluent API support)
*/
public function setRevoked($v)
{
@@ -666,14 +676,14 @@ public function setRevoked($v)
}
return $this;
- } // setRevoked()
+ }
/**
* Sets the value of [revokeddate] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setRevokedDate($v)
{
@@ -686,14 +696,14 @@ public function setRevokedDate($v)
} // if either are not null
return $this;
- } // setRevokedDate()
+ }
/**
* Sets the value of [lastfetched] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setLastFetched($v)
{
@@ -706,14 +716,14 @@ public function setLastFetched($v)
} // if either are not null
return $this;
- } // setLastFetched()
+ }
/**
* Sets the value of [created] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setCreated($v)
{
@@ -726,14 +736,14 @@ public function setCreated($v)
} // if either are not null
return $this;
- } // setCreated()
+ }
/**
* Sets the value of [updated] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setUpdated($v)
{
@@ -746,7 +756,7 @@ public function setUpdated($v)
} // if either are not null
return $this;
- } // setUpdated()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -754,17 +764,17 @@ public function setUpdated($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->revoked !== false) {
- return false;
- }
+ if ($this->revoked !== false) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -774,19 +784,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CalendarTokenTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -828,8 +839,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = null;
}
$this->updated = (null !== $col) ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -837,6 +848,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 10; // 10 = CalendarTokenTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\CalendarToken'), 0, $e);
}
@@ -853,26 +865,27 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aUser !== null && $this->userid !== $this->aUser->getId()) {
$this->aUser = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -906,13 +919,13 @@ public function reload($deep = false, ConnectionInterface $con = null)
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see CalendarToken::setDeleted()
* @see CalendarToken::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -942,12 +955,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -967,12 +980,13 @@ public function save(ConnectionInterface $con = null)
if ($isInsert) {
$ret = $ret && $this->preInsert($con);
// timestampable behavior
-
+ $time = time();
+ $highPrecision = \Propel\Runtime\Util\PropelDateTime::createHighPrecision();
if (!$this->isColumnModified(CalendarTokenTableMap::COL_CREATED)) {
- $this->setCreated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setCreated($highPrecision);
}
if (!$this->isColumnModified(CalendarTokenTableMap::COL_UPDATED)) {
- $this->setUpdated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setUpdated($highPrecision);
}
} else {
$ret = $ret && $this->preUpdate($con);
@@ -1004,12 +1018,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -1039,22 +1053,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[CalendarTokenTableMap::COL_ID] = true;
@@ -1106,33 +1121,43 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'token':
$stmt->bindValue($identifier, $this->token, PDO::PARAM_STR);
+
break;
case 'userId':
$stmt->bindValue($identifier, $this->userid, PDO::PARAM_INT);
+
break;
case 'format':
$stmt->bindValue($identifier, $this->format, PDO::PARAM_STR);
+
break;
case 'description':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+
break;
case 'revoked':
$stmt->bindValue($identifier, (int) $this->revoked, PDO::PARAM_INT);
+
break;
case 'revokedDate':
$stmt->bindValue($identifier, $this->revokeddate ? $this->revokeddate->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'lastFetched':
$stmt->bindValue($identifier, $this->lastfetched ? $this->lastfetched->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'created':
$stmt->bindValue($identifier, $this->created ? $this->created->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'updated':
$stmt->bindValue($identifier, $this->updated ? $this->updated->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
}
}
@@ -1155,12 +1180,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -1171,14 +1196,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = CalendarTokenTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -1190,45 +1215,44 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getToken();
- break;
+
case 2:
return $this->getUserid();
- break;
+
case 3:
return $this->getFormat();
- break;
+
case 4:
return $this->getDescription();
- break;
+
case 5:
return $this->getRevoked();
- break;
+
case 6:
return $this->getRevokedDate();
- break;
+
case 7:
return $this->getLastFetched();
- break;
+
case 8:
return $this->getCreated();
- break;
+
case 9:
return $this->getUpdated();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -1238,23 +1262,23 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['CalendarToken'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['CalendarToken'][$this->hashCode()] = true;
$keys = CalendarTokenTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getToken(),
$keys[2] => $this->getUserid(),
@@ -1265,21 +1289,21 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$keys[7] => $this->getLastFetched(),
$keys[8] => $this->getCreated(),
$keys[9] => $this->getUpdated(),
- );
+ ];
if ($result[$keys[6]] instanceof \DateTimeInterface) {
- $result[$keys[6]] = $result[$keys[6]]->format('c');
+ $result[$keys[6]] = $result[$keys[6]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[7]] instanceof \DateTimeInterface) {
- $result[$keys[7]] = $result[$keys[7]]->format('c');
+ $result[$keys[7]] = $result[$keys[7]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[8]] instanceof \DateTimeInterface) {
- $result[$keys[8]] = $result[$keys[8]]->format('c');
+ $result[$keys[8]] = $result[$keys[8]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[9]] instanceof \DateTimeInterface) {
- $result[$keys[9]] = $result[$keys[9]]->format('c');
+ $result[$keys[9]] = $result[$keys[9]]->format('Y-m-d H:i:s.u');
}
$virtualColumns = $this->virtualColumns;
@@ -1289,6 +1313,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aUser) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'user';
@@ -1300,7 +1325,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'User';
}
- $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
}
@@ -1310,30 +1335,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\CalendarToken
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = CalendarTokenTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\CalendarToken
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1384,11 +1411,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = CalendarTokenTableMap::getFieldNames($keyType);
@@ -1422,6 +1449,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[9], $arr)) {
$this->setUpdated($arr[$keys[9]]);
}
+
+ return $this;
}
/**
@@ -1441,9 +1470,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\CalendarToken The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1457,9 +1486,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(CalendarTokenTableMap::DATABASE_NAME);
@@ -1501,13 +1530,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildCalendarTokenQuery::create();
$criteria->add(CalendarTokenTableMap::COL_ID, $this->id);
@@ -1519,7 +1548,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1549,19 +1578,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1572,12 +1602,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\CalendarToken (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\CalendarToken (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setToken($this->getToken());
$copyObj->setUserid($this->getUserid());
@@ -1590,7 +1621,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setUpdated($this->getUpdated());
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1602,11 +1633,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\CalendarToken Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1619,14 +1650,14 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildUser object.
*
- * @param ChildUser $v
- * @return $this|\TechWilk\Rota\CalendarToken The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildUser $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setUser(ChildUser $v = null)
{
if ($v === null) {
- $this->setUserid(null);
+ $this->setUserid(NULL);
} else {
$this->setUserid($v->getId());
}
@@ -1647,11 +1678,11 @@ public function setUser(ChildUser $v = null)
/**
* Get the associated ChildUser object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildUser The associated ChildUser object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getUser(ConnectionInterface $con = null)
+ public function getUser(?ConnectionInterface $con = null)
{
if ($this->aUser === null && ($this->userid != 0)) {
$this->aUser = ChildUserQuery::create()->findPk($this->userid, $con);
@@ -1671,6 +1702,8 @@ public function getUser(ConnectionInterface $con = null)
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1693,6 +1726,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1701,14 +1736,16 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
} // if ($deep)
$this->aUser = null;
+ return $this;
}
/**
@@ -1726,7 +1763,7 @@ public function __toString()
/**
* Mark the current object so that the update date doesn't get updated during next save
*
- * @return $this|ChildCalendarToken The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
@@ -1737,99 +1774,79 @@ public function keepUpdateDateUnchanged()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1839,7 +1856,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1859,17 +1876,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/CalendarTokenQuery.php b/generated-classes/TechWilk/Rota/Base/CalendarTokenQuery.php
index c3bad779..f13e42a8 100644
--- a/generated-classes/TechWilk/Rota/Base/CalendarTokenQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/CalendarTokenQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\CalendarTokenTableMap;
/**
- * Base class that represents a query for the 'calendarTokens' table.
- *
- *
+ * Base class that represents a query for the `calendarTokens` table.
*
* @method ChildCalendarTokenQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCalendarTokenQuery orderByToken($order = Criteria::ASC) Order by the token column
@@ -62,22 +61,22 @@
*
* @method \TechWilk\Rota\UserQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildCalendarToken findOne(ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query
- * @method ChildCalendarToken findOneOrCreate(ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query, or a new ChildCalendarToken object populated from the query conditions when no match is found
+ * @method ChildCalendarToken|null findOne(?ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query
+ * @method ChildCalendarToken findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query, or a new ChildCalendarToken object populated from the query conditions when no match is found
+ *
+ * @method ChildCalendarToken|null findOneById(int $id) Return the first ChildCalendarToken filtered by the id column
+ * @method ChildCalendarToken|null findOneByToken(string $token) Return the first ChildCalendarToken filtered by the token column
+ * @method ChildCalendarToken|null findOneByUserid(int $userId) Return the first ChildCalendarToken filtered by the userId column
+ * @method ChildCalendarToken|null findOneByFormat(string $format) Return the first ChildCalendarToken filtered by the format column
+ * @method ChildCalendarToken|null findOneByDescription(string $description) Return the first ChildCalendarToken filtered by the description column
+ * @method ChildCalendarToken|null findOneByRevoked(boolean $revoked) Return the first ChildCalendarToken filtered by the revoked column
+ * @method ChildCalendarToken|null findOneByRevokedDate(string $revokedDate) Return the first ChildCalendarToken filtered by the revokedDate column
+ * @method ChildCalendarToken|null findOneByLastFetched(string $lastFetched) Return the first ChildCalendarToken filtered by the lastFetched column
+ * @method ChildCalendarToken|null findOneByCreated(string $created) Return the first ChildCalendarToken filtered by the created column
+ * @method ChildCalendarToken|null findOneByUpdated(string $updated) Return the first ChildCalendarToken filtered by the updated column
*
- * @method ChildCalendarToken findOneById(int $id) Return the first ChildCalendarToken filtered by the id column
- * @method ChildCalendarToken findOneByToken(string $token) Return the first ChildCalendarToken filtered by the token column
- * @method ChildCalendarToken findOneByUserid(int $userId) Return the first ChildCalendarToken filtered by the userId column
- * @method ChildCalendarToken findOneByFormat(string $format) Return the first ChildCalendarToken filtered by the format column
- * @method ChildCalendarToken findOneByDescription(string $description) Return the first ChildCalendarToken filtered by the description column
- * @method ChildCalendarToken findOneByRevoked(boolean $revoked) Return the first ChildCalendarToken filtered by the revoked column
- * @method ChildCalendarToken findOneByRevokedDate(string $revokedDate) Return the first ChildCalendarToken filtered by the revokedDate column
- * @method ChildCalendarToken findOneByLastFetched(string $lastFetched) Return the first ChildCalendarToken filtered by the lastFetched column
- * @method ChildCalendarToken findOneByCreated(string $created) Return the first ChildCalendarToken filtered by the created column
- * @method ChildCalendarToken findOneByUpdated(string $updated) Return the first ChildCalendarToken filtered by the updated column *
-
- * @method ChildCalendarToken requirePk($key, ConnectionInterface $con = null) Return the ChildCalendarToken by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildCalendarToken requireOne(ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildCalendarToken requirePk($key, ?ConnectionInterface $con = null) Return the ChildCalendarToken by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildCalendarToken requireOne(?ConnectionInterface $con = null) Return the first ChildCalendarToken matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildCalendarToken requireOneById(int $id) Return the first ChildCalendarToken filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildCalendarToken requireOneByToken(string $token) Return the first ChildCalendarToken filtered by the token column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -90,19 +89,32 @@
* @method ChildCalendarToken requireOneByCreated(string $created) Return the first ChildCalendarToken filtered by the created column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildCalendarToken requireOneByUpdated(string $updated) Return the first ChildCalendarToken filtered by the updated column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildCalendarToken[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildCalendarToken objects based on current ModelCriteria
- * @method ChildCalendarToken[]|ObjectCollection findById(int $id) Return ChildCalendarToken objects filtered by the id column
- * @method ChildCalendarToken[]|ObjectCollection findByToken(string $token) Return ChildCalendarToken objects filtered by the token column
- * @method ChildCalendarToken[]|ObjectCollection findByUserid(int $userId) Return ChildCalendarToken objects filtered by the userId column
- * @method ChildCalendarToken[]|ObjectCollection findByFormat(string $format) Return ChildCalendarToken objects filtered by the format column
- * @method ChildCalendarToken[]|ObjectCollection findByDescription(string $description) Return ChildCalendarToken objects filtered by the description column
- * @method ChildCalendarToken[]|ObjectCollection findByRevoked(boolean $revoked) Return ChildCalendarToken objects filtered by the revoked column
- * @method ChildCalendarToken[]|ObjectCollection findByRevokedDate(string $revokedDate) Return ChildCalendarToken objects filtered by the revokedDate column
- * @method ChildCalendarToken[]|ObjectCollection findByLastFetched(string $lastFetched) Return ChildCalendarToken objects filtered by the lastFetched column
- * @method ChildCalendarToken[]|ObjectCollection findByCreated(string $created) Return ChildCalendarToken objects filtered by the created column
- * @method ChildCalendarToken[]|ObjectCollection findByUpdated(string $updated) Return ChildCalendarToken objects filtered by the updated column
- * @method ChildCalendarToken[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildCalendarToken[]|Collection find(?ConnectionInterface $con = null) Return ChildCalendarToken objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildCalendarToken objects based on current ModelCriteria
*
+ * @method ChildCalendarToken[]|Collection findById(int|array $id) Return ChildCalendarToken objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildCalendarToken objects filtered by the id column
+ * @method ChildCalendarToken[]|Collection findByToken(string|array $token) Return ChildCalendarToken objects filtered by the token column
+ * @psalm-method Collection&\Traversable findByToken(string|array $token) Return ChildCalendarToken objects filtered by the token column
+ * @method ChildCalendarToken[]|Collection findByUserid(int|array $userId) Return ChildCalendarToken objects filtered by the userId column
+ * @psalm-method Collection&\Traversable findByUserid(int|array $userId) Return ChildCalendarToken objects filtered by the userId column
+ * @method ChildCalendarToken[]|Collection findByFormat(string|array $format) Return ChildCalendarToken objects filtered by the format column
+ * @psalm-method Collection&\Traversable findByFormat(string|array $format) Return ChildCalendarToken objects filtered by the format column
+ * @method ChildCalendarToken[]|Collection findByDescription(string|array $description) Return ChildCalendarToken objects filtered by the description column
+ * @psalm-method Collection&\Traversable findByDescription(string|array $description) Return ChildCalendarToken objects filtered by the description column
+ * @method ChildCalendarToken[]|Collection findByRevoked(boolean|array $revoked) Return ChildCalendarToken objects filtered by the revoked column
+ * @psalm-method Collection&\Traversable findByRevoked(boolean|array $revoked) Return ChildCalendarToken objects filtered by the revoked column
+ * @method ChildCalendarToken[]|Collection findByRevokedDate(string|array $revokedDate) Return ChildCalendarToken objects filtered by the revokedDate column
+ * @psalm-method Collection&\Traversable findByRevokedDate(string|array $revokedDate) Return ChildCalendarToken objects filtered by the revokedDate column
+ * @method ChildCalendarToken[]|Collection findByLastFetched(string|array $lastFetched) Return ChildCalendarToken objects filtered by the lastFetched column
+ * @psalm-method Collection&\Traversable findByLastFetched(string|array $lastFetched) Return ChildCalendarToken objects filtered by the lastFetched column
+ * @method ChildCalendarToken[]|Collection findByCreated(string|array $created) Return ChildCalendarToken objects filtered by the created column
+ * @psalm-method Collection&\Traversable findByCreated(string|array $created) Return ChildCalendarToken objects filtered by the created column
+ * @method ChildCalendarToken[]|Collection findByUpdated(string|array $updated) Return ChildCalendarToken objects filtered by the updated column
+ * @psalm-method Collection&\Traversable findByUpdated(string|array $updated) Return ChildCalendarToken objects filtered by the updated column
+ *
+ * @method ChildCalendarToken[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class CalendarTokenQuery extends ModelCriteria
{
@@ -111,9 +123,9 @@ abstract class CalendarTokenQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\CalendarTokenQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\CalendarToken', $modelAlias = null)
{
@@ -123,12 +135,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildCalendarTokenQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildCalendarTokenQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildCalendarTokenQuery) {
return $criteria;
@@ -158,7 +170,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildCalendarToken|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -190,8 +202,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -223,8 +235,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildCalendarToken|array|mixed the result, formatted by the current formatter
*/
@@ -244,12 +256,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -266,25 +278,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -297,15 +315,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -325,7 +343,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -335,14 +355,15 @@ public function filterById($id = null, $comparison = null)
*
* $query->filterByToken('fooValue'); // WHERE token = 'fooValue'
* $query->filterByToken('%fooValue%', Criteria::LIKE); // WHERE token LIKE '%fooValue%'
+ * $query->filterByToken(['foo', 'bar']); // WHERE token IN ('foo', 'bar')
*
*
- * @param string $token The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $token The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByToken($token = null, $comparison = null)
+ public function filterByToken($token = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($token)) {
@@ -350,7 +371,9 @@ public function filterByToken($token = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_TOKEN, $token, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_TOKEN, $token, $comparison);
+
+ return $this;
}
/**
@@ -365,15 +388,15 @@ public function filterByToken($token = null, $comparison = null)
*
* @see filterByUser()
*
- * @param mixed $userid The value to use as filter.
+ * @param mixed $userid The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUserid($userid = null, $comparison = null)
+ public function filterByUserid($userid = null, ?string $comparison = null)
{
if (is_array($userid)) {
$useMinMax = false;
@@ -393,7 +416,9 @@ public function filterByUserid($userid = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_USERID, $userid, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_USERID, $userid, $comparison);
+
+ return $this;
}
/**
@@ -403,14 +428,15 @@ public function filterByUserid($userid = null, $comparison = null)
*
* $query->filterByFormat('fooValue'); // WHERE format = 'fooValue'
* $query->filterByFormat('%fooValue%', Criteria::LIKE); // WHERE format LIKE '%fooValue%'
+ * $query->filterByFormat(['foo', 'bar']); // WHERE format IN ('foo', 'bar')
*
*
- * @param string $format The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $format The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByFormat($format = null, $comparison = null)
+ public function filterByFormat($format = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($format)) {
@@ -418,7 +444,9 @@ public function filterByFormat($format = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_FORMAT, $format, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_FORMAT, $format, $comparison);
+
+ return $this;
}
/**
@@ -428,14 +456,15 @@ public function filterByFormat($format = null, $comparison = null)
*
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%', Criteria::LIKE); // WHERE description LIKE '%fooValue%'
+ * $query->filterByDescription(['foo', 'bar']); // WHERE description IN ('foo', 'bar')
*
*
- * @param string $description The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $description The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByDescription($description = null, $comparison = null)
+ public function filterByDescription($description = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
@@ -443,7 +472,9 @@ public function filterByDescription($description = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_DESCRIPTION, $description, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_DESCRIPTION, $description, $comparison);
+
+ return $this;
}
/**
@@ -455,22 +486,24 @@ public function filterByDescription($description = null, $comparison = null)
* $query->filterByRevoked('yes'); // WHERE revoked = true
*
*
- * @param boolean|string $revoked The value to use as filter.
+ * @param bool|string $revoked The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRevoked($revoked = null, $comparison = null)
+ public function filterByRevoked($revoked = null, ?string $comparison = null)
{
if (is_string($revoked)) {
- $revoked = in_array(strtolower($revoked), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
+ $revoked = in_array(strtolower($revoked), array('false', 'off', '-', 'no', 'n', '0', ''), true) ? false : true;
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_REVOKED, $revoked, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_REVOKED, $revoked, $comparison);
+
+ return $this;
}
/**
@@ -483,17 +516,17 @@ public function filterByRevoked($revoked = null, $comparison = null)
* $query->filterByRevokedDate(array('max' => 'yesterday')); // WHERE revokedDate > '2011-03-13'
*
*
- * @param mixed $revokedDate The value to use as filter.
+ * @param mixed $revokedDate The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRevokedDate($revokedDate = null, $comparison = null)
+ public function filterByRevokedDate($revokedDate = null, ?string $comparison = null)
{
if (is_array($revokedDate)) {
$useMinMax = false;
@@ -513,7 +546,9 @@ public function filterByRevokedDate($revokedDate = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_REVOKEDDATE, $revokedDate, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_REVOKEDDATE, $revokedDate, $comparison);
+
+ return $this;
}
/**
@@ -526,17 +561,17 @@ public function filterByRevokedDate($revokedDate = null, $comparison = null)
* $query->filterByLastFetched(array('max' => 'yesterday')); // WHERE lastFetched > '2011-03-13'
*
*
- * @param mixed $lastFetched The value to use as filter.
+ * @param mixed $lastFetched The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByLastFetched($lastFetched = null, $comparison = null)
+ public function filterByLastFetched($lastFetched = null, ?string $comparison = null)
{
if (is_array($lastFetched)) {
$useMinMax = false;
@@ -556,7 +591,9 @@ public function filterByLastFetched($lastFetched = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_LASTFETCHED, $lastFetched, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_LASTFETCHED, $lastFetched, $comparison);
+
+ return $this;
}
/**
@@ -569,17 +606,17 @@ public function filterByLastFetched($lastFetched = null, $comparison = null)
* $query->filterByCreated(array('max' => 'yesterday')); // WHERE created > '2011-03-13'
*
*
- * @param mixed $created The value to use as filter.
+ * @param mixed $created The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByCreated($created = null, $comparison = null)
+ public function filterByCreated($created = null, ?string $comparison = null)
{
if (is_array($created)) {
$useMinMax = false;
@@ -599,7 +636,9 @@ public function filterByCreated($created = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_CREATED, $created, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_CREATED, $created, $comparison);
+
+ return $this;
}
/**
@@ -612,17 +651,17 @@ public function filterByCreated($created = null, $comparison = null)
* $query->filterByUpdated(array('max' => 'yesterday')); // WHERE updated > '2011-03-13'
*
*
- * @param mixed $updated The value to use as filter.
+ * @param mixed $updated The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUpdated($updated = null, $comparison = null)
+ public function filterByUpdated($updated = null, ?string $comparison = null)
{
if (is_array($updated)) {
$useMinMax = false;
@@ -642,20 +681,22 @@ public function filterByUpdated($updated = null, $comparison = null)
}
}
- return $this->addUsingAlias(CalendarTokenTableMap::COL_UPDATED, $updated, $comparison);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_UPDATED, $updated, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\User object
*
* @param \TechWilk\Rota\User|ObjectCollection $user The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUser($user, $comparison = null)
+ public function filterByUser($user, ?string $comparison = null)
{
if ($user instanceof \TechWilk\Rota\User) {
return $this
@@ -665,8 +706,10 @@ public function filterByUser($user, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(CalendarTokenTableMap::COL_USERID, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByUser() only accepts arguments of type \TechWilk\Rota\User or Collection');
}
@@ -675,12 +718,12 @@ public function filterByUser($user, $comparison = null)
/**
* Adds a JOIN clause to the query using the User relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinUser(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('User');
@@ -709,9 +752,9 @@ public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\UserQuery A secondary query class using the current class as primary query
*/
@@ -722,12 +765,108 @@ public function useUserQuery($relationAlias = null, $joinType = Criteria::INNER_
->useQuery($relationAlias ? $relationAlias : 'User', '\TechWilk\Rota\UserQuery');
}
+ /**
+ * Use the User relation User object
+ *
+ * @param callable(\TechWilk\Rota\UserQuery):\TechWilk\Rota\UserQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withUserQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useUserQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to User table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the EXISTS statement
+ */
+ public function useUserExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT EXISTS query.
+ *
+ * @see useUserExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useUserNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the IN statement
+ */
+ public function useInUserQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT IN query.
+ *
+ * @see useUserInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInUserQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildCalendarToken $calendarToken Object to remove from the list of results
+ * @param ChildCalendarToken $calendarToken Object to remove from the list of results
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($calendarToken = null)
{
@@ -744,7 +883,7 @@ public function prune($calendarToken = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(CalendarTokenTableMap::DATABASE_NAME);
@@ -769,12 +908,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(CalendarTokenTableMap::DATABASE_NAME);
@@ -804,64 +943,77 @@ public function delete(ConnectionInterface $con = null)
/**
* Filter by the latest updated
*
- * @param int $nbDays Maximum age of the latest update in days
+ * @param int $nbDays Maximum age of the latest update in days
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
- return $this->addUsingAlias(CalendarTokenTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by update date desc
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
- return $this->addDescendingOrderByColumn(CalendarTokenTableMap::COL_UPDATED);
+ $this->addDescendingOrderByColumn(CalendarTokenTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by update date asc
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
- return $this->addAscendingOrderByColumn(CalendarTokenTableMap::COL_UPDATED);
+ $this->addAscendingOrderByColumn(CalendarTokenTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by create date desc
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastCreatedFirst()
{
- return $this->addDescendingOrderByColumn(CalendarTokenTableMap::COL_CREATED);
+ $this->addDescendingOrderByColumn(CalendarTokenTableMap::COL_CREATED);
+
+ return $this;
}
/**
* Filter by the latest created
*
- * @param int $nbDays Maximum age of in days
+ * @param int $nbDays Maximum age of in days
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
- return $this->addUsingAlias(CalendarTokenTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(CalendarTokenTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by create date asc
*
- * @return $this|ChildCalendarTokenQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstCreatedFirst()
{
- return $this->addAscendingOrderByColumn(CalendarTokenTableMap::COL_CREATED);
+ $this->addAscendingOrderByColumn(CalendarTokenTableMap::COL_CREATED);
+
+ return $this;
}
-} // CalendarTokenQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/Comment.php b/generated-classes/TechWilk/Rota/Base/Comment.php
index cbec3a4b..332cef62 100644
--- a/generated-classes/TechWilk/Rota/Base/Comment.php
+++ b/generated-classes/TechWilk/Rota/Base/Comment.php
@@ -17,7 +17,6 @@
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Parser\AbstractParser;
use Propel\Runtime\Util\PropelDateTime;
-use TechWilk\Rota\Comment as ChildComment;
use TechWilk\Rota\CommentQuery as ChildCommentQuery;
use TechWilk\Rota\Event as ChildEvent;
use TechWilk\Rota\EventQuery as ChildEventQuery;
@@ -36,19 +35,21 @@ abstract class Comment implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\CommentTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\CommentTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -57,14 +58,14 @@ abstract class Comment implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -92,7 +93,7 @@ abstract class Comment implements ActiveRecordInterface
/**
* The value for the text field.
*
- * @var string
+ * @var string|null
*/
protected $text;
@@ -100,21 +101,21 @@ abstract class Comment implements ActiveRecordInterface
* The value for the removed field.
*
* Note: this column has a database default value of: false
- * @var boolean
+ * @var boolean|null
*/
protected $removed;
/**
* The value for the created field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $created;
/**
* The value for the updated field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $updated;
@@ -132,7 +133,7 @@ abstract class Comment implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
@@ -142,7 +143,7 @@ abstract class Comment implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->eventid = 0;
$this->userid = 0;
@@ -161,9 +162,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -171,10 +172,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -183,7 +184,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -193,9 +194,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -204,45 +205,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -251,10 +250,10 @@ public function resetModified($col = null)
* obj is an instance of Comment, delegates to
* equals(Comment). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -276,7 +275,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -284,10 +283,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -295,15 +294,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -312,12 +311,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|Comment The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -327,13 +326,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -344,24 +343,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -369,7 +371,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -409,7 +411,7 @@ public function getUserId()
/**
* Get the [text] column value.
*
- * @return string
+ * @return string|null
*/
public function getText()
{
@@ -419,7 +421,7 @@ public function getText()
/**
* Get the [removed] column value.
*
- * @return boolean
+ * @return boolean|null
*/
public function getRemoved()
{
@@ -429,7 +431,7 @@ public function getRemoved()
/**
* Get the [removed] column value.
*
- * @return boolean
+ * @return boolean|null
*/
public function isRemoved()
{
@@ -440,12 +442,14 @@ public function isRemoved()
* Get the [optionally formatted] temporal [created] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getCreated($format = null)
{
@@ -460,12 +464,14 @@ public function getCreated($format = null)
* Get the [optionally formatted] temporal [updated] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getUpdated($format = null)
{
@@ -479,8 +485,8 @@ public function getUpdated($format = null)
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -494,13 +500,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [eventid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventId($v)
{
@@ -518,13 +524,13 @@ public function setEventId($v)
}
return $this;
- } // setEventId()
+ }
/**
* Set the value of [userid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setUserId($v)
{
@@ -542,13 +548,13 @@ public function setUserId($v)
}
return $this;
- } // setUserId()
+ }
/**
* Set the value of [text] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setText($v)
{
@@ -562,7 +568,7 @@ public function setText($v)
}
return $this;
- } // setText()
+ }
/**
* Sets the value of the [removed] column.
@@ -571,8 +577,8 @@ public function setText($v)
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
- * @param boolean|integer|string $v The new value
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @param bool|integer|string|null $v The new value
+ * @return $this The current object (for fluent API support)
*/
public function setRemoved($v)
{
@@ -590,14 +596,14 @@ public function setRemoved($v)
}
return $this;
- } // setRemoved()
+ }
/**
* Sets the value of [created] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setCreated($v)
{
@@ -610,14 +616,14 @@ public function setCreated($v)
} // if either are not null
return $this;
- } // setCreated()
+ }
/**
* Sets the value of [updated] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setUpdated($v)
{
@@ -630,7 +636,7 @@ public function setUpdated($v)
} // if either are not null
return $this;
- } // setUpdated()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -638,25 +644,25 @@ public function setUpdated($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->eventid !== 0) {
- return false;
- }
+ if ($this->eventid !== 0) {
+ return false;
+ }
- if ($this->userid !== 0) {
- return false;
- }
+ if ($this->userid !== 0) {
+ return false;
+ }
- if ($this->removed !== false) {
- return false;
- }
+ if ($this->removed !== false) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -666,19 +672,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CommentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -705,8 +712,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = null;
}
$this->updated = (null !== $col) ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -714,6 +721,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 7; // 7 = CommentTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\Comment'), 0, $e);
}
@@ -730,9 +738,10 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aEvent !== null && $this->eventid !== $this->aEvent->getId()) {
$this->aEvent = null;
@@ -740,19 +749,19 @@ public function ensureConsistency()
if ($this->aUser !== null && $this->userid !== $this->aUser->getId()) {
$this->aUser = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -787,13 +796,13 @@ public function reload($deep = false, ConnectionInterface $con = null)
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see Comment::setDeleted()
* @see Comment::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -823,12 +832,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -848,12 +857,13 @@ public function save(ConnectionInterface $con = null)
if ($isInsert) {
$ret = $ret && $this->preInsert($con);
// timestampable behavior
-
+ $time = time();
+ $highPrecision = \Propel\Runtime\Util\PropelDateTime::createHighPrecision();
if (!$this->isColumnModified(CommentTableMap::COL_CREATED)) {
- $this->setCreated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setCreated($highPrecision);
}
if (!$this->isColumnModified(CommentTableMap::COL_UPDATED)) {
- $this->setUpdated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setUpdated($highPrecision);
}
} else {
$ret = $ret && $this->preUpdate($con);
@@ -885,12 +895,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -927,22 +937,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[CommentTableMap::COL_ID] = true;
@@ -985,24 +996,31 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'eventId':
$stmt->bindValue($identifier, $this->eventid, PDO::PARAM_INT);
+
break;
case 'userId':
$stmt->bindValue($identifier, $this->userid, PDO::PARAM_INT);
+
break;
case 'text':
$stmt->bindValue($identifier, $this->text, PDO::PARAM_STR);
+
break;
case 'removed':
$stmt->bindValue($identifier, (int) $this->removed, PDO::PARAM_INT);
+
break;
case 'created':
$stmt->bindValue($identifier, $this->created ? $this->created->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'updated':
$stmt->bindValue($identifier, $this->updated ? $this->updated->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
}
}
@@ -1025,12 +1043,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -1041,14 +1059,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = CommentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -1060,36 +1078,35 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getEventId();
- break;
+
case 2:
return $this->getUserId();
- break;
+
case 3:
return $this->getText();
- break;
+
case 4:
return $this->getRemoved();
- break;
+
case 5:
return $this->getCreated();
- break;
+
case 6:
return $this->getUpdated();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -1099,23 +1116,23 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['Comment'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['Comment'][$this->hashCode()] = true;
$keys = CommentTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getEventId(),
$keys[2] => $this->getUserId(),
@@ -1123,13 +1140,13 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$keys[4] => $this->getRemoved(),
$keys[5] => $this->getCreated(),
$keys[6] => $this->getUpdated(),
- );
+ ];
if ($result[$keys[5]] instanceof \DateTimeInterface) {
- $result[$keys[5]] = $result[$keys[5]]->format('c');
+ $result[$keys[5]] = $result[$keys[5]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[6]] instanceof \DateTimeInterface) {
- $result[$keys[6]] = $result[$keys[6]]->format('c');
+ $result[$keys[6]] = $result[$keys[6]]->format('Y-m-d H:i:s.u');
}
$virtualColumns = $this->virtualColumns;
@@ -1139,6 +1156,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aEvent) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'event';
@@ -1150,9 +1168,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'Event';
}
- $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aUser) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'user';
@@ -1164,7 +1183,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'User';
}
- $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
}
@@ -1174,30 +1193,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\Comment
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = CommentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\Comment
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1239,11 +1260,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = CommentTableMap::getFieldNames($keyType);
@@ -1268,6 +1289,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[6], $arr)) {
$this->setUpdated($arr[$keys[6]]);
}
+
+ return $this;
}
/**
@@ -1287,9 +1310,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\Comment The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1303,9 +1326,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(CommentTableMap::DATABASE_NAME);
@@ -1338,13 +1361,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildCommentQuery::create();
$criteria->add(CommentTableMap::COL_ID, $this->id);
@@ -1356,7 +1379,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1386,19 +1409,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1409,12 +1433,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\Comment (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\Comment (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setEventId($this->getEventId());
$copyObj->setUserId($this->getUserId());
@@ -1424,7 +1449,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setUpdated($this->getUpdated());
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1436,11 +1461,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\Comment Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1453,9 +1478,9 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildEvent object.
*
- * @param ChildEvent $v
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEvent $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEvent(ChildEvent $v = null)
{
@@ -1481,11 +1506,11 @@ public function setEvent(ChildEvent $v = null)
/**
* Get the associated ChildEvent object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildEvent The associated ChildEvent object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvent(ConnectionInterface $con = null)
+ public function getEvent(?ConnectionInterface $con = null)
{
if ($this->aEvent === null && ($this->eventid != 0)) {
$this->aEvent = ChildEventQuery::create()->findPk($this->eventid, $con);
@@ -1504,9 +1529,9 @@ public function getEvent(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildUser object.
*
- * @param ChildUser $v
- * @return $this|\TechWilk\Rota\Comment The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildUser $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setUser(ChildUser $v = null)
{
@@ -1532,11 +1557,11 @@ public function setUser(ChildUser $v = null)
/**
* Get the associated ChildUser object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildUser The associated ChildUser object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getUser(ConnectionInterface $con = null)
+ public function getUser(?ConnectionInterface $con = null)
{
if ($this->aUser === null && ($this->userid != 0)) {
$this->aUser = ChildUserQuery::create()->findPk($this->userid, $con);
@@ -1556,6 +1581,8 @@ public function getUser(ConnectionInterface $con = null)
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1578,6 +1605,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1586,15 +1615,17 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
} // if ($deep)
$this->aEvent = null;
$this->aUser = null;
+ return $this;
}
/**
@@ -1612,7 +1643,7 @@ public function __toString()
/**
* Mark the current object so that the update date doesn't get updated during next save
*
- * @return $this|ChildComment The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
@@ -1623,99 +1654,79 @@ public function keepUpdateDateUnchanged()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1725,7 +1736,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1745,17 +1756,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/CommentQuery.php b/generated-classes/TechWilk/Rota/Base/CommentQuery.php
index 56f45965..d329c284 100644
--- a/generated-classes/TechWilk/Rota/Base/CommentQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/CommentQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\CommentTableMap;
/**
- * Base class that represents a query for the 'comments' table.
- *
- *
+ * Base class that represents a query for the `comments` table.
*
* @method ChildCommentQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCommentQuery orderByEventId($order = Criteria::ASC) Order by the eventId column
@@ -66,19 +65,19 @@
*
* @method \TechWilk\Rota\EventQuery|\TechWilk\Rota\UserQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildComment findOne(ConnectionInterface $con = null) Return the first ChildComment matching the query
- * @method ChildComment findOneOrCreate(ConnectionInterface $con = null) Return the first ChildComment matching the query, or a new ChildComment object populated from the query conditions when no match is found
+ * @method ChildComment|null findOne(?ConnectionInterface $con = null) Return the first ChildComment matching the query
+ * @method ChildComment findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildComment matching the query, or a new ChildComment object populated from the query conditions when no match is found
+ *
+ * @method ChildComment|null findOneById(int $id) Return the first ChildComment filtered by the id column
+ * @method ChildComment|null findOneByEventId(int $eventId) Return the first ChildComment filtered by the eventId column
+ * @method ChildComment|null findOneByUserId(int $userId) Return the first ChildComment filtered by the userId column
+ * @method ChildComment|null findOneByText(string $text) Return the first ChildComment filtered by the text column
+ * @method ChildComment|null findOneByRemoved(boolean $removed) Return the first ChildComment filtered by the removed column
+ * @method ChildComment|null findOneByCreated(string $created) Return the first ChildComment filtered by the created column
+ * @method ChildComment|null findOneByUpdated(string $updated) Return the first ChildComment filtered by the updated column
*
- * @method ChildComment findOneById(int $id) Return the first ChildComment filtered by the id column
- * @method ChildComment findOneByEventId(int $eventId) Return the first ChildComment filtered by the eventId column
- * @method ChildComment findOneByUserId(int $userId) Return the first ChildComment filtered by the userId column
- * @method ChildComment findOneByText(string $text) Return the first ChildComment filtered by the text column
- * @method ChildComment findOneByRemoved(boolean $removed) Return the first ChildComment filtered by the removed column
- * @method ChildComment findOneByCreated(string $created) Return the first ChildComment filtered by the created column
- * @method ChildComment findOneByUpdated(string $updated) Return the first ChildComment filtered by the updated column *
-
- * @method ChildComment requirePk($key, ConnectionInterface $con = null) Return the ChildComment by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildComment requireOne(ConnectionInterface $con = null) Return the first ChildComment matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildComment requirePk($key, ?ConnectionInterface $con = null) Return the ChildComment by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildComment requireOne(?ConnectionInterface $con = null) Return the first ChildComment matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildComment requireOneById(int $id) Return the first ChildComment filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildComment requireOneByEventId(int $eventId) Return the first ChildComment filtered by the eventId column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -88,16 +87,26 @@
* @method ChildComment requireOneByCreated(string $created) Return the first ChildComment filtered by the created column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildComment requireOneByUpdated(string $updated) Return the first ChildComment filtered by the updated column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildComment[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildComment objects based on current ModelCriteria
- * @method ChildComment[]|ObjectCollection findById(int $id) Return ChildComment objects filtered by the id column
- * @method ChildComment[]|ObjectCollection findByEventId(int $eventId) Return ChildComment objects filtered by the eventId column
- * @method ChildComment[]|ObjectCollection findByUserId(int $userId) Return ChildComment objects filtered by the userId column
- * @method ChildComment[]|ObjectCollection findByText(string $text) Return ChildComment objects filtered by the text column
- * @method ChildComment[]|ObjectCollection findByRemoved(boolean $removed) Return ChildComment objects filtered by the removed column
- * @method ChildComment[]|ObjectCollection findByCreated(string $created) Return ChildComment objects filtered by the created column
- * @method ChildComment[]|ObjectCollection findByUpdated(string $updated) Return ChildComment objects filtered by the updated column
- * @method ChildComment[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildComment[]|Collection find(?ConnectionInterface $con = null) Return ChildComment objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildComment objects based on current ModelCriteria
*
+ * @method ChildComment[]|Collection findById(int|array $id) Return ChildComment objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildComment objects filtered by the id column
+ * @method ChildComment[]|Collection findByEventId(int|array $eventId) Return ChildComment objects filtered by the eventId column
+ * @psalm-method Collection&\Traversable findByEventId(int|array $eventId) Return ChildComment objects filtered by the eventId column
+ * @method ChildComment[]|Collection findByUserId(int|array $userId) Return ChildComment objects filtered by the userId column
+ * @psalm-method Collection&\Traversable findByUserId(int|array $userId) Return ChildComment objects filtered by the userId column
+ * @method ChildComment[]|Collection findByText(string|array $text) Return ChildComment objects filtered by the text column
+ * @psalm-method Collection&\Traversable findByText(string|array $text) Return ChildComment objects filtered by the text column
+ * @method ChildComment[]|Collection findByRemoved(boolean|array $removed) Return ChildComment objects filtered by the removed column
+ * @psalm-method Collection&\Traversable findByRemoved(boolean|array $removed) Return ChildComment objects filtered by the removed column
+ * @method ChildComment[]|Collection findByCreated(string|array $created) Return ChildComment objects filtered by the created column
+ * @psalm-method Collection&\Traversable findByCreated(string|array $created) Return ChildComment objects filtered by the created column
+ * @method ChildComment[]|Collection findByUpdated(string|array $updated) Return ChildComment objects filtered by the updated column
+ * @psalm-method Collection&\Traversable findByUpdated(string|array $updated) Return ChildComment objects filtered by the updated column
+ *
+ * @method ChildComment[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class CommentQuery extends ModelCriteria
{
@@ -106,9 +115,9 @@ abstract class CommentQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\CommentQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\Comment', $modelAlias = null)
{
@@ -118,12 +127,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildCommentQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildCommentQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildCommentQuery) {
return $criteria;
@@ -153,7 +162,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildComment|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -185,8 +194,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -218,8 +227,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildComment|array|mixed the result, formatted by the current formatter
*/
@@ -239,12 +248,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -261,25 +270,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(CommentTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(CommentTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(CommentTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(CommentTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -292,15 +307,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -320,7 +335,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -335,15 +352,15 @@ public function filterById($id = null, $comparison = null)
*
* @see filterByEvent()
*
- * @param mixed $eventId The value to use as filter.
+ * @param mixed $eventId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventId($eventId = null, $comparison = null)
+ public function filterByEventId($eventId = null, ?string $comparison = null)
{
if (is_array($eventId)) {
$useMinMax = false;
@@ -363,7 +380,9 @@ public function filterByEventId($eventId = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_EVENTID, $eventId, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_EVENTID, $eventId, $comparison);
+
+ return $this;
}
/**
@@ -378,15 +397,15 @@ public function filterByEventId($eventId = null, $comparison = null)
*
* @see filterByUser()
*
- * @param mixed $userId The value to use as filter.
+ * @param mixed $userId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUserId($userId = null, $comparison = null)
+ public function filterByUserId($userId = null, ?string $comparison = null)
{
if (is_array($userId)) {
$useMinMax = false;
@@ -406,7 +425,9 @@ public function filterByUserId($userId = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_USERID, $userId, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_USERID, $userId, $comparison);
+
+ return $this;
}
/**
@@ -416,14 +437,15 @@ public function filterByUserId($userId = null, $comparison = null)
*
* $query->filterByText('fooValue'); // WHERE text = 'fooValue'
* $query->filterByText('%fooValue%', Criteria::LIKE); // WHERE text LIKE '%fooValue%'
+ * $query->filterByText(['foo', 'bar']); // WHERE text IN ('foo', 'bar')
*
*
- * @param string $text The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $text The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByText($text = null, $comparison = null)
+ public function filterByText($text = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($text)) {
@@ -431,7 +453,9 @@ public function filterByText($text = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_TEXT, $text, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_TEXT, $text, $comparison);
+
+ return $this;
}
/**
@@ -443,22 +467,24 @@ public function filterByText($text = null, $comparison = null)
* $query->filterByRemoved('yes'); // WHERE removed = true
*
*
- * @param boolean|string $removed The value to use as filter.
+ * @param bool|string $removed The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRemoved($removed = null, $comparison = null)
+ public function filterByRemoved($removed = null, ?string $comparison = null)
{
if (is_string($removed)) {
- $removed = in_array(strtolower($removed), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
+ $removed = in_array(strtolower($removed), array('false', 'off', '-', 'no', 'n', '0', ''), true) ? false : true;
}
- return $this->addUsingAlias(CommentTableMap::COL_REMOVED, $removed, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_REMOVED, $removed, $comparison);
+
+ return $this;
}
/**
@@ -471,17 +497,17 @@ public function filterByRemoved($removed = null, $comparison = null)
* $query->filterByCreated(array('max' => 'yesterday')); // WHERE created > '2011-03-13'
*
*
- * @param mixed $created The value to use as filter.
+ * @param mixed $created The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByCreated($created = null, $comparison = null)
+ public function filterByCreated($created = null, ?string $comparison = null)
{
if (is_array($created)) {
$useMinMax = false;
@@ -501,7 +527,9 @@ public function filterByCreated($created = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_CREATED, $created, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_CREATED, $created, $comparison);
+
+ return $this;
}
/**
@@ -514,17 +542,17 @@ public function filterByCreated($created = null, $comparison = null)
* $query->filterByUpdated(array('max' => 'yesterday')); // WHERE updated > '2011-03-13'
*
*
- * @param mixed $updated The value to use as filter.
+ * @param mixed $updated The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUpdated($updated = null, $comparison = null)
+ public function filterByUpdated($updated = null, ?string $comparison = null)
{
if (is_array($updated)) {
$useMinMax = false;
@@ -544,20 +572,22 @@ public function filterByUpdated($updated = null, $comparison = null)
}
}
- return $this->addUsingAlias(CommentTableMap::COL_UPDATED, $updated, $comparison);
+ $this->addUsingAlias(CommentTableMap::COL_UPDATED, $updated, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\Event object
*
* @param \TechWilk\Rota\Event|ObjectCollection $event The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEvent($event, $comparison = null)
+ public function filterByEvent($event, ?string $comparison = null)
{
if ($event instanceof \TechWilk\Rota\Event) {
return $this
@@ -567,8 +597,10 @@ public function filterByEvent($event, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(CommentTableMap::COL_EVENTID, $event->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEvent() only accepts arguments of type \TechWilk\Rota\Event or Collection');
}
@@ -577,12 +609,12 @@ public function filterByEvent($event, $comparison = null)
/**
* Adds a JOIN clause to the query using the Event relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEvent(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Event');
@@ -611,9 +643,9 @@ public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOI
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventQuery A secondary query class using the current class as primary query
*/
@@ -624,17 +656,113 @@ public function useEventQuery($relationAlias = null, $joinType = Criteria::INNER
->useQuery($relationAlias ? $relationAlias : 'Event', '\TechWilk\Rota\EventQuery');
}
+ /**
+ * Use the Event relation Event object
+ *
+ * @param callable(\TechWilk\Rota\EventQuery):\TechWilk\Rota\EventQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Event table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the EXISTS statement
+ */
+ public function useEventExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT EXISTS query.
+ *
+ * @see useEventExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the IN statement
+ */
+ public function useInEventQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT IN query.
+ *
+ * @see useEventInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\User object
*
* @param \TechWilk\Rota\User|ObjectCollection $user The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUser($user, $comparison = null)
+ public function filterByUser($user, ?string $comparison = null)
{
if ($user instanceof \TechWilk\Rota\User) {
return $this
@@ -644,8 +772,10 @@ public function filterByUser($user, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(CommentTableMap::COL_USERID, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByUser() only accepts arguments of type \TechWilk\Rota\User or Collection');
}
@@ -654,12 +784,12 @@ public function filterByUser($user, $comparison = null)
/**
* Adds a JOIN clause to the query using the User relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinUser(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('User');
@@ -688,9 +818,9 @@ public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\UserQuery A secondary query class using the current class as primary query
*/
@@ -701,12 +831,108 @@ public function useUserQuery($relationAlias = null, $joinType = Criteria::INNER_
->useQuery($relationAlias ? $relationAlias : 'User', '\TechWilk\Rota\UserQuery');
}
+ /**
+ * Use the User relation User object
+ *
+ * @param callable(\TechWilk\Rota\UserQuery):\TechWilk\Rota\UserQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withUserQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useUserQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to User table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the EXISTS statement
+ */
+ public function useUserExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT EXISTS query.
+ *
+ * @see useUserExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useUserNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the IN statement
+ */
+ public function useInUserQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT IN query.
+ *
+ * @see useUserInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInUserQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildComment $comment Object to remove from the list of results
+ * @param ChildComment $comment Object to remove from the list of results
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($comment = null)
{
@@ -723,7 +949,7 @@ public function prune($comment = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(CommentTableMap::DATABASE_NAME);
@@ -748,12 +974,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(CommentTableMap::DATABASE_NAME);
@@ -783,64 +1009,77 @@ public function delete(ConnectionInterface $con = null)
/**
* Filter by the latest updated
*
- * @param int $nbDays Maximum age of the latest update in days
+ * @param int $nbDays Maximum age of the latest update in days
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
- return $this->addUsingAlias(CommentTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(CommentTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by update date desc
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
- return $this->addDescendingOrderByColumn(CommentTableMap::COL_UPDATED);
+ $this->addDescendingOrderByColumn(CommentTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by update date asc
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
- return $this->addAscendingOrderByColumn(CommentTableMap::COL_UPDATED);
+ $this->addAscendingOrderByColumn(CommentTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by create date desc
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastCreatedFirst()
{
- return $this->addDescendingOrderByColumn(CommentTableMap::COL_CREATED);
+ $this->addDescendingOrderByColumn(CommentTableMap::COL_CREATED);
+
+ return $this;
}
/**
* Filter by the latest created
*
- * @param int $nbDays Maximum age of in days
+ * @param int $nbDays Maximum age of in days
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
- return $this->addUsingAlias(CommentTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(CommentTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by create date asc
*
- * @return $this|ChildCommentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstCreatedFirst()
{
- return $this->addAscendingOrderByColumn(CommentTableMap::COL_CREATED);
+ $this->addAscendingOrderByColumn(CommentTableMap::COL_CREATED);
+
+ return $this;
}
-} // CommentQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/Document.php b/generated-classes/TechWilk/Rota/Base/Document.php
index d8773379..d963c172 100644
--- a/generated-classes/TechWilk/Rota/Base/Document.php
+++ b/generated-classes/TechWilk/Rota/Base/Document.php
@@ -29,19 +29,21 @@ abstract class Document implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\DocumentTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\DocumentTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -50,14 +52,14 @@ abstract class Document implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -100,7 +102,7 @@ abstract class Document implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
@@ -110,7 +112,7 @@ abstract class Document implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->title = '';
$this->url = '';
@@ -128,9 +130,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -138,10 +140,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -150,7 +152,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -160,9 +162,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -171,45 +173,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -218,10 +218,10 @@ public function resetModified($col = null)
* obj is an instance of Document, delegates to
* equals(Document). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -243,7 +243,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -251,10 +251,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -262,15 +262,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -279,12 +279,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|Document The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -294,13 +294,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -311,24 +311,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -336,7 +339,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -396,8 +399,8 @@ public function getLink()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Document The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -411,13 +414,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [title] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Document The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setTitle($v)
{
@@ -431,13 +434,13 @@ public function setTitle($v)
}
return $this;
- } // setTitle()
+ }
/**
* Set the value of [description] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Document The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDescription($v)
{
@@ -451,13 +454,13 @@ public function setDescription($v)
}
return $this;
- } // setDescription()
+ }
/**
* Set the value of [url] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Document The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setUrl($v)
{
@@ -471,13 +474,13 @@ public function setUrl($v)
}
return $this;
- } // setUrl()
+ }
/**
* Set the value of [link] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Document The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setLink($v)
{
@@ -491,7 +494,7 @@ public function setLink($v)
}
return $this;
- } // setLink()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -499,21 +502,21 @@ public function setLink($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->title !== '') {
- return false;
- }
+ if ($this->title !== '') {
+ return false;
+ }
- if ($this->url !== '') {
- return false;
- }
+ if ($this->url !== '') {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -523,19 +526,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : DocumentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -550,8 +554,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : DocumentTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)];
$this->link = (null !== $col) ? (string) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -559,6 +563,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 5; // 5 = DocumentTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\Document'), 0, $e);
}
@@ -575,23 +580,24 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -617,19 +623,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
$this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate
if ($deep) { // also de-associate any related objects?
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see Document::setDeleted()
* @see Document::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -659,12 +666,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -709,12 +716,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -732,22 +739,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[DocumentTableMap::COL_ID] = true;
@@ -784,18 +792,23 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'title':
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
+
break;
case 'description':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+
break;
case 'url':
$stmt->bindValue($identifier, $this->url, PDO::PARAM_STR);
+
break;
case 'link':
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
+
break;
}
}
@@ -818,12 +831,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -834,14 +847,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = DocumentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -853,30 +866,29 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getTitle();
- break;
+
case 2:
return $this->getDescription();
- break;
+
case 3:
return $this->getUrl();
- break;
+
case 4:
return $this->getLink();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -886,28 +898,28 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = []): array
{
if (isset($alreadyDumpedObjects['Document'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['Document'][$this->hashCode()] = true;
$keys = DocumentTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getTitle(),
$keys[2] => $this->getDescription(),
$keys[3] => $this->getUrl(),
$keys[4] => $this->getLink(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -920,30 +932,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\Document
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = DocumentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\Document
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -979,11 +993,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = DocumentTableMap::getFieldNames($keyType);
@@ -1002,6 +1016,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[4], $arr)) {
$this->setLink($arr[$keys[4]]);
}
+
+ return $this;
}
/**
@@ -1021,9 +1037,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\Document The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1037,9 +1053,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(DocumentTableMap::DATABASE_NAME);
@@ -1066,13 +1082,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildDocumentQuery::create();
$criteria->add(DocumentTableMap::COL_ID, $this->id);
@@ -1084,7 +1100,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1114,19 +1130,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1137,12 +1154,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\Document (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\Document (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setTitle($this->getTitle());
$copyObj->setDescription($this->getDescription());
@@ -1150,7 +1168,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setLink($this->getLink());
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1162,11 +1180,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\Document Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1180,6 +1198,8 @@ public function copy($deepCopy = false)
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1194,6 +1214,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1202,12 +1224,15 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
} // if ($deep)
+
+ return $this;
}
/**
@@ -1222,99 +1247,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1324,7 +1329,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1344,17 +1349,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/DocumentQuery.php b/generated-classes/TechWilk/Rota/Base/DocumentQuery.php
index 66eca781..57073644 100644
--- a/generated-classes/TechWilk/Rota/Base/DocumentQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/DocumentQuery.php
@@ -7,7 +7,7 @@
use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
-use Propel\Runtime\Collection\ObjectCollection;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
use TechWilk\Rota\Document as ChildDocument;
@@ -15,9 +15,7 @@
use TechWilk\Rota\Map\DocumentTableMap;
/**
- * Base class that represents a query for the 'documents' table.
- *
- *
+ * Base class that represents a query for the `documents` table.
*
* @method ChildDocumentQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildDocumentQuery orderByTitle($order = Criteria::ASC) Order by the title column
@@ -39,17 +37,17 @@
* @method ChildDocumentQuery rightJoinWith($relation) Adds a RIGHT JOIN clause and with to the query
* @method ChildDocumentQuery innerJoinWith($relation) Adds a INNER JOIN clause and with to the query
*
- * @method ChildDocument findOne(ConnectionInterface $con = null) Return the first ChildDocument matching the query
- * @method ChildDocument findOneOrCreate(ConnectionInterface $con = null) Return the first ChildDocument matching the query, or a new ChildDocument object populated from the query conditions when no match is found
+ * @method ChildDocument|null findOne(?ConnectionInterface $con = null) Return the first ChildDocument matching the query
+ * @method ChildDocument findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildDocument matching the query, or a new ChildDocument object populated from the query conditions when no match is found
*
- * @method ChildDocument findOneById(int $id) Return the first ChildDocument filtered by the id column
- * @method ChildDocument findOneByTitle(string $title) Return the first ChildDocument filtered by the title column
- * @method ChildDocument findOneByDescription(string $description) Return the first ChildDocument filtered by the description column
- * @method ChildDocument findOneByUrl(string $url) Return the first ChildDocument filtered by the url column
- * @method ChildDocument findOneByLink(string $link) Return the first ChildDocument filtered by the link column *
-
- * @method ChildDocument requirePk($key, ConnectionInterface $con = null) Return the ChildDocument by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildDocument requireOne(ConnectionInterface $con = null) Return the first ChildDocument matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildDocument|null findOneById(int $id) Return the first ChildDocument filtered by the id column
+ * @method ChildDocument|null findOneByTitle(string $title) Return the first ChildDocument filtered by the title column
+ * @method ChildDocument|null findOneByDescription(string $description) Return the first ChildDocument filtered by the description column
+ * @method ChildDocument|null findOneByUrl(string $url) Return the first ChildDocument filtered by the url column
+ * @method ChildDocument|null findOneByLink(string $link) Return the first ChildDocument filtered by the link column
+ *
+ * @method ChildDocument requirePk($key, ?ConnectionInterface $con = null) Return the ChildDocument by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildDocument requireOne(?ConnectionInterface $con = null) Return the first ChildDocument matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildDocument requireOneById(int $id) Return the first ChildDocument filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildDocument requireOneByTitle(string $title) Return the first ChildDocument filtered by the title column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -57,14 +55,22 @@
* @method ChildDocument requireOneByUrl(string $url) Return the first ChildDocument filtered by the url column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildDocument requireOneByLink(string $link) Return the first ChildDocument filtered by the link column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildDocument[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildDocument objects based on current ModelCriteria
- * @method ChildDocument[]|ObjectCollection findById(int $id) Return ChildDocument objects filtered by the id column
- * @method ChildDocument[]|ObjectCollection findByTitle(string $title) Return ChildDocument objects filtered by the title column
- * @method ChildDocument[]|ObjectCollection findByDescription(string $description) Return ChildDocument objects filtered by the description column
- * @method ChildDocument[]|ObjectCollection findByUrl(string $url) Return ChildDocument objects filtered by the url column
- * @method ChildDocument[]|ObjectCollection findByLink(string $link) Return ChildDocument objects filtered by the link column
- * @method ChildDocument[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildDocument[]|Collection find(?ConnectionInterface $con = null) Return ChildDocument objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildDocument objects based on current ModelCriteria
+ *
+ * @method ChildDocument[]|Collection findById(int|array $id) Return ChildDocument objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildDocument objects filtered by the id column
+ * @method ChildDocument[]|Collection findByTitle(string|array $title) Return ChildDocument objects filtered by the title column
+ * @psalm-method Collection&\Traversable findByTitle(string|array $title) Return ChildDocument objects filtered by the title column
+ * @method ChildDocument[]|Collection findByDescription(string|array $description) Return ChildDocument objects filtered by the description column
+ * @psalm-method Collection&\Traversable findByDescription(string|array $description) Return ChildDocument objects filtered by the description column
+ * @method ChildDocument[]|Collection findByUrl(string|array $url) Return ChildDocument objects filtered by the url column
+ * @psalm-method Collection&\Traversable findByUrl(string|array $url) Return ChildDocument objects filtered by the url column
+ * @method ChildDocument[]|Collection findByLink(string|array $link) Return ChildDocument objects filtered by the link column
+ * @psalm-method Collection&\Traversable findByLink(string|array $link) Return ChildDocument objects filtered by the link column
*
+ * @method ChildDocument[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class DocumentQuery extends ModelCriteria
{
@@ -73,9 +79,9 @@ abstract class DocumentQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\DocumentQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\Document', $modelAlias = null)
{
@@ -85,12 +91,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildDocumentQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildDocumentQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildDocumentQuery) {
return $criteria;
@@ -120,7 +126,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildDocument|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -152,8 +158,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -185,8 +191,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildDocument|array|mixed the result, formatted by the current formatter
*/
@@ -206,12 +212,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -228,25 +234,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(DocumentTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(DocumentTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(DocumentTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(DocumentTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -259,15 +271,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -287,7 +299,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(DocumentTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(DocumentTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -297,14 +311,15 @@ public function filterById($id = null, $comparison = null)
*
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%', Criteria::LIKE); // WHERE title LIKE '%fooValue%'
+ * $query->filterByTitle(['foo', 'bar']); // WHERE title IN ('foo', 'bar')
*
*
- * @param string $title The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $title The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByTitle($title = null, $comparison = null)
+ public function filterByTitle($title = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
@@ -312,7 +327,9 @@ public function filterByTitle($title = null, $comparison = null)
}
}
- return $this->addUsingAlias(DocumentTableMap::COL_TITLE, $title, $comparison);
+ $this->addUsingAlias(DocumentTableMap::COL_TITLE, $title, $comparison);
+
+ return $this;
}
/**
@@ -322,14 +339,15 @@ public function filterByTitle($title = null, $comparison = null)
*
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%', Criteria::LIKE); // WHERE description LIKE '%fooValue%'
+ * $query->filterByDescription(['foo', 'bar']); // WHERE description IN ('foo', 'bar')
*
*
- * @param string $description The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $description The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByDescription($description = null, $comparison = null)
+ public function filterByDescription($description = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
@@ -337,7 +355,9 @@ public function filterByDescription($description = null, $comparison = null)
}
}
- return $this->addUsingAlias(DocumentTableMap::COL_DESCRIPTION, $description, $comparison);
+ $this->addUsingAlias(DocumentTableMap::COL_DESCRIPTION, $description, $comparison);
+
+ return $this;
}
/**
@@ -347,14 +367,15 @@ public function filterByDescription($description = null, $comparison = null)
*
* $query->filterByUrl('fooValue'); // WHERE url = 'fooValue'
* $query->filterByUrl('%fooValue%', Criteria::LIKE); // WHERE url LIKE '%fooValue%'
+ * $query->filterByUrl(['foo', 'bar']); // WHERE url IN ('foo', 'bar')
*
*
- * @param string $url The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $url The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUrl($url = null, $comparison = null)
+ public function filterByUrl($url = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($url)) {
@@ -362,7 +383,9 @@ public function filterByUrl($url = null, $comparison = null)
}
}
- return $this->addUsingAlias(DocumentTableMap::COL_URL, $url, $comparison);
+ $this->addUsingAlias(DocumentTableMap::COL_URL, $url, $comparison);
+
+ return $this;
}
/**
@@ -372,14 +395,15 @@ public function filterByUrl($url = null, $comparison = null)
*
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
* $query->filterByLink('%fooValue%', Criteria::LIKE); // WHERE link LIKE '%fooValue%'
+ * $query->filterByLink(['foo', 'bar']); // WHERE link IN ('foo', 'bar')
*
*
- * @param string $link The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $link The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByLink($link = null, $comparison = null)
+ public function filterByLink($link = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($link)) {
@@ -387,15 +411,17 @@ public function filterByLink($link = null, $comparison = null)
}
}
- return $this->addUsingAlias(DocumentTableMap::COL_LINK, $link, $comparison);
+ $this->addUsingAlias(DocumentTableMap::COL_LINK, $link, $comparison);
+
+ return $this;
}
/**
* Exclude object from result
*
- * @param ChildDocument $document Object to remove from the list of results
+ * @param ChildDocument $document Object to remove from the list of results
*
- * @return $this|ChildDocumentQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($document = null)
{
@@ -412,7 +438,7 @@ public function prune($document = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(DocumentTableMap::DATABASE_NAME);
@@ -437,12 +463,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(DocumentTableMap::DATABASE_NAME);
@@ -466,4 +492,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // DocumentQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/Email.php b/generated-classes/TechWilk/Rota/Base/Email.php
index bdace60c..b6935041 100644
--- a/generated-classes/TechWilk/Rota/Base/Email.php
+++ b/generated-classes/TechWilk/Rota/Base/Email.php
@@ -29,19 +29,21 @@ abstract class Email implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EmailTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EmailTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -50,14 +52,14 @@ abstract class Email implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -106,7 +108,7 @@ abstract class Email implements ActiveRecordInterface
/**
* The value for the error field.
*
- * @var string
+ * @var string|null
*/
protected $error;
@@ -114,7 +116,7 @@ abstract class Email implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
@@ -124,7 +126,7 @@ abstract class Email implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->emailto = '';
$this->emailbcc = '';
@@ -142,9 +144,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -152,10 +154,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -164,7 +166,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -174,9 +176,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -185,45 +187,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -232,10 +232,10 @@ public function resetModified($col = null)
* obj is an instance of Email, delegates to
* equals(Email). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -257,7 +257,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -265,10 +265,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -276,15 +276,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -293,12 +293,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|Email The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -308,13 +308,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -325,24 +325,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -350,7 +353,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -420,7 +423,7 @@ public function getMessage()
/**
* Get the [error] column value.
*
- * @return string
+ * @return string|null
*/
public function getError()
{
@@ -430,8 +433,8 @@ public function getError()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -445,13 +448,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [emailto] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEmailTo($v)
{
@@ -465,13 +468,13 @@ public function setEmailTo($v)
}
return $this;
- } // setEmailTo()
+ }
/**
* Set the value of [emailbcc] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEmailBcc($v)
{
@@ -485,13 +488,13 @@ public function setEmailBcc($v)
}
return $this;
- } // setEmailBcc()
+ }
/**
* Set the value of [emailfrom] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEmailFrom($v)
{
@@ -505,13 +508,13 @@ public function setEmailFrom($v)
}
return $this;
- } // setEmailFrom()
+ }
/**
* Set the value of [subject] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setSubject($v)
{
@@ -525,13 +528,13 @@ public function setSubject($v)
}
return $this;
- } // setSubject()
+ }
/**
* Set the value of [message] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setMessage($v)
{
@@ -545,13 +548,13 @@ public function setMessage($v)
}
return $this;
- } // setMessage()
+ }
/**
* Set the value of [error] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Email The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setError($v)
{
@@ -565,7 +568,7 @@ public function setError($v)
}
return $this;
- } // setError()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -573,21 +576,21 @@ public function setError($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->emailto !== '') {
- return false;
- }
+ if ($this->emailto !== '') {
+ return false;
+ }
- if ($this->emailbcc !== '') {
- return false;
- }
+ if ($this->emailbcc !== '') {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -597,19 +600,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EmailTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -630,8 +634,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : EmailTableMap::translateFieldName('Error', TableMap::TYPE_PHPNAME, $indexType)];
$this->error = (null !== $col) ? (string) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -639,6 +643,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 7; // 7 = EmailTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\Email'), 0, $e);
}
@@ -655,23 +660,24 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -697,19 +703,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
$this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate
if ($deep) { // also de-associate any related objects?
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see Email::setDeleted()
* @see Email::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -739,12 +746,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -789,12 +796,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -812,22 +819,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EmailTableMap::COL_ID] = true;
@@ -870,24 +878,31 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'emailTo':
$stmt->bindValue($identifier, $this->emailto, PDO::PARAM_STR);
+
break;
case 'emailBcc':
$stmt->bindValue($identifier, $this->emailbcc, PDO::PARAM_STR);
+
break;
case 'emailFrom':
$stmt->bindValue($identifier, $this->emailfrom, PDO::PARAM_STR);
+
break;
case 'subject':
$stmt->bindValue($identifier, $this->subject, PDO::PARAM_STR);
+
break;
case 'message':
$stmt->bindValue($identifier, $this->message, PDO::PARAM_STR);
+
break;
case 'error':
$stmt->bindValue($identifier, $this->error, PDO::PARAM_STR);
+
break;
}
}
@@ -910,12 +925,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -926,14 +941,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EmailTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -945,36 +960,35 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getEmailTo();
- break;
+
case 2:
return $this->getEmailBcc();
- break;
+
case 3:
return $this->getEmailFrom();
- break;
+
case 4:
return $this->getSubject();
- break;
+
case 5:
return $this->getMessage();
- break;
+
case 6:
return $this->getError();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -984,22 +998,22 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = []): array
{
if (isset($alreadyDumpedObjects['Email'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['Email'][$this->hashCode()] = true;
$keys = EmailTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getEmailTo(),
$keys[2] => $this->getEmailBcc(),
@@ -1007,7 +1021,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$keys[4] => $this->getSubject(),
$keys[5] => $this->getMessage(),
$keys[6] => $this->getError(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -1020,30 +1034,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\Email
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EmailTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\Email
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1085,11 +1101,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EmailTableMap::getFieldNames($keyType);
@@ -1114,6 +1130,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[6], $arr)) {
$this->setError($arr[$keys[6]]);
}
+
+ return $this;
}
/**
@@ -1133,9 +1151,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\Email The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1149,9 +1167,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EmailTableMap::DATABASE_NAME);
@@ -1184,13 +1202,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEmailQuery::create();
$criteria->add(EmailTableMap::COL_ID, $this->id);
@@ -1202,7 +1220,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1232,19 +1250,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1255,12 +1274,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\Email (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\Email (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setEmailTo($this->getEmailTo());
$copyObj->setEmailBcc($this->getEmailBcc());
@@ -1270,7 +1290,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setError($this->getError());
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1282,11 +1302,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\Email Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1300,6 +1320,8 @@ public function copy($deepCopy = false)
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1316,6 +1338,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1324,12 +1348,15 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
} // if ($deep)
+
+ return $this;
}
/**
@@ -1344,99 +1371,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1446,7 +1453,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1466,17 +1473,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EmailQuery.php b/generated-classes/TechWilk/Rota/Base/EmailQuery.php
index a7d0eba1..148ae3e6 100644
--- a/generated-classes/TechWilk/Rota/Base/EmailQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EmailQuery.php
@@ -7,7 +7,7 @@
use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
-use Propel\Runtime\Collection\ObjectCollection;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
use TechWilk\Rota\Email as ChildEmail;
@@ -15,9 +15,7 @@
use TechWilk\Rota\Map\EmailTableMap;
/**
- * Base class that represents a query for the 'emails' table.
- *
- *
+ * Base class that represents a query for the `emails` table.
*
* @method ChildEmailQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEmailQuery orderByEmailTo($order = Criteria::ASC) Order by the emailTo column
@@ -43,19 +41,19 @@
* @method ChildEmailQuery rightJoinWith($relation) Adds a RIGHT JOIN clause and with to the query
* @method ChildEmailQuery innerJoinWith($relation) Adds a INNER JOIN clause and with to the query
*
- * @method ChildEmail findOne(ConnectionInterface $con = null) Return the first ChildEmail matching the query
- * @method ChildEmail findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEmail matching the query, or a new ChildEmail object populated from the query conditions when no match is found
+ * @method ChildEmail|null findOne(?ConnectionInterface $con = null) Return the first ChildEmail matching the query
+ * @method ChildEmail findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEmail matching the query, or a new ChildEmail object populated from the query conditions when no match is found
*
- * @method ChildEmail findOneById(int $id) Return the first ChildEmail filtered by the id column
- * @method ChildEmail findOneByEmailTo(string $emailTo) Return the first ChildEmail filtered by the emailTo column
- * @method ChildEmail findOneByEmailBcc(string $emailBcc) Return the first ChildEmail filtered by the emailBcc column
- * @method ChildEmail findOneByEmailFrom(string $emailFrom) Return the first ChildEmail filtered by the emailFrom column
- * @method ChildEmail findOneBySubject(string $subject) Return the first ChildEmail filtered by the subject column
- * @method ChildEmail findOneByMessage(string $message) Return the first ChildEmail filtered by the message column
- * @method ChildEmail findOneByError(string $error) Return the first ChildEmail filtered by the error column *
-
- * @method ChildEmail requirePk($key, ConnectionInterface $con = null) Return the ChildEmail by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEmail requireOne(ConnectionInterface $con = null) Return the first ChildEmail matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEmail|null findOneById(int $id) Return the first ChildEmail filtered by the id column
+ * @method ChildEmail|null findOneByEmailTo(string $emailTo) Return the first ChildEmail filtered by the emailTo column
+ * @method ChildEmail|null findOneByEmailBcc(string $emailBcc) Return the first ChildEmail filtered by the emailBcc column
+ * @method ChildEmail|null findOneByEmailFrom(string $emailFrom) Return the first ChildEmail filtered by the emailFrom column
+ * @method ChildEmail|null findOneBySubject(string $subject) Return the first ChildEmail filtered by the subject column
+ * @method ChildEmail|null findOneByMessage(string $message) Return the first ChildEmail filtered by the message column
+ * @method ChildEmail|null findOneByError(string $error) Return the first ChildEmail filtered by the error column
+ *
+ * @method ChildEmail requirePk($key, ?ConnectionInterface $con = null) Return the ChildEmail by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEmail requireOne(?ConnectionInterface $con = null) Return the first ChildEmail matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEmail requireOneById(int $id) Return the first ChildEmail filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEmail requireOneByEmailTo(string $emailTo) Return the first ChildEmail filtered by the emailTo column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -65,16 +63,26 @@
* @method ChildEmail requireOneByMessage(string $message) Return the first ChildEmail filtered by the message column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEmail requireOneByError(string $error) Return the first ChildEmail filtered by the error column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEmail[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEmail objects based on current ModelCriteria
- * @method ChildEmail[]|ObjectCollection findById(int $id) Return ChildEmail objects filtered by the id column
- * @method ChildEmail[]|ObjectCollection findByEmailTo(string $emailTo) Return ChildEmail objects filtered by the emailTo column
- * @method ChildEmail[]|ObjectCollection findByEmailBcc(string $emailBcc) Return ChildEmail objects filtered by the emailBcc column
- * @method ChildEmail[]|ObjectCollection findByEmailFrom(string $emailFrom) Return ChildEmail objects filtered by the emailFrom column
- * @method ChildEmail[]|ObjectCollection findBySubject(string $subject) Return ChildEmail objects filtered by the subject column
- * @method ChildEmail[]|ObjectCollection findByMessage(string $message) Return ChildEmail objects filtered by the message column
- * @method ChildEmail[]|ObjectCollection findByError(string $error) Return ChildEmail objects filtered by the error column
- * @method ChildEmail[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEmail[]|Collection find(?ConnectionInterface $con = null) Return ChildEmail objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEmail objects based on current ModelCriteria
+ *
+ * @method ChildEmail[]|Collection findById(int|array $id) Return ChildEmail objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildEmail objects filtered by the id column
+ * @method ChildEmail[]|Collection findByEmailTo(string|array $emailTo) Return ChildEmail objects filtered by the emailTo column
+ * @psalm-method Collection&\Traversable findByEmailTo(string|array $emailTo) Return ChildEmail objects filtered by the emailTo column
+ * @method ChildEmail[]|Collection findByEmailBcc(string|array $emailBcc) Return ChildEmail objects filtered by the emailBcc column
+ * @psalm-method Collection&\Traversable findByEmailBcc(string|array $emailBcc) Return ChildEmail objects filtered by the emailBcc column
+ * @method ChildEmail[]|Collection findByEmailFrom(string|array $emailFrom) Return ChildEmail objects filtered by the emailFrom column
+ * @psalm-method Collection&\Traversable findByEmailFrom(string|array $emailFrom) Return ChildEmail objects filtered by the emailFrom column
+ * @method ChildEmail[]|Collection findBySubject(string|array $subject) Return ChildEmail objects filtered by the subject column
+ * @psalm-method Collection&\Traversable findBySubject(string|array $subject) Return ChildEmail objects filtered by the subject column
+ * @method ChildEmail[]|Collection findByMessage(string|array $message) Return ChildEmail objects filtered by the message column
+ * @psalm-method Collection&\Traversable findByMessage(string|array $message) Return ChildEmail objects filtered by the message column
+ * @method ChildEmail[]|Collection findByError(string|array $error) Return ChildEmail objects filtered by the error column
+ * @psalm-method Collection&\Traversable findByError(string|array $error) Return ChildEmail objects filtered by the error column
*
+ * @method ChildEmail[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class EmailQuery extends ModelCriteria
{
@@ -83,9 +91,9 @@ abstract class EmailQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\EmailQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\Email', $modelAlias = null)
{
@@ -95,12 +103,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildEmailQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildEmailQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildEmailQuery) {
return $criteria;
@@ -130,7 +138,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildEmail|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -162,8 +170,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -195,8 +203,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildEmail|array|mixed the result, formatted by the current formatter
*/
@@ -216,12 +224,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -238,25 +246,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(EmailTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(EmailTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(EmailTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(EmailTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -269,15 +283,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -297,7 +311,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -307,14 +323,15 @@ public function filterById($id = null, $comparison = null)
*
* $query->filterByEmailTo('fooValue'); // WHERE emailTo = 'fooValue'
* $query->filterByEmailTo('%fooValue%', Criteria::LIKE); // WHERE emailTo LIKE '%fooValue%'
+ * $query->filterByEmailTo(['foo', 'bar']); // WHERE emailTo IN ('foo', 'bar')
*
*
- * @param string $emailTo The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $emailTo The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEmailTo($emailTo = null, $comparison = null)
+ public function filterByEmailTo($emailTo = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($emailTo)) {
@@ -322,7 +339,9 @@ public function filterByEmailTo($emailTo = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_EMAILTO, $emailTo, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_EMAILTO, $emailTo, $comparison);
+
+ return $this;
}
/**
@@ -332,14 +351,15 @@ public function filterByEmailTo($emailTo = null, $comparison = null)
*
* $query->filterByEmailBcc('fooValue'); // WHERE emailBcc = 'fooValue'
* $query->filterByEmailBcc('%fooValue%', Criteria::LIKE); // WHERE emailBcc LIKE '%fooValue%'
+ * $query->filterByEmailBcc(['foo', 'bar']); // WHERE emailBcc IN ('foo', 'bar')
*
*
- * @param string $emailBcc The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $emailBcc The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEmailBcc($emailBcc = null, $comparison = null)
+ public function filterByEmailBcc($emailBcc = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($emailBcc)) {
@@ -347,7 +367,9 @@ public function filterByEmailBcc($emailBcc = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_EMAILBCC, $emailBcc, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_EMAILBCC, $emailBcc, $comparison);
+
+ return $this;
}
/**
@@ -357,14 +379,15 @@ public function filterByEmailBcc($emailBcc = null, $comparison = null)
*
* $query->filterByEmailFrom('fooValue'); // WHERE emailFrom = 'fooValue'
* $query->filterByEmailFrom('%fooValue%', Criteria::LIKE); // WHERE emailFrom LIKE '%fooValue%'
+ * $query->filterByEmailFrom(['foo', 'bar']); // WHERE emailFrom IN ('foo', 'bar')
*
*
- * @param string $emailFrom The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $emailFrom The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEmailFrom($emailFrom = null, $comparison = null)
+ public function filterByEmailFrom($emailFrom = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($emailFrom)) {
@@ -372,7 +395,9 @@ public function filterByEmailFrom($emailFrom = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_EMAILFROM, $emailFrom, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_EMAILFROM, $emailFrom, $comparison);
+
+ return $this;
}
/**
@@ -382,14 +407,15 @@ public function filterByEmailFrom($emailFrom = null, $comparison = null)
*
* $query->filterBySubject('fooValue'); // WHERE subject = 'fooValue'
* $query->filterBySubject('%fooValue%', Criteria::LIKE); // WHERE subject LIKE '%fooValue%'
+ * $query->filterBySubject(['foo', 'bar']); // WHERE subject IN ('foo', 'bar')
*
*
- * @param string $subject The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $subject The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterBySubject($subject = null, $comparison = null)
+ public function filterBySubject($subject = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($subject)) {
@@ -397,7 +423,9 @@ public function filterBySubject($subject = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_SUBJECT, $subject, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_SUBJECT, $subject, $comparison);
+
+ return $this;
}
/**
@@ -407,14 +435,15 @@ public function filterBySubject($subject = null, $comparison = null)
*
* $query->filterByMessage('fooValue'); // WHERE message = 'fooValue'
* $query->filterByMessage('%fooValue%', Criteria::LIKE); // WHERE message LIKE '%fooValue%'
+ * $query->filterByMessage(['foo', 'bar']); // WHERE message IN ('foo', 'bar')
*
*
- * @param string $message The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $message The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByMessage($message = null, $comparison = null)
+ public function filterByMessage($message = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($message)) {
@@ -422,7 +451,9 @@ public function filterByMessage($message = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_MESSAGE, $message, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_MESSAGE, $message, $comparison);
+
+ return $this;
}
/**
@@ -432,14 +463,15 @@ public function filterByMessage($message = null, $comparison = null)
*
* $query->filterByError('fooValue'); // WHERE error = 'fooValue'
* $query->filterByError('%fooValue%', Criteria::LIKE); // WHERE error LIKE '%fooValue%'
+ * $query->filterByError(['foo', 'bar']); // WHERE error IN ('foo', 'bar')
*
*
- * @param string $error The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $error The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByError($error = null, $comparison = null)
+ public function filterByError($error = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($error)) {
@@ -447,15 +479,17 @@ public function filterByError($error = null, $comparison = null)
}
}
- return $this->addUsingAlias(EmailTableMap::COL_ERROR, $error, $comparison);
+ $this->addUsingAlias(EmailTableMap::COL_ERROR, $error, $comparison);
+
+ return $this;
}
/**
* Exclude object from result
*
- * @param ChildEmail $email Object to remove from the list of results
+ * @param ChildEmail $email Object to remove from the list of results
*
- * @return $this|ChildEmailQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($email = null)
{
@@ -472,7 +506,7 @@ public function prune($email = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EmailTableMap::DATABASE_NAME);
@@ -497,12 +531,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EmailTableMap::DATABASE_NAME);
@@ -526,4 +560,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // EmailQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/Event.php b/generated-classes/TechWilk/Rota/Base/Event.php
index a8e60113..918b7f1d 100644
--- a/generated-classes/TechWilk/Rota/Base/Event.php
+++ b/generated-classes/TechWilk/Rota/Base/Event.php
@@ -52,19 +52,21 @@ abstract class Event implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -73,14 +75,14 @@ abstract class Event implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -164,42 +166,42 @@ abstract class Event implements ActiveRecordInterface
* The value for the removed field.
*
* Note: this column has a database default value of: 0
- * @var int
+ * @var int|null
*/
protected $removed;
/**
* The value for the eventgroup field.
*
- * @var int
+ * @var int|null
*/
protected $eventgroup;
/**
* The value for the sermontitle field.
*
- * @var string
+ * @var string|null
*/
protected $sermontitle;
/**
* The value for the bibleverse field.
*
- * @var string
+ * @var string|null
*/
protected $bibleverse;
/**
* The value for the created field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $created;
/**
* The value for the updated field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $updated;
@@ -230,18 +232,21 @@ abstract class Event implements ActiveRecordInterface
/**
* @var ObjectCollection|ChildComment[] Collection to store aggregation of ChildComment objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildComment objects.
*/
protected $collComments;
protected $collCommentsPartial;
/**
* @var ObjectCollection|ChildEventPerson[] Collection to store aggregation of ChildEventPerson objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildEventPerson objects.
*/
protected $collEventpeople;
protected $collEventpeoplePartial;
/**
* @var ObjectCollection|ChildAvailability[] Collection to store aggregation of ChildAvailability objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildAvailability objects.
*/
protected $collAvailabilities;
protected $collAvailabilitiesPartial;
@@ -250,25 +255,28 @@ abstract class Event implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildComment[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $commentsScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildEventPerson[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $eventpeopleScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildAvailability[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $availabilitiesScheduledForDeletion = null;
@@ -278,11 +286,11 @@ abstract class Event implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
- $this->date = PropelDateTime::newInstance(null, null, 'DateTime');
+ $this->date = PropelDateTime::newInstance(NULL, null, 'DateTime');
$this->createdby = 0;
- $this->rehearsaldate = PropelDateTime::newInstance(null, null, 'DateTime');
+ $this->rehearsaldate = PropelDateTime::newInstance(NULL, null, 'DateTime');
$this->type = 0;
$this->subtype = 0;
$this->location = 0;
@@ -303,9 +311,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -313,10 +321,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -325,7 +333,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -335,9 +343,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -346,45 +354,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -393,10 +399,10 @@ public function resetModified($col = null)
* obj is an instance of Event, delegates to
* equals(Event). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -418,7 +424,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -426,10 +432,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -437,15 +443,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -454,12 +460,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|Event The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -469,13 +475,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -486,24 +492,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -511,7 +520,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -532,12 +541,14 @@ public function getId()
* Get the [optionally formatted] temporal [date] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime : string)
*/
public function getDate($format = null)
{
@@ -572,12 +583,14 @@ public function getCreatedBy()
* Get the [optionally formatted] temporal [rehearsaldate] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), and 0 if column value is 0000-00-00 00:00:00.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
+ *
+ * @psalm-return ($format is null ? DateTime : string)
*/
public function getRehearsalDate($format = null)
{
@@ -641,7 +654,7 @@ public function getRehearsal()
/**
* Get the [removed] column value.
*
- * @return int
+ * @return int|null
*/
public function getRemoved()
{
@@ -651,7 +664,7 @@ public function getRemoved()
/**
* Get the [eventgroup] column value.
*
- * @return int
+ * @return int|null
*/
public function getEventGroupId()
{
@@ -661,7 +674,7 @@ public function getEventGroupId()
/**
* Get the [sermontitle] column value.
*
- * @return string
+ * @return string|null
*/
public function getSermonTitle()
{
@@ -671,7 +684,7 @@ public function getSermonTitle()
/**
* Get the [bibleverse] column value.
*
- * @return string
+ * @return string|null
*/
public function getBibleVerse()
{
@@ -682,12 +695,14 @@ public function getBibleVerse()
* Get the [optionally formatted] temporal [created] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
+ *
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getCreated($format = null)
{
@@ -702,12 +717,14 @@ public function getCreated($format = null)
* Get the [optionally formatted] temporal [updated] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ *
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getUpdated($format = null)
{
@@ -721,8 +738,8 @@ public function getUpdated($format = null)
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -736,21 +753,21 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Sets the value of [date] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setDate($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->date !== null || $dt !== null) {
- if (($dt != $this->date) // normalized values don't match
- || ($dt->format('Y-m-d H:i:s.u') === null) // or the entered value matches the default
+ if ( ($dt != $this->date) // normalized values don't match
+ || ($dt->format('Y-m-d H:i:s.u') === NULL) // or the entered value matches the default
) {
$this->date = $dt === null ? null : clone $dt;
$this->modifiedColumns[EventTableMap::COL_DATE] = true;
@@ -758,13 +775,13 @@ public function setDate($v)
} // if either are not null
return $this;
- } // setDate()
+ }
/**
* Set the value of [name] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setName($v)
{
@@ -778,13 +795,13 @@ public function setName($v)
}
return $this;
- } // setName()
+ }
/**
* Set the value of [createdby] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setCreatedBy($v)
{
@@ -802,21 +819,21 @@ public function setCreatedBy($v)
}
return $this;
- } // setCreatedBy()
+ }
/**
* Sets the value of [rehearsaldate] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setRehearsalDate($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->rehearsaldate !== null || $dt !== null) {
- if (($dt != $this->rehearsaldate) // normalized values don't match
- || ($dt->format('Y-m-d H:i:s.u') === null) // or the entered value matches the default
+ if ( ($dt != $this->rehearsaldate) // normalized values don't match
+ || ($dt->format('Y-m-d H:i:s.u') === NULL) // or the entered value matches the default
) {
$this->rehearsaldate = $dt === null ? null : clone $dt;
$this->modifiedColumns[EventTableMap::COL_REHEARSALDATE] = true;
@@ -824,13 +841,13 @@ public function setRehearsalDate($v)
} // if either are not null
return $this;
- } // setRehearsalDate()
+ }
/**
* Set the value of [type] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventTypeId($v)
{
@@ -848,13 +865,13 @@ public function setEventTypeId($v)
}
return $this;
- } // setEventTypeId()
+ }
/**
* Set the value of [subtype] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventSubTypeId($v)
{
@@ -872,13 +889,13 @@ public function setEventSubTypeId($v)
}
return $this;
- } // setEventSubTypeId()
+ }
/**
* Set the value of [location] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setLocationId($v)
{
@@ -896,13 +913,13 @@ public function setLocationId($v)
}
return $this;
- } // setLocationId()
+ }
/**
* Set the value of [notified] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setNotified($v)
{
@@ -916,13 +933,13 @@ public function setNotified($v)
}
return $this;
- } // setNotified()
+ }
/**
* Set the value of [rehearsal] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setRehearsal($v)
{
@@ -936,13 +953,13 @@ public function setRehearsal($v)
}
return $this;
- } // setRehearsal()
+ }
/**
* Set the value of [removed] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setRemoved($v)
{
@@ -956,13 +973,13 @@ public function setRemoved($v)
}
return $this;
- } // setRemoved()
+ }
/**
* Set the value of [eventgroup] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventGroupId($v)
{
@@ -980,13 +997,13 @@ public function setEventGroupId($v)
}
return $this;
- } // setEventGroupId()
+ }
/**
* Set the value of [sermontitle] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setSermonTitle($v)
{
@@ -1000,13 +1017,13 @@ public function setSermonTitle($v)
}
return $this;
- } // setSermonTitle()
+ }
/**
* Set the value of [bibleverse] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param string|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setBibleVerse($v)
{
@@ -1020,14 +1037,14 @@ public function setBibleVerse($v)
}
return $this;
- } // setBibleVerse()
+ }
/**
* Sets the value of [created] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setCreated($v)
{
@@ -1040,14 +1057,14 @@ public function setCreated($v)
} // if either are not null
return $this;
- } // setCreated()
+ }
/**
* Sets the value of [updated] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setUpdated($v)
{
@@ -1060,7 +1077,7 @@ public function setUpdated($v)
} // if either are not null
return $this;
- } // setUpdated()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -1068,49 +1085,49 @@ public function setUpdated($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->date && $this->date->format('Y-m-d H:i:s.u') !== null) {
- return false;
- }
+ if ($this->date && $this->date->format('Y-m-d H:i:s.u') !== NULL) {
+ return false;
+ }
- if ($this->createdby !== 0) {
- return false;
- }
+ if ($this->createdby !== 0) {
+ return false;
+ }
- if ($this->rehearsaldate && $this->rehearsaldate->format('Y-m-d H:i:s.u') !== null) {
- return false;
- }
+ if ($this->rehearsaldate && $this->rehearsaldate->format('Y-m-d H:i:s.u') !== NULL) {
+ return false;
+ }
- if ($this->type !== 0) {
- return false;
- }
+ if ($this->type !== 0) {
+ return false;
+ }
- if ($this->subtype !== 0) {
- return false;
- }
+ if ($this->subtype !== 0) {
+ return false;
+ }
- if ($this->location !== 0) {
- return false;
- }
+ if ($this->location !== 0) {
+ return false;
+ }
- if ($this->notified !== 0) {
- return false;
- }
+ if ($this->notified !== 0) {
+ return false;
+ }
- if ($this->rehearsal !== 0) {
- return false;
- }
+ if ($this->rehearsal !== 0) {
+ return false;
+ }
- if ($this->removed !== 0) {
- return false;
- }
+ if ($this->removed !== 0) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -1120,19 +1137,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EventTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -1192,8 +1210,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = null;
}
$this->updated = (null !== $col) ? PropelDateTime::newInstance($col, null, 'DateTime') : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -1201,6 +1219,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 16; // 16 = EventTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\Event'), 0, $e);
}
@@ -1217,9 +1236,10 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aUser !== null && $this->createdby !== $this->aUser->getId()) {
$this->aUser = null;
@@ -1236,19 +1256,19 @@ public function ensureConsistency()
if ($this->aEventGroup !== null && $this->eventgroup !== $this->aEventGroup->getId()) {
$this->aEventGroup = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -1285,19 +1305,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
$this->collEventpeople = null;
$this->collAvailabilities = null;
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see Event::setDeleted()
* @see Event::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -1327,12 +1348,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -1352,12 +1373,13 @@ public function save(ConnectionInterface $con = null)
if ($isInsert) {
$ret = $ret && $this->preInsert($con);
// timestampable behavior
-
+ $time = time();
+ $highPrecision = \Propel\Runtime\Util\PropelDateTime::createHighPrecision();
if (!$this->isColumnModified(EventTableMap::COL_CREATED)) {
- $this->setCreated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setCreated($highPrecision);
}
if (!$this->isColumnModified(EventTableMap::COL_UPDATED)) {
- $this->setUpdated(\Propel\Runtime\Util\PropelDateTime::createHighPrecision());
+ $this->setUpdated($highPrecision);
}
} else {
$ret = $ret && $this->preUpdate($con);
@@ -1389,12 +1411,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -1503,22 +1525,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EventTableMap::COL_ID] = true;
@@ -1585,51 +1608,67 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'date':
$stmt->bindValue($identifier, $this->date ? $this->date->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'name':
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
+
break;
case 'createdBy':
$stmt->bindValue($identifier, $this->createdby, PDO::PARAM_INT);
+
break;
case 'rehearsalDate':
$stmt->bindValue($identifier, $this->rehearsaldate ? $this->rehearsaldate->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'type':
$stmt->bindValue($identifier, $this->type, PDO::PARAM_INT);
+
break;
case 'subType':
$stmt->bindValue($identifier, $this->subtype, PDO::PARAM_INT);
+
break;
case 'location':
$stmt->bindValue($identifier, $this->location, PDO::PARAM_INT);
+
break;
case 'notified':
$stmt->bindValue($identifier, $this->notified, PDO::PARAM_INT);
+
break;
case 'rehearsal':
$stmt->bindValue($identifier, $this->rehearsal, PDO::PARAM_INT);
+
break;
case 'removed':
$stmt->bindValue($identifier, $this->removed, PDO::PARAM_INT);
+
break;
case 'eventGroup':
$stmt->bindValue($identifier, $this->eventgroup, PDO::PARAM_INT);
+
break;
case 'sermonTitle':
$stmt->bindValue($identifier, $this->sermontitle, PDO::PARAM_STR);
+
break;
case 'bibleVerse':
$stmt->bindValue($identifier, $this->bibleverse, PDO::PARAM_STR);
+
break;
case 'created':
$stmt->bindValue($identifier, $this->created ? $this->created->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'updated':
$stmt->bindValue($identifier, $this->updated ? $this->updated->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+
break;
}
}
@@ -1654,12 +1693,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -1670,14 +1709,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -1689,63 +1728,62 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getDate();
- break;
+
case 2:
return $this->getName();
- break;
+
case 3:
return $this->getCreatedBy();
- break;
+
case 4:
return $this->getRehearsalDate();
- break;
+
case 5:
return $this->getEventTypeId();
- break;
+
case 6:
return $this->getEventSubTypeId();
- break;
+
case 7:
return $this->getLocationId();
- break;
+
case 8:
return $this->getNotified();
- break;
+
case 9:
return $this->getRehearsal();
- break;
+
case 10:
return $this->getRemoved();
- break;
+
case 11:
return $this->getEventGroupId();
- break;
+
case 12:
return $this->getSermonTitle();
- break;
+
case 13:
return $this->getBibleVerse();
- break;
+
case 14:
return $this->getCreated();
- break;
+
case 15:
return $this->getUpdated();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -1755,23 +1793,23 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['Event'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['Event'][$this->hashCode()] = true;
$keys = EventTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getDate(),
$keys[2] => $this->getName(),
@@ -1788,21 +1826,21 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$keys[13] => $this->getBibleVerse(),
$keys[14] => $this->getCreated(),
$keys[15] => $this->getUpdated(),
- );
+ ];
if ($result[$keys[1]] instanceof \DateTimeInterface) {
- $result[$keys[1]] = $result[$keys[1]]->format('c');
+ $result[$keys[1]] = $result[$keys[1]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[4]] instanceof \DateTimeInterface) {
- $result[$keys[4]] = $result[$keys[4]]->format('c');
+ $result[$keys[4]] = $result[$keys[4]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[14]] instanceof \DateTimeInterface) {
- $result[$keys[14]] = $result[$keys[14]]->format('c');
+ $result[$keys[14]] = $result[$keys[14]]->format('Y-m-d H:i:s.u');
}
if ($result[$keys[15]] instanceof \DateTimeInterface) {
- $result[$keys[15]] = $result[$keys[15]]->format('c');
+ $result[$keys[15]] = $result[$keys[15]]->format('Y-m-d H:i:s.u');
}
$virtualColumns = $this->virtualColumns;
@@ -1812,6 +1850,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aUser) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'user';
@@ -1823,9 +1862,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'User';
}
- $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aEventType) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'eventType';
@@ -1837,9 +1877,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'EventType';
}
- $result[$key] = $this->aEventType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEventType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aEventSubType) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'eventSubType';
@@ -1851,9 +1892,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'EventSubType';
}
- $result[$key] = $this->aEventSubType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEventSubType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aLocation) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'location';
@@ -1865,9 +1907,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'Location';
}
- $result[$key] = $this->aLocation->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aLocation->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aEventGroup) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'eventGroup';
@@ -1879,9 +1922,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'EventGroup';
}
- $result[$key] = $this->aEventGroup->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEventGroup->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->collComments) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'comments';
@@ -1896,6 +1940,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$result[$key] = $this->collComments->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collEventpeople) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'eventpeople';
@@ -1910,6 +1955,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$result[$key] = $this->collEventpeople->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collAvailabilities) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'availabilities';
@@ -1931,30 +1977,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\Event
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\Event
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -2023,11 +2071,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EventTableMap::getFieldNames($keyType);
@@ -2079,6 +2127,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[15], $arr)) {
$this->setUpdated($arr[$keys[15]]);
}
+
+ return $this;
}
/**
@@ -2098,9 +2148,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\Event The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -2114,9 +2164,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EventTableMap::DATABASE_NAME);
@@ -2176,13 +2226,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEventQuery::create();
$criteria->add(EventTableMap::COL_ID, $this->id);
@@ -2194,7 +2244,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -2224,19 +2274,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -2247,12 +2298,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\Event (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\Event (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setDate($this->getDate());
$copyObj->setName($this->getName());
@@ -2292,11 +2344,12 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->addAvailability($relObj->copy($deepCopy));
}
}
+
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -2308,11 +2361,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\Event Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -2325,9 +2378,9 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildUser object.
*
- * @param ChildUser $v
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildUser $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setUser(ChildUser $v = null)
{
@@ -2353,11 +2406,11 @@ public function setUser(ChildUser $v = null)
/**
* Get the associated ChildUser object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildUser The associated ChildUser object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getUser(ConnectionInterface $con = null)
+ public function getUser(?ConnectionInterface $con = null)
{
if ($this->aUser === null && ($this->createdby != 0)) {
$this->aUser = ChildUserQuery::create()->findPk($this->createdby, $con);
@@ -2376,9 +2429,9 @@ public function getUser(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildEventType object.
*
- * @param ChildEventType $v
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEventType $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEventType(ChildEventType $v = null)
{
@@ -2404,11 +2457,11 @@ public function setEventType(ChildEventType $v = null)
/**
* Get the associated ChildEventType object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildEventType The associated ChildEventType object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEventType(ConnectionInterface $con = null)
+ public function getEventType(?ConnectionInterface $con = null)
{
if ($this->aEventType === null && ($this->type != 0)) {
$this->aEventType = ChildEventTypeQuery::create()->findPk($this->type, $con);
@@ -2427,9 +2480,9 @@ public function getEventType(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildEventSubType object.
*
- * @param ChildEventSubType $v
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEventSubType $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEventSubType(ChildEventSubType $v = null)
{
@@ -2455,11 +2508,11 @@ public function setEventSubType(ChildEventSubType $v = null)
/**
* Get the associated ChildEventSubType object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildEventSubType The associated ChildEventSubType object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEventSubType(ConnectionInterface $con = null)
+ public function getEventSubType(?ConnectionInterface $con = null)
{
if ($this->aEventSubType === null && ($this->subtype != 0)) {
$this->aEventSubType = ChildEventSubTypeQuery::create()->findPk($this->subtype, $con);
@@ -2478,9 +2531,9 @@ public function getEventSubType(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildLocation object.
*
- * @param ChildLocation $v
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildLocation $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setLocation(ChildLocation $v = null)
{
@@ -2506,11 +2559,11 @@ public function setLocation(ChildLocation $v = null)
/**
* Get the associated ChildLocation object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildLocation The associated ChildLocation object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getLocation(ConnectionInterface $con = null)
+ public function getLocation(?ConnectionInterface $con = null)
{
if ($this->aLocation === null && ($this->location != 0)) {
$this->aLocation = ChildLocationQuery::create()->findPk($this->location, $con);
@@ -2529,14 +2582,14 @@ public function getLocation(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildEventGroup object.
*
- * @param ChildEventGroup $v
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEventGroup|null $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEventGroup(ChildEventGroup $v = null)
{
if ($v === null) {
- $this->setEventGroupId(null);
+ $this->setEventGroupId(NULL);
} else {
$this->setEventGroupId($v->getId());
}
@@ -2557,11 +2610,11 @@ public function setEventGroup(ChildEventGroup $v = null)
/**
* Get the associated ChildEventGroup object
*
- * @param ConnectionInterface $con Optional Connection object.
- * @return ChildEventGroup The associated ChildEventGroup object.
- * @throws PropelException
+ * @param ConnectionInterface $con Optional Connection object.
+ * @return ChildEventGroup|null The associated ChildEventGroup object.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEventGroup(ConnectionInterface $con = null)
+ public function getEventGroup(?ConnectionInterface $con = null)
{
if ($this->aEventGroup === null && ($this->eventgroup != 0)) {
$this->aEventGroup = ChildEventGroupQuery::create()->findPk($this->eventgroup, $con);
@@ -2583,20 +2636,20 @@ public function getEventGroup(ConnectionInterface $con = null)
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
- * @param string $relationName The name of the relation to initialize
+ * @param string $relationName The name of the relation to initialize
* @return void
*/
- public function initRelation($relationName)
+ public function initRelation($relationName): void
{
- if ('Comment' == $relationName) {
+ if ('Comment' === $relationName) {
$this->initComments();
return;
}
- if ('EventPerson' == $relationName) {
+ if ('EventPerson' === $relationName) {
$this->initEventpeople();
return;
}
- if ('Availability' == $relationName) {
+ if ('Availability' === $relationName) {
$this->initAvailabilities();
return;
}
@@ -2608,18 +2661,22 @@ public function initRelation($relationName)
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addComments()
+ * @return $this
+ * @see addComments()
*/
public function clearComments()
{
$this->collComments = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collComments collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialComments($v = true)
+ public function resetPartialComments($v = true): void
{
$this->collCommentsPartial = $v;
}
@@ -2631,12 +2688,12 @@ public function resetPartialComments($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initComments($overrideExisting = true)
+ public function initComments(bool $overrideExisting = true): void
{
if (null !== $this->collComments && !$overrideExisting) {
return;
@@ -2657,18 +2714,28 @@ public function initComments($overrideExisting = true)
* If this ChildEvent is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildComment[] List of ChildComment objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildComment objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getComments(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getComments(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collCommentsPartial && !$this->isNew();
- if (null === $this->collComments || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collComments) {
+ if (null === $this->collComments || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initComments();
+ if (null === $this->collComments) {
+ $this->initComments();
+ } else {
+ $collectionClassName = CommentTableMap::getTableMap()->getCollectionClassName();
+
+ $collComments = new $collectionClassName;
+ $collComments->setModel('\TechWilk\Rota\Comment');
+
+ return $collComments;
+ }
} else {
$collComments = ChildCommentQuery::create(null, $criteria)
->filterByEvent($this)
@@ -2712,11 +2779,11 @@ public function getComments(Criteria $criteria = null, ConnectionInterface $con
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $comments A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param Collection $comments A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setComments(Collection $comments, ConnectionInterface $con = null)
+ public function setComments(Collection $comments, ?ConnectionInterface $con = null)
{
/** @var ChildComment[] $commentsToDelete */
$commentsToDelete = $this->getComments(new Criteria(), $con)->diff($comments);
@@ -2742,13 +2809,13 @@ public function setComments(Collection $comments, ConnectionInterface $con = nul
/**
* Returns the number of related Comment objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Comment objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Comment objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countComments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countComments(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collCommentsPartial && !$this->isNew();
if (null === $this->collComments || null !== $criteria || $partial) {
@@ -2777,8 +2844,8 @@ public function countComments(Criteria $criteria = null, $distinct = false, Conn
* Method called to associate a ChildComment object to this object
* through the ChildComment foreign key attribute.
*
- * @param ChildComment $l ChildComment
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param ChildComment $l ChildComment
+ * @return $this The current object (for fluent API support)
*/
public function addComment(ChildComment $l)
{
@@ -2801,15 +2868,15 @@ public function addComment(ChildComment $l)
/**
* @param ChildComment $comment The ChildComment object to add.
*/
- protected function doAddComment(ChildComment $comment)
+ protected function doAddComment(ChildComment $comment): void
{
$this->collComments[]= $comment;
$comment->setEvent($this);
}
/**
- * @param ChildComment $comment The ChildComment object to remove.
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param ChildComment $comment The ChildComment object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeComment(ChildComment $comment)
{
@@ -2839,12 +2906,13 @@ public function removeComment(ChildComment $comment)
* api reasonable. You can provide public methods for those you
* actually need in Event.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildComment[] List of ChildComment objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildComment objects
*/
- public function getCommentsJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getCommentsJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildCommentQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -2858,18 +2926,22 @@ public function getCommentsJoinUser(Criteria $criteria = null, ConnectionInterfa
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addEventpeople()
+ * @return $this
+ * @see addEventpeople()
*/
public function clearEventpeople()
{
$this->collEventpeople = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collEventpeople collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialEventpeople($v = true)
+ public function resetPartialEventpeople($v = true): void
{
$this->collEventpeoplePartial = $v;
}
@@ -2881,12 +2953,12 @@ public function resetPartialEventpeople($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initEventpeople($overrideExisting = true)
+ public function initEventpeople(bool $overrideExisting = true): void
{
if (null !== $this->collEventpeople && !$overrideExisting) {
return;
@@ -2907,18 +2979,28 @@ public function initEventpeople($overrideExisting = true)
* If this ChildEvent is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildEventPerson[] List of ChildEventPerson objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEventPerson objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEventpeople(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getEventpeople(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collEventpeoplePartial && !$this->isNew();
- if (null === $this->collEventpeople || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collEventpeople) {
+ if (null === $this->collEventpeople || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initEventpeople();
+ if (null === $this->collEventpeople) {
+ $this->initEventpeople();
+ } else {
+ $collectionClassName = EventPersonTableMap::getTableMap()->getCollectionClassName();
+
+ $collEventpeople = new $collectionClassName;
+ $collEventpeople->setModel('\TechWilk\Rota\EventPerson');
+
+ return $collEventpeople;
+ }
} else {
$collEventpeople = ChildEventPersonQuery::create(null, $criteria)
->filterByEvent($this)
@@ -2962,11 +3044,11 @@ public function getEventpeople(Criteria $criteria = null, ConnectionInterface $c
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $eventpeople A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param Collection $eventpeople A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setEventpeople(Collection $eventpeople, ConnectionInterface $con = null)
+ public function setEventpeople(Collection $eventpeople, ?ConnectionInterface $con = null)
{
/** @var ChildEventPerson[] $eventpeopleToDelete */
$eventpeopleToDelete = $this->getEventpeople(new Criteria(), $con)->diff($eventpeople);
@@ -2992,13 +3074,13 @@ public function setEventpeople(Collection $eventpeople, ConnectionInterface $con
/**
* Returns the number of related EventPerson objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related EventPerson objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related EventPerson objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countEventpeople(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countEventpeople(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collEventpeoplePartial && !$this->isNew();
if (null === $this->collEventpeople || null !== $criteria || $partial) {
@@ -3027,8 +3109,8 @@ public function countEventpeople(Criteria $criteria = null, $distinct = false, C
* Method called to associate a ChildEventPerson object to this object
* through the ChildEventPerson foreign key attribute.
*
- * @param ChildEventPerson $l ChildEventPerson
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param ChildEventPerson $l ChildEventPerson
+ * @return $this The current object (for fluent API support)
*/
public function addEventPerson(ChildEventPerson $l)
{
@@ -3051,15 +3133,15 @@ public function addEventPerson(ChildEventPerson $l)
/**
* @param ChildEventPerson $eventPerson The ChildEventPerson object to add.
*/
- protected function doAddEventPerson(ChildEventPerson $eventPerson)
+ protected function doAddEventPerson(ChildEventPerson $eventPerson): void
{
$this->collEventpeople[]= $eventPerson;
$eventPerson->setEvent($this);
}
/**
- * @param ChildEventPerson $eventPerson The ChildEventPerson object to remove.
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param ChildEventPerson $eventPerson The ChildEventPerson object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeEventPerson(ChildEventPerson $eventPerson)
{
@@ -3089,12 +3171,13 @@ public function removeEventPerson(ChildEventPerson $eventPerson)
* api reasonable. You can provide public methods for those you
* actually need in Event.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEventPerson[] List of ChildEventPerson objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEventPerson objects
*/
- public function getEventpeopleJoinUserRole(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventpeopleJoinUserRole(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventPersonQuery::create(null, $criteria);
$query->joinWith('UserRole', $joinBehavior);
@@ -3108,18 +3191,22 @@ public function getEventpeopleJoinUserRole(Criteria $criteria = null, Connection
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addAvailabilities()
+ * @return $this
+ * @see addAvailabilities()
*/
public function clearAvailabilities()
{
$this->collAvailabilities = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collAvailabilities collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialAvailabilities($v = true)
+ public function resetPartialAvailabilities($v = true): void
{
$this->collAvailabilitiesPartial = $v;
}
@@ -3131,12 +3218,12 @@ public function resetPartialAvailabilities($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initAvailabilities($overrideExisting = true)
+ public function initAvailabilities(bool $overrideExisting = true): void
{
if (null !== $this->collAvailabilities && !$overrideExisting) {
return;
@@ -3157,18 +3244,28 @@ public function initAvailabilities($overrideExisting = true)
* If this ChildEvent is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildAvailability[] List of ChildAvailability objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildAvailability objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getAvailabilities(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getAvailabilities(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collAvailabilitiesPartial && !$this->isNew();
- if (null === $this->collAvailabilities || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collAvailabilities) {
+ if (null === $this->collAvailabilities || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initAvailabilities();
+ if (null === $this->collAvailabilities) {
+ $this->initAvailabilities();
+ } else {
+ $collectionClassName = AvailabilityTableMap::getTableMap()->getCollectionClassName();
+
+ $collAvailabilities = new $collectionClassName;
+ $collAvailabilities->setModel('\TechWilk\Rota\Availability');
+
+ return $collAvailabilities;
+ }
} else {
$collAvailabilities = ChildAvailabilityQuery::create(null, $criteria)
->filterByEvent($this)
@@ -3212,11 +3309,11 @@ public function getAvailabilities(Criteria $criteria = null, ConnectionInterface
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $availabilities A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param Collection $availabilities A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setAvailabilities(Collection $availabilities, ConnectionInterface $con = null)
+ public function setAvailabilities(Collection $availabilities, ?ConnectionInterface $con = null)
{
/** @var ChildAvailability[] $availabilitiesToDelete */
$availabilitiesToDelete = $this->getAvailabilities(new Criteria(), $con)->diff($availabilities);
@@ -3242,13 +3339,13 @@ public function setAvailabilities(Collection $availabilities, ConnectionInterfac
/**
* Returns the number of related Availability objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Availability objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Availability objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countAvailabilities(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countAvailabilities(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collAvailabilitiesPartial && !$this->isNew();
if (null === $this->collAvailabilities || null !== $criteria || $partial) {
@@ -3277,8 +3374,8 @@ public function countAvailabilities(Criteria $criteria = null, $distinct = false
* Method called to associate a ChildAvailability object to this object
* through the ChildAvailability foreign key attribute.
*
- * @param ChildAvailability $l ChildAvailability
- * @return $this|\TechWilk\Rota\Event The current object (for fluent API support)
+ * @param ChildAvailability $l ChildAvailability
+ * @return $this The current object (for fluent API support)
*/
public function addAvailability(ChildAvailability $l)
{
@@ -3301,15 +3398,15 @@ public function addAvailability(ChildAvailability $l)
/**
* @param ChildAvailability $availability The ChildAvailability object to add.
*/
- protected function doAddAvailability(ChildAvailability $availability)
+ protected function doAddAvailability(ChildAvailability $availability): void
{
$this->collAvailabilities[]= $availability;
$availability->setEvent($this);
}
/**
- * @param ChildAvailability $availability The ChildAvailability object to remove.
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @param ChildAvailability $availability The ChildAvailability object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeAvailability(ChildAvailability $availability)
{
@@ -3339,12 +3436,13 @@ public function removeAvailability(ChildAvailability $availability)
* api reasonable. You can provide public methods for those you
* actually need in Event.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildAvailability[] List of ChildAvailability objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildAvailability objects
*/
- public function getAvailabilitiesJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getAvailabilitiesJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildAvailabilityQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -3356,6 +3454,8 @@ public function getAvailabilitiesJoinUser(Criteria $criteria = null, ConnectionI
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -3396,6 +3496,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -3404,9 +3506,10 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
if ($this->collComments) {
@@ -3434,6 +3537,7 @@ public function clearAllReferences($deep = false)
$this->aEventSubType = null;
$this->aLocation = null;
$this->aEventGroup = null;
+ return $this;
}
/**
@@ -3451,7 +3555,7 @@ public function __toString()
/**
* Mark the current object so that the update date doesn't get updated during next save
*
- * @return $this|ChildEvent The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function keepUpdateDateUnchanged()
{
@@ -3462,99 +3566,79 @@ public function keepUpdateDateUnchanged()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -3564,7 +3648,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -3584,17 +3668,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EventGroup.php b/generated-classes/TechWilk/Rota/Base/EventGroup.php
index 0166d17e..f356f7e7 100644
--- a/generated-classes/TechWilk/Rota/Base/EventGroup.php
+++ b/generated-classes/TechWilk/Rota/Base/EventGroup.php
@@ -34,19 +34,21 @@ abstract class EventGroup implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventGroupTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventGroupTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -55,14 +57,14 @@ abstract class EventGroup implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -96,6 +98,7 @@ abstract class EventGroup implements ActiveRecordInterface
/**
* @var ObjectCollection|ChildEvent[] Collection to store aggregation of ChildEvent objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildEvent objects.
*/
protected $collEvents;
protected $collEventsPartial;
@@ -104,13 +107,14 @@ abstract class EventGroup implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildEvent[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $eventsScheduledForDeletion = null;
@@ -120,7 +124,7 @@ abstract class EventGroup implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->name = '';
$this->archived = false;
@@ -138,9 +142,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -148,10 +152,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -160,7 +164,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -170,9 +174,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -181,45 +185,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -228,10 +230,10 @@ public function resetModified($col = null)
* obj is an instance of EventGroup, delegates to
* equals(EventGroup). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -253,7 +255,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -261,10 +263,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -272,15 +274,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -289,12 +291,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|EventGroup The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -304,13 +306,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -321,24 +323,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -346,7 +351,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -406,8 +411,8 @@ public function isArchived()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventGroup The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -421,13 +426,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [name] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventGroup The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setName($v)
{
@@ -441,13 +446,13 @@ public function setName($v)
}
return $this;
- } // setName()
+ }
/**
* Set the value of [description] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventGroup The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDescription($v)
{
@@ -461,7 +466,7 @@ public function setDescription($v)
}
return $this;
- } // setDescription()
+ }
/**
* Sets the value of the [archived] column.
@@ -470,8 +475,8 @@ public function setDescription($v)
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
- * @param boolean|integer|string $v The new value
- * @return $this|\TechWilk\Rota\EventGroup The current object (for fluent API support)
+ * @param bool|integer|string $v The new value
+ * @return $this The current object (for fluent API support)
*/
public function setArchived($v)
{
@@ -489,7 +494,7 @@ public function setArchived($v)
}
return $this;
- } // setArchived()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -497,21 +502,21 @@ public function setArchived($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->name !== '') {
- return false;
- }
+ if ($this->name !== '') {
+ return false;
+ }
- if ($this->archived !== false) {
- return false;
- }
+ if ($this->archived !== false) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -521,19 +526,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EventGroupTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -545,8 +551,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : EventGroupTableMap::translateFieldName('Archived', TableMap::TYPE_PHPNAME, $indexType)];
$this->archived = (null !== $col) ? (boolean) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -554,6 +560,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 4; // 4 = EventGroupTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\EventGroup'), 0, $e);
}
@@ -570,23 +577,24 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -614,19 +622,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
if ($deep) { // also de-associate any related objects?
$this->collEvents = null;
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see EventGroup::setDeleted()
* @see EventGroup::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -656,12 +665,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -706,12 +715,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -747,22 +756,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EventGroupTableMap::COL_ID] = true;
@@ -796,15 +806,19 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'name':
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
+
break;
case 'description':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+
break;
case 'archived':
$stmt->bindValue($identifier, (int) $this->archived, PDO::PARAM_INT);
+
break;
}
}
@@ -827,12 +841,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -843,14 +857,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventGroupTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -862,27 +876,26 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getName();
- break;
+
case 2:
return $this->getDescription();
- break;
+
case 3:
return $this->getArchived();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -892,28 +905,28 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['EventGroup'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['EventGroup'][$this->hashCode()] = true;
$keys = EventGroupTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getName(),
$keys[2] => $this->getDescription(),
$keys[3] => $this->getArchived(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -921,6 +934,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->collEvents) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'events';
@@ -942,30 +956,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\EventGroup
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventGroupTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\EventGroup
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -998,11 +1014,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EventGroupTableMap::getFieldNames($keyType);
@@ -1018,6 +1034,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[3], $arr)) {
$this->setArchived($arr[$keys[3]]);
}
+
+ return $this;
}
/**
@@ -1037,9 +1055,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\EventGroup The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1053,9 +1071,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EventGroupTableMap::DATABASE_NAME);
@@ -1079,13 +1097,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEventGroupQuery::create();
$criteria->add(EventGroupTableMap::COL_ID, $this->id);
@@ -1097,7 +1115,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1127,19 +1145,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1150,12 +1169,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\EventGroup (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\EventGroup (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setName($this->getName());
$copyObj->setDescription($this->getDescription());
@@ -1171,11 +1191,12 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->addEvent($relObj->copy($deepCopy));
}
}
+
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1187,11 +1208,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\EventGroup Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1207,12 +1228,12 @@ public function copy($deepCopy = false)
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
- * @param string $relationName The name of the relation to initialize
+ * @param string $relationName The name of the relation to initialize
* @return void
*/
- public function initRelation($relationName)
+ public function initRelation($relationName): void
{
- if ('Event' == $relationName) {
+ if ('Event' === $relationName) {
$this->initEvents();
return;
}
@@ -1224,18 +1245,22 @@ public function initRelation($relationName)
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addEvents()
+ * @return $this
+ * @see addEvents()
*/
public function clearEvents()
{
$this->collEvents = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collEvents collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialEvents($v = true)
+ public function resetPartialEvents($v = true): void
{
$this->collEventsPartial = $v;
}
@@ -1247,12 +1272,12 @@ public function resetPartialEvents($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initEvents($overrideExisting = true)
+ public function initEvents(bool $overrideExisting = true): void
{
if (null !== $this->collEvents && !$overrideExisting) {
return;
@@ -1273,18 +1298,28 @@ public function initEvents($overrideExisting = true)
* If this ChildEventGroup is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvents(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getEvents(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collEventsPartial && !$this->isNew();
- if (null === $this->collEvents || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collEvents) {
+ if (null === $this->collEvents || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initEvents();
+ if (null === $this->collEvents) {
+ $this->initEvents();
+ } else {
+ $collectionClassName = EventTableMap::getTableMap()->getCollectionClassName();
+
+ $collEvents = new $collectionClassName;
+ $collEvents->setModel('\TechWilk\Rota\Event');
+
+ return $collEvents;
+ }
} else {
$collEvents = ChildEventQuery::create(null, $criteria)
->filterByEventGroup($this)
@@ -1328,11 +1363,11 @@ public function getEvents(Criteria $criteria = null, ConnectionInterface $con =
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $events A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEventGroup The current object (for fluent API support)
+ * @param Collection $events A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setEvents(Collection $events, ConnectionInterface $con = null)
+ public function setEvents(Collection $events, ?ConnectionInterface $con = null)
{
/** @var ChildEvent[] $eventsToDelete */
$eventsToDelete = $this->getEvents(new Criteria(), $con)->diff($events);
@@ -1358,13 +1393,13 @@ public function setEvents(Collection $events, ConnectionInterface $con = null)
/**
* Returns the number of related Event objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Event objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Event objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countEvents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countEvents(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collEventsPartial && !$this->isNew();
if (null === $this->collEvents || null !== $criteria || $partial) {
@@ -1393,8 +1428,8 @@ public function countEvents(Criteria $criteria = null, $distinct = false, Connec
* Method called to associate a ChildEvent object to this object
* through the ChildEvent foreign key attribute.
*
- * @param ChildEvent $l ChildEvent
- * @return $this|\TechWilk\Rota\EventGroup The current object (for fluent API support)
+ * @param ChildEvent $l ChildEvent
+ * @return $this The current object (for fluent API support)
*/
public function addEvent(ChildEvent $l)
{
@@ -1417,15 +1452,15 @@ public function addEvent(ChildEvent $l)
/**
* @param ChildEvent $event The ChildEvent object to add.
*/
- protected function doAddEvent(ChildEvent $event)
+ protected function doAddEvent(ChildEvent $event): void
{
$this->collEvents[]= $event;
$event->setEventGroup($this);
}
/**
- * @param ChildEvent $event The ChildEvent object to remove.
- * @return $this|ChildEventGroup The current object (for fluent API support)
+ * @param ChildEvent $event The ChildEvent object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeEvent(ChildEvent $event)
{
@@ -1455,12 +1490,13 @@ public function removeEvent(ChildEvent $event)
* api reasonable. You can provide public methods for those you
* actually need in EventGroup.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -1480,12 +1516,13 @@ public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface
* api reasonable. You can provide public methods for those you
* actually need in EventGroup.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventType(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventType(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventType', $joinBehavior);
@@ -1505,12 +1542,13 @@ public function getEventsJoinEventType(Criteria $criteria = null, ConnectionInte
* api reasonable. You can provide public methods for those you
* actually need in EventGroup.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventSubType(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventSubType(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventSubType', $joinBehavior);
@@ -1530,12 +1568,13 @@ public function getEventsJoinEventSubType(Criteria $criteria = null, ConnectionI
* api reasonable. You can provide public methods for those you
* actually need in EventGroup.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinLocation(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('Location', $joinBehavior);
@@ -1547,6 +1586,8 @@ public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInter
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1560,6 +1601,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1568,9 +1611,10 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
if ($this->collEvents) {
@@ -1581,6 +1625,7 @@ public function clearAllReferences($deep = false)
} // if ($deep)
$this->collEvents = null;
+ return $this;
}
/**
@@ -1595,99 +1640,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1697,7 +1722,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1717,17 +1742,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EventGroupQuery.php b/generated-classes/TechWilk/Rota/Base/EventGroupQuery.php
index aa1baa36..9a9bb91a 100644
--- a/generated-classes/TechWilk/Rota/Base/EventGroupQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EventGroupQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\EventGroupTableMap;
/**
- * Base class that represents a query for the 'eventGroups' table.
- *
- *
+ * Base class that represents a query for the `eventGroups` table.
*
* @method ChildEventGroupQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEventGroupQuery orderByName($order = Criteria::ASC) Order by the name column
@@ -50,29 +49,36 @@
*
* @method \TechWilk\Rota\EventQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildEventGroup findOne(ConnectionInterface $con = null) Return the first ChildEventGroup matching the query
- * @method ChildEventGroup findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEventGroup matching the query, or a new ChildEventGroup object populated from the query conditions when no match is found
+ * @method ChildEventGroup|null findOne(?ConnectionInterface $con = null) Return the first ChildEventGroup matching the query
+ * @method ChildEventGroup findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEventGroup matching the query, or a new ChildEventGroup object populated from the query conditions when no match is found
*
- * @method ChildEventGroup findOneById(int $id) Return the first ChildEventGroup filtered by the id column
- * @method ChildEventGroup findOneByName(string $name) Return the first ChildEventGroup filtered by the name column
- * @method ChildEventGroup findOneByDescription(string $description) Return the first ChildEventGroup filtered by the description column
- * @method ChildEventGroup findOneByArchived(boolean $archived) Return the first ChildEventGroup filtered by the archived column *
-
- * @method ChildEventGroup requirePk($key, ConnectionInterface $con = null) Return the ChildEventGroup by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEventGroup requireOne(ConnectionInterface $con = null) Return the first ChildEventGroup matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventGroup|null findOneById(int $id) Return the first ChildEventGroup filtered by the id column
+ * @method ChildEventGroup|null findOneByName(string $name) Return the first ChildEventGroup filtered by the name column
+ * @method ChildEventGroup|null findOneByDescription(string $description) Return the first ChildEventGroup filtered by the description column
+ * @method ChildEventGroup|null findOneByArchived(boolean $archived) Return the first ChildEventGroup filtered by the archived column
+ *
+ * @method ChildEventGroup requirePk($key, ?ConnectionInterface $con = null) Return the ChildEventGroup by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventGroup requireOne(?ConnectionInterface $con = null) Return the first ChildEventGroup matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEventGroup requireOneById(int $id) Return the first ChildEventGroup filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventGroup requireOneByName(string $name) Return the first ChildEventGroup filtered by the name column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventGroup requireOneByDescription(string $description) Return the first ChildEventGroup filtered by the description column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventGroup requireOneByArchived(boolean $archived) Return the first ChildEventGroup filtered by the archived column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEventGroup[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEventGroup objects based on current ModelCriteria
- * @method ChildEventGroup[]|ObjectCollection findById(int $id) Return ChildEventGroup objects filtered by the id column
- * @method ChildEventGroup[]|ObjectCollection findByName(string $name) Return ChildEventGroup objects filtered by the name column
- * @method ChildEventGroup[]|ObjectCollection findByDescription(string $description) Return ChildEventGroup objects filtered by the description column
- * @method ChildEventGroup[]|ObjectCollection findByArchived(boolean $archived) Return ChildEventGroup objects filtered by the archived column
- * @method ChildEventGroup[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEventGroup[]|Collection find(?ConnectionInterface $con = null) Return ChildEventGroup objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEventGroup objects based on current ModelCriteria
+ *
+ * @method ChildEventGroup[]|Collection findById(int|array $id) Return ChildEventGroup objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildEventGroup objects filtered by the id column
+ * @method ChildEventGroup[]|Collection findByName(string|array $name) Return ChildEventGroup objects filtered by the name column
+ * @psalm-method Collection&\Traversable findByName(string|array $name) Return ChildEventGroup objects filtered by the name column
+ * @method ChildEventGroup[]|Collection findByDescription(string|array $description) Return ChildEventGroup objects filtered by the description column
+ * @psalm-method Collection&\Traversable findByDescription(string|array $description) Return ChildEventGroup objects filtered by the description column
+ * @method ChildEventGroup[]|Collection findByArchived(boolean|array $archived) Return ChildEventGroup objects filtered by the archived column
+ * @psalm-method Collection&\Traversable findByArchived(boolean|array $archived) Return ChildEventGroup objects filtered by the archived column
*
+ * @method ChildEventGroup[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class EventGroupQuery extends ModelCriteria
{
@@ -81,9 +87,9 @@ abstract class EventGroupQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\EventGroupQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\EventGroup', $modelAlias = null)
{
@@ -93,12 +99,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildEventGroupQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildEventGroupQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildEventGroupQuery) {
return $criteria;
@@ -128,7 +134,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildEventGroup|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -160,8 +166,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -193,8 +199,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildEventGroup|array|mixed the result, formatted by the current formatter
*/
@@ -214,12 +220,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -236,25 +242,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(EventGroupTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(EventGroupTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(EventGroupTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(EventGroupTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -267,15 +279,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -295,7 +307,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventGroupTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(EventGroupTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -305,14 +319,15 @@ public function filterById($id = null, $comparison = null)
*
* $query->filterByName('fooValue'); // WHERE name = 'fooValue'
* $query->filterByName('%fooValue%', Criteria::LIKE); // WHERE name LIKE '%fooValue%'
+ * $query->filterByName(['foo', 'bar']); // WHERE name IN ('foo', 'bar')
*
*
- * @param string $name The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $name The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByName($name = null, $comparison = null)
+ public function filterByName($name = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($name)) {
@@ -320,7 +335,9 @@ public function filterByName($name = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventGroupTableMap::COL_NAME, $name, $comparison);
+ $this->addUsingAlias(EventGroupTableMap::COL_NAME, $name, $comparison);
+
+ return $this;
}
/**
@@ -330,14 +347,15 @@ public function filterByName($name = null, $comparison = null)
*
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%', Criteria::LIKE); // WHERE description LIKE '%fooValue%'
+ * $query->filterByDescription(['foo', 'bar']); // WHERE description IN ('foo', 'bar')
*
*
- * @param string $description The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $description The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByDescription($description = null, $comparison = null)
+ public function filterByDescription($description = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
@@ -345,7 +363,9 @@ public function filterByDescription($description = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventGroupTableMap::COL_DESCRIPTION, $description, $comparison);
+ $this->addUsingAlias(EventGroupTableMap::COL_DESCRIPTION, $description, $comparison);
+
+ return $this;
}
/**
@@ -357,42 +377,48 @@ public function filterByDescription($description = null, $comparison = null)
* $query->filterByArchived('yes'); // WHERE archived = true
*
*
- * @param boolean|string $archived The value to use as filter.
+ * @param bool|string $archived The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByArchived($archived = null, $comparison = null)
+ public function filterByArchived($archived = null, ?string $comparison = null)
{
if (is_string($archived)) {
- $archived = in_array(strtolower($archived), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
+ $archived = in_array(strtolower($archived), array('false', 'off', '-', 'no', 'n', '0', ''), true) ? false : true;
}
- return $this->addUsingAlias(EventGroupTableMap::COL_ARCHIVED, $archived, $comparison);
+ $this->addUsingAlias(EventGroupTableMap::COL_ARCHIVED, $archived, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\Event object
*
* @param \TechWilk\Rota\Event|ObjectCollection $event the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEvent($event, $comparison = null)
+ public function filterByEvent($event, ?string $comparison = null)
{
if ($event instanceof \TechWilk\Rota\Event) {
- return $this
+ $this
->addUsingAlias(EventGroupTableMap::COL_ID, $event->getEventGroupId(), $comparison);
+
+ return $this;
} elseif ($event instanceof ObjectCollection) {
- return $this
+ $this
->useEventQuery()
->filterByPrimaryKeys($event->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterByEvent() only accepts arguments of type \TechWilk\Rota\Event or Collection');
}
@@ -401,12 +427,12 @@ public function filterByEvent($event, $comparison = null)
/**
* Adds a JOIN clause to the query using the Event relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEvent($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinEvent(?string $relationAlias = null, ?string $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Event');
@@ -435,9 +461,9 @@ public function joinEvent($relationAlias = null, $joinType = Criteria::LEFT_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventQuery A secondary query class using the current class as primary query
*/
@@ -448,12 +474,108 @@ public function useEventQuery($relationAlias = null, $joinType = Criteria::LEFT_
->useQuery($relationAlias ? $relationAlias : 'Event', '\TechWilk\Rota\EventQuery');
}
+ /**
+ * Use the Event relation Event object
+ *
+ * @param callable(\TechWilk\Rota\EventQuery):\TechWilk\Rota\EventQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::LEFT_JOIN
+ ) {
+ $relatedQuery = $this->useEventQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Event table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the EXISTS statement
+ */
+ public function useEventExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT EXISTS query.
+ *
+ * @see useEventExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the IN statement
+ */
+ public function useInEventQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT IN query.
+ *
+ * @see useEventInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildEventGroup $eventGroup Object to remove from the list of results
+ * @param ChildEventGroup $eventGroup Object to remove from the list of results
*
- * @return $this|ChildEventGroupQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($eventGroup = null)
{
@@ -470,7 +592,7 @@ public function prune($eventGroup = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventGroupTableMap::DATABASE_NAME);
@@ -495,12 +617,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventGroupTableMap::DATABASE_NAME);
@@ -524,4 +646,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // EventGroupQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/EventPerson.php b/generated-classes/TechWilk/Rota/Base/EventPerson.php
index 2eaafb99..aea14e7d 100644
--- a/generated-classes/TechWilk/Rota/Base/EventPerson.php
+++ b/generated-classes/TechWilk/Rota/Base/EventPerson.php
@@ -38,19 +38,21 @@ abstract class EventPerson implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventPersonTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventPersonTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -59,14 +61,14 @@ abstract class EventPerson implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -103,7 +105,7 @@ abstract class EventPerson implements ActiveRecordInterface
* The value for the removed field.
*
* Note: this column has a database default value of: 0
- * @var int
+ * @var int|null
*/
protected $removed;
@@ -119,6 +121,7 @@ abstract class EventPerson implements ActiveRecordInterface
/**
* @var ObjectCollection|ChildSwap[] Collection to store aggregation of ChildSwap objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildSwap objects.
*/
protected $collSwaps;
protected $collSwapsPartial;
@@ -127,13 +130,14 @@ abstract class EventPerson implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildSwap[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $swapsScheduledForDeletion = null;
@@ -143,7 +147,7 @@ abstract class EventPerson implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->eventid = 0;
$this->userroleid = 0;
@@ -163,9 +167,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -173,10 +177,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -185,7 +189,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -195,9 +199,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -206,45 +210,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -253,10 +255,10 @@ public function resetModified($col = null)
* obj is an instance of EventPerson, delegates to
* equals(EventPerson). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -278,7 +280,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -286,10 +288,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -297,15 +299,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -314,12 +316,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|EventPerson The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -329,13 +331,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -346,24 +348,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -371,7 +376,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -421,7 +426,7 @@ public function getNotified()
/**
* Get the [removed] column value.
*
- * @return int
+ * @return int|null
*/
public function getRemoved()
{
@@ -431,8 +436,8 @@ public function getRemoved()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -446,13 +451,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [eventid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setEventId($v)
{
@@ -470,13 +475,13 @@ public function setEventId($v)
}
return $this;
- } // setEventId()
+ }
/**
* Set the value of [userroleid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setUserRoleId($v)
{
@@ -494,13 +499,13 @@ public function setUserRoleId($v)
}
return $this;
- } // setUserRoleId()
+ }
/**
* Set the value of [notified] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setNotified($v)
{
@@ -514,13 +519,13 @@ public function setNotified($v)
}
return $this;
- } // setNotified()
+ }
/**
* Set the value of [removed] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setRemoved($v)
{
@@ -534,7 +539,7 @@ public function setRemoved($v)
}
return $this;
- } // setRemoved()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -542,29 +547,29 @@ public function setRemoved($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->eventid !== 0) {
- return false;
- }
+ if ($this->eventid !== 0) {
+ return false;
+ }
- if ($this->userroleid !== 0) {
- return false;
- }
+ if ($this->userroleid !== 0) {
+ return false;
+ }
- if ($this->notified !== 0) {
- return false;
- }
+ if ($this->notified !== 0) {
+ return false;
+ }
- if ($this->removed !== 0) {
- return false;
- }
+ if ($this->removed !== 0) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -574,19 +579,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EventPersonTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -601,8 +607,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : EventPersonTableMap::translateFieldName('Removed', TableMap::TYPE_PHPNAME, $indexType)];
$this->removed = (null !== $col) ? (int) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -610,6 +616,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 5; // 5 = EventPersonTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\EventPerson'), 0, $e);
}
@@ -626,9 +633,10 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aEvent !== null && $this->eventid !== $this->aEvent->getId()) {
$this->aEvent = null;
@@ -636,19 +644,19 @@ public function ensureConsistency()
if ($this->aUserRole !== null && $this->userroleid !== $this->aUserRole->getId()) {
$this->aUserRole = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -678,19 +686,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
$this->aEvent = null;
$this->aUserRole = null;
$this->collSwaps = null;
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see EventPerson::setDeleted()
* @see EventPerson::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -720,12 +729,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -770,12 +779,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -829,22 +838,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EventPersonTableMap::COL_ID] = true;
@@ -881,18 +891,23 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'eventId':
$stmt->bindValue($identifier, $this->eventid, PDO::PARAM_INT);
+
break;
case 'userRoleId':
$stmt->bindValue($identifier, $this->userroleid, PDO::PARAM_INT);
+
break;
case 'notified':
$stmt->bindValue($identifier, $this->notified, PDO::PARAM_INT);
+
break;
case 'removed':
$stmt->bindValue($identifier, $this->removed, PDO::PARAM_INT);
+
break;
}
}
@@ -915,12 +930,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -931,14 +946,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventPersonTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -950,30 +965,29 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getEventId();
- break;
+
case 2:
return $this->getUserRoleId();
- break;
+
case 3:
return $this->getNotified();
- break;
+
case 4:
return $this->getRemoved();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -983,29 +997,29 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['EventPerson'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['EventPerson'][$this->hashCode()] = true;
$keys = EventPersonTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getEventId(),
$keys[2] => $this->getUserRoleId(),
$keys[3] => $this->getNotified(),
$keys[4] => $this->getRemoved(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -1013,6 +1027,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aEvent) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'event';
@@ -1024,9 +1039,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'Event';
}
- $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aEvent->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aUserRole) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'userRole';
@@ -1038,9 +1054,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'UserRole';
}
- $result[$key] = $this->aUserRole->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aUserRole->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->collSwaps) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'swaps';
@@ -1062,30 +1079,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\EventPerson
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventPersonTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\EventPerson
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1121,11 +1140,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EventPersonTableMap::getFieldNames($keyType);
@@ -1144,6 +1163,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[4], $arr)) {
$this->setRemoved($arr[$keys[4]]);
}
+
+ return $this;
}
/**
@@ -1163,9 +1184,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\EventPerson The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1179,9 +1200,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EventPersonTableMap::DATABASE_NAME);
@@ -1208,13 +1229,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEventPersonQuery::create();
$criteria->add(EventPersonTableMap::COL_ID, $this->id);
@@ -1226,7 +1247,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1256,19 +1277,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1279,12 +1301,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\EventPerson (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\EventPerson (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setEventId($this->getEventId());
$copyObj->setUserRoleId($this->getUserRoleId());
@@ -1301,11 +1324,12 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->addSwap($relObj->copy($deepCopy));
}
}
+
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1317,11 +1341,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\EventPerson Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1334,9 +1358,9 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildEvent object.
*
- * @param ChildEvent $v
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildEvent $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setEvent(ChildEvent $v = null)
{
@@ -1362,11 +1386,11 @@ public function setEvent(ChildEvent $v = null)
/**
* Get the associated ChildEvent object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildEvent The associated ChildEvent object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvent(ConnectionInterface $con = null)
+ public function getEvent(?ConnectionInterface $con = null)
{
if ($this->aEvent === null && ($this->eventid != 0)) {
$this->aEvent = ChildEventQuery::create()->findPk($this->eventid, $con);
@@ -1385,9 +1409,9 @@ public function getEvent(ConnectionInterface $con = null)
/**
* Declares an association between this object and a ChildUserRole object.
*
- * @param ChildUserRole $v
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildUserRole $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setUserRole(ChildUserRole $v = null)
{
@@ -1413,11 +1437,11 @@ public function setUserRole(ChildUserRole $v = null)
/**
* Get the associated ChildUserRole object
*
- * @param ConnectionInterface $con Optional Connection object.
+ * @param ConnectionInterface $con Optional Connection object.
* @return ChildUserRole The associated ChildUserRole object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getUserRole(ConnectionInterface $con = null)
+ public function getUserRole(?ConnectionInterface $con = null)
{
if ($this->aUserRole === null && ($this->userroleid != 0)) {
$this->aUserRole = ChildUserRoleQuery::create()->findPk($this->userroleid, $con);
@@ -1439,12 +1463,12 @@ public function getUserRole(ConnectionInterface $con = null)
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
- * @param string $relationName The name of the relation to initialize
+ * @param string $relationName The name of the relation to initialize
* @return void
*/
- public function initRelation($relationName)
+ public function initRelation($relationName): void
{
- if ('Swap' == $relationName) {
+ if ('Swap' === $relationName) {
$this->initSwaps();
return;
}
@@ -1456,18 +1480,22 @@ public function initRelation($relationName)
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addSwaps()
+ * @return $this
+ * @see addSwaps()
*/
public function clearSwaps()
{
$this->collSwaps = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collSwaps collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialSwaps($v = true)
+ public function resetPartialSwaps($v = true): void
{
$this->collSwapsPartial = $v;
}
@@ -1479,12 +1507,12 @@ public function resetPartialSwaps($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initSwaps($overrideExisting = true)
+ public function initSwaps(bool $overrideExisting = true): void
{
if (null !== $this->collSwaps && !$overrideExisting) {
return;
@@ -1505,18 +1533,28 @@ public function initSwaps($overrideExisting = true)
* If this ChildEventPerson is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildSwap[] List of ChildSwap objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildSwap objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getSwaps(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getSwaps(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collSwapsPartial && !$this->isNew();
- if (null === $this->collSwaps || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collSwaps) {
+ if (null === $this->collSwaps || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initSwaps();
+ if (null === $this->collSwaps) {
+ $this->initSwaps();
+ } else {
+ $collectionClassName = SwapTableMap::getTableMap()->getCollectionClassName();
+
+ $collSwaps = new $collectionClassName;
+ $collSwaps->setModel('\TechWilk\Rota\Swap');
+
+ return $collSwaps;
+ }
} else {
$collSwaps = ChildSwapQuery::create(null, $criteria)
->filterByEventPerson($this)
@@ -1560,11 +1598,11 @@ public function getSwaps(Criteria $criteria = null, ConnectionInterface $con = n
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $swaps A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEventPerson The current object (for fluent API support)
+ * @param Collection $swaps A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setSwaps(Collection $swaps, ConnectionInterface $con = null)
+ public function setSwaps(Collection $swaps, ?ConnectionInterface $con = null)
{
/** @var ChildSwap[] $swapsToDelete */
$swapsToDelete = $this->getSwaps(new Criteria(), $con)->diff($swaps);
@@ -1590,13 +1628,13 @@ public function setSwaps(Collection $swaps, ConnectionInterface $con = null)
/**
* Returns the number of related Swap objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Swap objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Swap objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countSwaps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countSwaps(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collSwapsPartial && !$this->isNew();
if (null === $this->collSwaps || null !== $criteria || $partial) {
@@ -1625,8 +1663,8 @@ public function countSwaps(Criteria $criteria = null, $distinct = false, Connect
* Method called to associate a ChildSwap object to this object
* through the ChildSwap foreign key attribute.
*
- * @param ChildSwap $l ChildSwap
- * @return $this|\TechWilk\Rota\EventPerson The current object (for fluent API support)
+ * @param ChildSwap $l ChildSwap
+ * @return $this The current object (for fluent API support)
*/
public function addSwap(ChildSwap $l)
{
@@ -1649,15 +1687,15 @@ public function addSwap(ChildSwap $l)
/**
* @param ChildSwap $swap The ChildSwap object to add.
*/
- protected function doAddSwap(ChildSwap $swap)
+ protected function doAddSwap(ChildSwap $swap): void
{
$this->collSwaps[]= $swap;
$swap->setEventPerson($this);
}
/**
- * @param ChildSwap $swap The ChildSwap object to remove.
- * @return $this|ChildEventPerson The current object (for fluent API support)
+ * @param ChildSwap $swap The ChildSwap object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeSwap(ChildSwap $swap)
{
@@ -1687,12 +1725,13 @@ public function removeSwap(ChildSwap $swap)
* api reasonable. You can provide public methods for those you
* actually need in EventPerson.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildSwap[] List of ChildSwap objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildSwap objects
*/
- public function getSwapsJoinOldUserRole(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getSwapsJoinOldUserRole(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildSwapQuery::create(null, $criteria);
$query->joinWith('OldUserRole', $joinBehavior);
@@ -1712,12 +1751,13 @@ public function getSwapsJoinOldUserRole(Criteria $criteria = null, ConnectionInt
* api reasonable. You can provide public methods for those you
* actually need in EventPerson.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildSwap[] List of ChildSwap objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildSwap objects
*/
- public function getSwapsJoinNewUserRole(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getSwapsJoinNewUserRole(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildSwapQuery::create(null, $criteria);
$query->joinWith('NewUserRole', $joinBehavior);
@@ -1737,12 +1777,13 @@ public function getSwapsJoinNewUserRole(Criteria $criteria = null, ConnectionInt
* api reasonable. You can provide public methods for those you
* actually need in EventPerson.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildSwap[] List of ChildSwap objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildSwap objects
*/
- public function getSwapsJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getSwapsJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildSwapQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -1754,6 +1795,8 @@ public function getSwapsJoinUser(Criteria $criteria = null, ConnectionInterface
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1774,6 +1817,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1782,9 +1827,10 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
if ($this->collSwaps) {
@@ -1797,6 +1843,7 @@ public function clearAllReferences($deep = false)
$this->collSwaps = null;
$this->aEvent = null;
$this->aUserRole = null;
+ return $this;
}
/**
@@ -1811,99 +1858,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1913,7 +1940,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1933,17 +1960,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EventPersonQuery.php b/generated-classes/TechWilk/Rota/Base/EventPersonQuery.php
index 8ccea472..507758a9 100644
--- a/generated-classes/TechWilk/Rota/Base/EventPersonQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EventPersonQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\EventPersonTableMap;
/**
- * Base class that represents a query for the 'eventPeople' table.
- *
- *
+ * Base class that represents a query for the `eventPeople` table.
*
* @method ChildEventPersonQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEventPersonQuery orderByEventId($order = Criteria::ASC) Order by the eventId column
@@ -72,17 +71,17 @@
*
* @method \TechWilk\Rota\EventQuery|\TechWilk\Rota\UserRoleQuery|\TechWilk\Rota\SwapQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildEventPerson findOne(ConnectionInterface $con = null) Return the first ChildEventPerson matching the query
- * @method ChildEventPerson findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEventPerson matching the query, or a new ChildEventPerson object populated from the query conditions when no match is found
+ * @method ChildEventPerson|null findOne(?ConnectionInterface $con = null) Return the first ChildEventPerson matching the query
+ * @method ChildEventPerson findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEventPerson matching the query, or a new ChildEventPerson object populated from the query conditions when no match is found
+ *
+ * @method ChildEventPerson|null findOneById(int $id) Return the first ChildEventPerson filtered by the id column
+ * @method ChildEventPerson|null findOneByEventId(int $eventId) Return the first ChildEventPerson filtered by the eventId column
+ * @method ChildEventPerson|null findOneByUserRoleId(int $userRoleId) Return the first ChildEventPerson filtered by the userRoleId column
+ * @method ChildEventPerson|null findOneByNotified(int $notified) Return the first ChildEventPerson filtered by the notified column
+ * @method ChildEventPerson|null findOneByRemoved(int $removed) Return the first ChildEventPerson filtered by the removed column
*
- * @method ChildEventPerson findOneById(int $id) Return the first ChildEventPerson filtered by the id column
- * @method ChildEventPerson findOneByEventId(int $eventId) Return the first ChildEventPerson filtered by the eventId column
- * @method ChildEventPerson findOneByUserRoleId(int $userRoleId) Return the first ChildEventPerson filtered by the userRoleId column
- * @method ChildEventPerson findOneByNotified(int $notified) Return the first ChildEventPerson filtered by the notified column
- * @method ChildEventPerson findOneByRemoved(int $removed) Return the first ChildEventPerson filtered by the removed column *
-
- * @method ChildEventPerson requirePk($key, ConnectionInterface $con = null) Return the ChildEventPerson by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEventPerson requireOne(ConnectionInterface $con = null) Return the first ChildEventPerson matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventPerson requirePk($key, ?ConnectionInterface $con = null) Return the ChildEventPerson by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventPerson requireOne(?ConnectionInterface $con = null) Return the first ChildEventPerson matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEventPerson requireOneById(int $id) Return the first ChildEventPerson filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventPerson requireOneByEventId(int $eventId) Return the first ChildEventPerson filtered by the eventId column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -90,14 +89,22 @@
* @method ChildEventPerson requireOneByNotified(int $notified) Return the first ChildEventPerson filtered by the notified column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventPerson requireOneByRemoved(int $removed) Return the first ChildEventPerson filtered by the removed column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEventPerson[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEventPerson objects based on current ModelCriteria
- * @method ChildEventPerson[]|ObjectCollection findById(int $id) Return ChildEventPerson objects filtered by the id column
- * @method ChildEventPerson[]|ObjectCollection findByEventId(int $eventId) Return ChildEventPerson objects filtered by the eventId column
- * @method ChildEventPerson[]|ObjectCollection findByUserRoleId(int $userRoleId) Return ChildEventPerson objects filtered by the userRoleId column
- * @method ChildEventPerson[]|ObjectCollection findByNotified(int $notified) Return ChildEventPerson objects filtered by the notified column
- * @method ChildEventPerson[]|ObjectCollection findByRemoved(int $removed) Return ChildEventPerson objects filtered by the removed column
- * @method ChildEventPerson[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEventPerson[]|Collection find(?ConnectionInterface $con = null) Return ChildEventPerson objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEventPerson objects based on current ModelCriteria
*
+ * @method ChildEventPerson[]|Collection findById(int|array $id) Return ChildEventPerson objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildEventPerson objects filtered by the id column
+ * @method ChildEventPerson[]|Collection findByEventId(int|array $eventId) Return ChildEventPerson objects filtered by the eventId column
+ * @psalm-method Collection&\Traversable findByEventId(int|array $eventId) Return ChildEventPerson objects filtered by the eventId column
+ * @method ChildEventPerson[]|Collection findByUserRoleId(int|array $userRoleId) Return ChildEventPerson objects filtered by the userRoleId column
+ * @psalm-method Collection&\Traversable findByUserRoleId(int|array $userRoleId) Return ChildEventPerson objects filtered by the userRoleId column
+ * @method ChildEventPerson[]|Collection findByNotified(int|array $notified) Return ChildEventPerson objects filtered by the notified column
+ * @psalm-method Collection&\Traversable findByNotified(int|array $notified) Return ChildEventPerson objects filtered by the notified column
+ * @method ChildEventPerson[]|Collection findByRemoved(int|array $removed) Return ChildEventPerson objects filtered by the removed column
+ * @psalm-method Collection&\Traversable findByRemoved(int|array $removed) Return ChildEventPerson objects filtered by the removed column
+ *
+ * @method ChildEventPerson[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class EventPersonQuery extends ModelCriteria
{
@@ -106,9 +113,9 @@ abstract class EventPersonQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\EventPersonQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\EventPerson', $modelAlias = null)
{
@@ -118,12 +125,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildEventPersonQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildEventPersonQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildEventPersonQuery) {
return $criteria;
@@ -153,7 +160,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildEventPerson|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -185,8 +192,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -218,8 +225,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildEventPerson|array|mixed the result, formatted by the current formatter
*/
@@ -239,12 +246,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -261,25 +268,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(EventPersonTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(EventPersonTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(EventPersonTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(EventPersonTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -292,15 +305,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -320,7 +333,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventPersonTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(EventPersonTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -335,15 +350,15 @@ public function filterById($id = null, $comparison = null)
*
* @see filterByEvent()
*
- * @param mixed $eventId The value to use as filter.
+ * @param mixed $eventId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventId($eventId = null, $comparison = null)
+ public function filterByEventId($eventId = null, ?string $comparison = null)
{
if (is_array($eventId)) {
$useMinMax = false;
@@ -363,7 +378,9 @@ public function filterByEventId($eventId = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventPersonTableMap::COL_EVENTID, $eventId, $comparison);
+ $this->addUsingAlias(EventPersonTableMap::COL_EVENTID, $eventId, $comparison);
+
+ return $this;
}
/**
@@ -378,15 +395,15 @@ public function filterByEventId($eventId = null, $comparison = null)
*
* @see filterByUserRole()
*
- * @param mixed $userRoleId The value to use as filter.
+ * @param mixed $userRoleId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUserRoleId($userRoleId = null, $comparison = null)
+ public function filterByUserRoleId($userRoleId = null, ?string $comparison = null)
{
if (is_array($userRoleId)) {
$useMinMax = false;
@@ -406,7 +423,9 @@ public function filterByUserRoleId($userRoleId = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventPersonTableMap::COL_USERROLEID, $userRoleId, $comparison);
+ $this->addUsingAlias(EventPersonTableMap::COL_USERROLEID, $userRoleId, $comparison);
+
+ return $this;
}
/**
@@ -419,15 +438,15 @@ public function filterByUserRoleId($userRoleId = null, $comparison = null)
* $query->filterByNotified(array('min' => 12)); // WHERE notified > 12
*
*
- * @param mixed $notified The value to use as filter.
+ * @param mixed $notified The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByNotified($notified = null, $comparison = null)
+ public function filterByNotified($notified = null, ?string $comparison = null)
{
if (is_array($notified)) {
$useMinMax = false;
@@ -447,7 +466,9 @@ public function filterByNotified($notified = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventPersonTableMap::COL_NOTIFIED, $notified, $comparison);
+ $this->addUsingAlias(EventPersonTableMap::COL_NOTIFIED, $notified, $comparison);
+
+ return $this;
}
/**
@@ -460,15 +481,15 @@ public function filterByNotified($notified = null, $comparison = null)
* $query->filterByRemoved(array('min' => 12)); // WHERE removed > 12
*
*
- * @param mixed $removed The value to use as filter.
+ * @param mixed $removed The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRemoved($removed = null, $comparison = null)
+ public function filterByRemoved($removed = null, ?string $comparison = null)
{
if (is_array($removed)) {
$useMinMax = false;
@@ -488,20 +509,22 @@ public function filterByRemoved($removed = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventPersonTableMap::COL_REMOVED, $removed, $comparison);
+ $this->addUsingAlias(EventPersonTableMap::COL_REMOVED, $removed, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\Event object
*
* @param \TechWilk\Rota\Event|ObjectCollection $event The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEvent($event, $comparison = null)
+ public function filterByEvent($event, ?string $comparison = null)
{
if ($event instanceof \TechWilk\Rota\Event) {
return $this
@@ -511,8 +534,10 @@ public function filterByEvent($event, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventPersonTableMap::COL_EVENTID, $event->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEvent() only accepts arguments of type \TechWilk\Rota\Event or Collection');
}
@@ -521,12 +546,12 @@ public function filterByEvent($event, $comparison = null)
/**
* Adds a JOIN clause to the query using the Event relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEvent(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Event');
@@ -555,9 +580,9 @@ public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOI
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventQuery A secondary query class using the current class as primary query
*/
@@ -568,17 +593,113 @@ public function useEventQuery($relationAlias = null, $joinType = Criteria::INNER
->useQuery($relationAlias ? $relationAlias : 'Event', '\TechWilk\Rota\EventQuery');
}
+ /**
+ * Use the Event relation Event object
+ *
+ * @param callable(\TechWilk\Rota\EventQuery):\TechWilk\Rota\EventQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Event table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the EXISTS statement
+ */
+ public function useEventExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT EXISTS query.
+ *
+ * @see useEventExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the IN statement
+ */
+ public function useInEventQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT IN query.
+ *
+ * @see useEventInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\UserRole object
*
* @param \TechWilk\Rota\UserRole|ObjectCollection $userRole The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUserRole($userRole, $comparison = null)
+ public function filterByUserRole($userRole, ?string $comparison = null)
{
if ($userRole instanceof \TechWilk\Rota\UserRole) {
return $this
@@ -588,8 +709,10 @@ public function filterByUserRole($userRole, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventPersonTableMap::COL_USERROLEID, $userRole->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByUserRole() only accepts arguments of type \TechWilk\Rota\UserRole or Collection');
}
@@ -598,12 +721,12 @@ public function filterByUserRole($userRole, $comparison = null)
/**
* Adds a JOIN clause to the query using the UserRole relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinUserRole($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinUserRole(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('UserRole');
@@ -632,9 +755,9 @@ public function joinUserRole($relationAlias = null, $joinType = Criteria::INNER_
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\UserRoleQuery A secondary query class using the current class as primary query
*/
@@ -645,24 +768,124 @@ public function useUserRoleQuery($relationAlias = null, $joinType = Criteria::IN
->useQuery($relationAlias ? $relationAlias : 'UserRole', '\TechWilk\Rota\UserRoleQuery');
}
+ /**
+ * Use the UserRole relation UserRole object
+ *
+ * @param callable(\TechWilk\Rota\UserRoleQuery):\TechWilk\Rota\UserRoleQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withUserRoleQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useUserRoleQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to UserRole table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\UserRoleQuery The inner query object of the EXISTS statement
+ */
+ public function useUserRoleExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\UserRoleQuery */
+ $q = $this->useExistsQuery('UserRole', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to UserRole table for a NOT EXISTS query.
+ *
+ * @see useUserRoleExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserRoleQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useUserRoleNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserRoleQuery */
+ $q = $this->useExistsQuery('UserRole', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to UserRole table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\UserRoleQuery The inner query object of the IN statement
+ */
+ public function useInUserRoleQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\UserRoleQuery */
+ $q = $this->useInQuery('UserRole', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to UserRole table for a NOT IN query.
+ *
+ * @see useUserRoleInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserRoleQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInUserRoleQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserRoleQuery */
+ $q = $this->useInQuery('UserRole', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\Swap object
*
* @param \TechWilk\Rota\Swap|ObjectCollection $swap the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterBySwap($swap, $comparison = null)
+ public function filterBySwap($swap, ?string $comparison = null)
{
if ($swap instanceof \TechWilk\Rota\Swap) {
- return $this
+ $this
->addUsingAlias(EventPersonTableMap::COL_ID, $swap->getEventPersonId(), $comparison);
+
+ return $this;
} elseif ($swap instanceof ObjectCollection) {
- return $this
+ $this
->useSwapQuery()
->filterByPrimaryKeys($swap->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterBySwap() only accepts arguments of type \TechWilk\Rota\Swap or Collection');
}
@@ -671,12 +894,12 @@ public function filterBySwap($swap, $comparison = null)
/**
* Adds a JOIN clause to the query using the Swap relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinSwap($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinSwap(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Swap');
@@ -705,9 +928,9 @@ public function joinSwap($relationAlias = null, $joinType = Criteria::INNER_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\SwapQuery A secondary query class using the current class as primary query
*/
@@ -718,12 +941,108 @@ public function useSwapQuery($relationAlias = null, $joinType = Criteria::INNER_
->useQuery($relationAlias ? $relationAlias : 'Swap', '\TechWilk\Rota\SwapQuery');
}
+ /**
+ * Use the Swap relation Swap object
+ *
+ * @param callable(\TechWilk\Rota\SwapQuery):\TechWilk\Rota\SwapQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withSwapQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useSwapQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Swap table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\SwapQuery The inner query object of the EXISTS statement
+ */
+ public function useSwapExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\SwapQuery */
+ $q = $this->useExistsQuery('Swap', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Swap table for a NOT EXISTS query.
+ *
+ * @see useSwapExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\SwapQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useSwapNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\SwapQuery */
+ $q = $this->useExistsQuery('Swap', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Swap table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\SwapQuery The inner query object of the IN statement
+ */
+ public function useInSwapQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\SwapQuery */
+ $q = $this->useInQuery('Swap', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Swap table for a NOT IN query.
+ *
+ * @see useSwapInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\SwapQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInSwapQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\SwapQuery */
+ $q = $this->useInQuery('Swap', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildEventPerson $eventPerson Object to remove from the list of results
+ * @param ChildEventPerson $eventPerson Object to remove from the list of results
*
- * @return $this|ChildEventPersonQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($eventPerson = null)
{
@@ -740,7 +1059,7 @@ public function prune($eventPerson = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventPersonTableMap::DATABASE_NAME);
@@ -765,12 +1084,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventPersonTableMap::DATABASE_NAME);
@@ -794,4 +1113,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // EventPersonQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/EventQuery.php b/generated-classes/TechWilk/Rota/Base/EventQuery.php
index ebf6804a..2011c6e0 100644
--- a/generated-classes/TechWilk/Rota/Base/EventQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EventQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\EventTableMap;
/**
- * Base class that represents a query for the 'events' table.
- *
- *
+ * Base class that represents a query for the `events` table.
*
* @method ChildEventQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEventQuery orderByDate($order = Criteria::ASC) Order by the date column
@@ -144,28 +143,28 @@
*
* @method \TechWilk\Rota\UserQuery|\TechWilk\Rota\EventTypeQuery|\TechWilk\Rota\EventSubTypeQuery|\TechWilk\Rota\LocationQuery|\TechWilk\Rota\EventGroupQuery|\TechWilk\Rota\CommentQuery|\TechWilk\Rota\EventPersonQuery|\TechWilk\Rota\AvailabilityQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildEvent findOne(ConnectionInterface $con = null) Return the first ChildEvent matching the query
- * @method ChildEvent findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEvent matching the query, or a new ChildEvent object populated from the query conditions when no match is found
+ * @method ChildEvent|null findOne(?ConnectionInterface $con = null) Return the first ChildEvent matching the query
+ * @method ChildEvent findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEvent matching the query, or a new ChildEvent object populated from the query conditions when no match is found
*
- * @method ChildEvent findOneById(int $id) Return the first ChildEvent filtered by the id column
- * @method ChildEvent findOneByDate(string $date) Return the first ChildEvent filtered by the date column
- * @method ChildEvent findOneByName(string $name) Return the first ChildEvent filtered by the name column
- * @method ChildEvent findOneByCreatedBy(int $createdBy) Return the first ChildEvent filtered by the createdBy column
- * @method ChildEvent findOneByRehearsalDate(string $rehearsalDate) Return the first ChildEvent filtered by the rehearsalDate column
- * @method ChildEvent findOneByEventTypeId(int $type) Return the first ChildEvent filtered by the type column
- * @method ChildEvent findOneByEventSubTypeId(int $subType) Return the first ChildEvent filtered by the subType column
- * @method ChildEvent findOneByLocationId(int $location) Return the first ChildEvent filtered by the location column
- * @method ChildEvent findOneByNotified(int $notified) Return the first ChildEvent filtered by the notified column
- * @method ChildEvent findOneByRehearsal(int $rehearsal) Return the first ChildEvent filtered by the rehearsal column
- * @method ChildEvent findOneByRemoved(int $removed) Return the first ChildEvent filtered by the removed column
- * @method ChildEvent findOneByEventGroupId(int $eventGroup) Return the first ChildEvent filtered by the eventGroup column
- * @method ChildEvent findOneBySermonTitle(string $sermonTitle) Return the first ChildEvent filtered by the sermonTitle column
- * @method ChildEvent findOneByBibleVerse(string $bibleVerse) Return the first ChildEvent filtered by the bibleVerse column
- * @method ChildEvent findOneByCreated(string $created) Return the first ChildEvent filtered by the created column
- * @method ChildEvent findOneByUpdated(string $updated) Return the first ChildEvent filtered by the updated column *
-
- * @method ChildEvent requirePk($key, ConnectionInterface $con = null) Return the ChildEvent by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEvent requireOne(ConnectionInterface $con = null) Return the first ChildEvent matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEvent|null findOneById(int $id) Return the first ChildEvent filtered by the id column
+ * @method ChildEvent|null findOneByDate(string $date) Return the first ChildEvent filtered by the date column
+ * @method ChildEvent|null findOneByName(string $name) Return the first ChildEvent filtered by the name column
+ * @method ChildEvent|null findOneByCreatedBy(int $createdBy) Return the first ChildEvent filtered by the createdBy column
+ * @method ChildEvent|null findOneByRehearsalDate(string $rehearsalDate) Return the first ChildEvent filtered by the rehearsalDate column
+ * @method ChildEvent|null findOneByEventTypeId(int $type) Return the first ChildEvent filtered by the type column
+ * @method ChildEvent|null findOneByEventSubTypeId(int $subType) Return the first ChildEvent filtered by the subType column
+ * @method ChildEvent|null findOneByLocationId(int $location) Return the first ChildEvent filtered by the location column
+ * @method ChildEvent|null findOneByNotified(int $notified) Return the first ChildEvent filtered by the notified column
+ * @method ChildEvent|null findOneByRehearsal(int $rehearsal) Return the first ChildEvent filtered by the rehearsal column
+ * @method ChildEvent|null findOneByRemoved(int $removed) Return the first ChildEvent filtered by the removed column
+ * @method ChildEvent|null findOneByEventGroupId(int $eventGroup) Return the first ChildEvent filtered by the eventGroup column
+ * @method ChildEvent|null findOneBySermonTitle(string $sermonTitle) Return the first ChildEvent filtered by the sermonTitle column
+ * @method ChildEvent|null findOneByBibleVerse(string $bibleVerse) Return the first ChildEvent filtered by the bibleVerse column
+ * @method ChildEvent|null findOneByCreated(string $created) Return the first ChildEvent filtered by the created column
+ * @method ChildEvent|null findOneByUpdated(string $updated) Return the first ChildEvent filtered by the updated column
+ *
+ * @method ChildEvent requirePk($key, ?ConnectionInterface $con = null) Return the ChildEvent by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEvent requireOne(?ConnectionInterface $con = null) Return the first ChildEvent matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEvent requireOneById(int $id) Return the first ChildEvent filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEvent requireOneByDate(string $date) Return the first ChildEvent filtered by the date column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -184,25 +183,44 @@
* @method ChildEvent requireOneByCreated(string $created) Return the first ChildEvent filtered by the created column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEvent requireOneByUpdated(string $updated) Return the first ChildEvent filtered by the updated column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEvent[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEvent objects based on current ModelCriteria
- * @method ChildEvent[]|ObjectCollection findById(int $id) Return ChildEvent objects filtered by the id column
- * @method ChildEvent[]|ObjectCollection findByDate(string $date) Return ChildEvent objects filtered by the date column
- * @method ChildEvent[]|ObjectCollection findByName(string $name) Return ChildEvent objects filtered by the name column
- * @method ChildEvent[]|ObjectCollection findByCreatedBy(int $createdBy) Return ChildEvent objects filtered by the createdBy column
- * @method ChildEvent[]|ObjectCollection findByRehearsalDate(string $rehearsalDate) Return ChildEvent objects filtered by the rehearsalDate column
- * @method ChildEvent[]|ObjectCollection findByEventTypeId(int $type) Return ChildEvent objects filtered by the type column
- * @method ChildEvent[]|ObjectCollection findByEventSubTypeId(int $subType) Return ChildEvent objects filtered by the subType column
- * @method ChildEvent[]|ObjectCollection findByLocationId(int $location) Return ChildEvent objects filtered by the location column
- * @method ChildEvent[]|ObjectCollection findByNotified(int $notified) Return ChildEvent objects filtered by the notified column
- * @method ChildEvent[]|ObjectCollection findByRehearsal(int $rehearsal) Return ChildEvent objects filtered by the rehearsal column
- * @method ChildEvent[]|ObjectCollection findByRemoved(int $removed) Return ChildEvent objects filtered by the removed column
- * @method ChildEvent[]|ObjectCollection findByEventGroupId(int $eventGroup) Return ChildEvent objects filtered by the eventGroup column
- * @method ChildEvent[]|ObjectCollection findBySermonTitle(string $sermonTitle) Return ChildEvent objects filtered by the sermonTitle column
- * @method ChildEvent[]|ObjectCollection findByBibleVerse(string $bibleVerse) Return ChildEvent objects filtered by the bibleVerse column
- * @method ChildEvent[]|ObjectCollection findByCreated(string $created) Return ChildEvent objects filtered by the created column
- * @method ChildEvent[]|ObjectCollection findByUpdated(string $updated) Return ChildEvent objects filtered by the updated column
- * @method ChildEvent[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEvent[]|Collection find(?ConnectionInterface $con = null) Return ChildEvent objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEvent objects based on current ModelCriteria
+ *
+ * @method ChildEvent[]|Collection findById(int|array $id) Return ChildEvent objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildEvent objects filtered by the id column
+ * @method ChildEvent[]|Collection findByDate(string|array $date) Return ChildEvent objects filtered by the date column
+ * @psalm-method Collection&\Traversable findByDate(string|array $date) Return ChildEvent objects filtered by the date column
+ * @method ChildEvent[]|Collection findByName(string|array $name) Return ChildEvent objects filtered by the name column
+ * @psalm-method Collection&\Traversable findByName(string|array $name) Return ChildEvent objects filtered by the name column
+ * @method ChildEvent[]|Collection findByCreatedBy(int|array $createdBy) Return ChildEvent objects filtered by the createdBy column
+ * @psalm-method Collection&\Traversable findByCreatedBy(int|array $createdBy) Return ChildEvent objects filtered by the createdBy column
+ * @method ChildEvent[]|Collection findByRehearsalDate(string|array $rehearsalDate) Return ChildEvent objects filtered by the rehearsalDate column
+ * @psalm-method Collection&\Traversable findByRehearsalDate(string|array $rehearsalDate) Return ChildEvent objects filtered by the rehearsalDate column
+ * @method ChildEvent[]|Collection findByEventTypeId(int|array $type) Return ChildEvent objects filtered by the type column
+ * @psalm-method Collection&\Traversable findByEventTypeId(int|array $type) Return ChildEvent objects filtered by the type column
+ * @method ChildEvent[]|Collection findByEventSubTypeId(int|array $subType) Return ChildEvent objects filtered by the subType column
+ * @psalm-method Collection&\Traversable findByEventSubTypeId(int|array $subType) Return ChildEvent objects filtered by the subType column
+ * @method ChildEvent[]|Collection findByLocationId(int|array $location) Return ChildEvent objects filtered by the location column
+ * @psalm-method Collection&\Traversable findByLocationId(int|array $location) Return ChildEvent objects filtered by the location column
+ * @method ChildEvent[]|Collection findByNotified(int|array $notified) Return ChildEvent objects filtered by the notified column
+ * @psalm-method Collection&\Traversable findByNotified(int|array $notified) Return ChildEvent objects filtered by the notified column
+ * @method ChildEvent[]|Collection findByRehearsal(int|array $rehearsal) Return ChildEvent objects filtered by the rehearsal column
+ * @psalm-method Collection&\Traversable findByRehearsal(int|array $rehearsal) Return ChildEvent objects filtered by the rehearsal column
+ * @method ChildEvent[]|Collection findByRemoved(int|array $removed) Return ChildEvent objects filtered by the removed column
+ * @psalm-method Collection&\Traversable findByRemoved(int|array $removed) Return ChildEvent objects filtered by the removed column
+ * @method ChildEvent[]|Collection findByEventGroupId(int|array $eventGroup) Return ChildEvent objects filtered by the eventGroup column
+ * @psalm-method Collection&\Traversable findByEventGroupId(int|array $eventGroup) Return ChildEvent objects filtered by the eventGroup column
+ * @method ChildEvent[]|Collection findBySermonTitle(string|array $sermonTitle) Return ChildEvent objects filtered by the sermonTitle column
+ * @psalm-method Collection&\Traversable findBySermonTitle(string|array $sermonTitle) Return ChildEvent objects filtered by the sermonTitle column
+ * @method ChildEvent[]|Collection findByBibleVerse(string|array $bibleVerse) Return ChildEvent objects filtered by the bibleVerse column
+ * @psalm-method Collection&\Traversable findByBibleVerse(string|array $bibleVerse) Return ChildEvent objects filtered by the bibleVerse column
+ * @method ChildEvent[]|Collection findByCreated(string|array $created) Return ChildEvent objects filtered by the created column
+ * @psalm-method Collection&\Traversable findByCreated(string|array $created) Return ChildEvent objects filtered by the created column
+ * @method ChildEvent[]|Collection findByUpdated(string|array $updated) Return ChildEvent objects filtered by the updated column
+ * @psalm-method Collection&\Traversable findByUpdated(string|array $updated) Return ChildEvent objects filtered by the updated column
*
+ * @method ChildEvent[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class EventQuery extends ModelCriteria
{
@@ -211,9 +229,9 @@ abstract class EventQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\EventQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\Event', $modelAlias = null)
{
@@ -223,12 +241,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildEventQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildEventQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildEventQuery) {
return $criteria;
@@ -258,7 +276,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildEvent|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -290,8 +308,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -323,8 +341,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildEvent|array|mixed the result, formatted by the current formatter
*/
@@ -344,12 +362,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -366,25 +384,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(EventTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(EventTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(EventTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(EventTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -397,15 +421,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -425,7 +449,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -438,17 +464,17 @@ public function filterById($id = null, $comparison = null)
* $query->filterByDate(array('max' => 'yesterday')); // WHERE date > '2011-03-13'
*
*
- * @param mixed $date The value to use as filter.
+ * @param mixed $date The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByDate($date = null, $comparison = null)
+ public function filterByDate($date = null, ?string $comparison = null)
{
if (is_array($date)) {
$useMinMax = false;
@@ -468,7 +494,9 @@ public function filterByDate($date = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_DATE, $date, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_DATE, $date, $comparison);
+
+ return $this;
}
/**
@@ -478,14 +506,15 @@ public function filterByDate($date = null, $comparison = null)
*
* $query->filterByName('fooValue'); // WHERE name = 'fooValue'
* $query->filterByName('%fooValue%', Criteria::LIKE); // WHERE name LIKE '%fooValue%'
+ * $query->filterByName(['foo', 'bar']); // WHERE name IN ('foo', 'bar')
*
*
- * @param string $name The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $name The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByName($name = null, $comparison = null)
+ public function filterByName($name = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($name)) {
@@ -493,7 +522,9 @@ public function filterByName($name = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_NAME, $name, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_NAME, $name, $comparison);
+
+ return $this;
}
/**
@@ -508,15 +539,15 @@ public function filterByName($name = null, $comparison = null)
*
* @see filterByUser()
*
- * @param mixed $createdBy The value to use as filter.
+ * @param mixed $createdBy The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByCreatedBy($createdBy = null, $comparison = null)
+ public function filterByCreatedBy($createdBy = null, ?string $comparison = null)
{
if (is_array($createdBy)) {
$useMinMax = false;
@@ -536,7 +567,9 @@ public function filterByCreatedBy($createdBy = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_CREATEDBY, $createdBy, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_CREATEDBY, $createdBy, $comparison);
+
+ return $this;
}
/**
@@ -549,17 +582,17 @@ public function filterByCreatedBy($createdBy = null, $comparison = null)
* $query->filterByRehearsalDate(array('max' => 'yesterday')); // WHERE rehearsalDate > '2011-03-13'
*
*
- * @param mixed $rehearsalDate The value to use as filter.
+ * @param mixed $rehearsalDate The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRehearsalDate($rehearsalDate = null, $comparison = null)
+ public function filterByRehearsalDate($rehearsalDate = null, ?string $comparison = null)
{
if (is_array($rehearsalDate)) {
$useMinMax = false;
@@ -579,7 +612,9 @@ public function filterByRehearsalDate($rehearsalDate = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_REHEARSALDATE, $rehearsalDate, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_REHEARSALDATE, $rehearsalDate, $comparison);
+
+ return $this;
}
/**
@@ -594,15 +629,15 @@ public function filterByRehearsalDate($rehearsalDate = null, $comparison = null)
*
* @see filterByEventType()
*
- * @param mixed $eventTypeId The value to use as filter.
+ * @param mixed $eventTypeId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventTypeId($eventTypeId = null, $comparison = null)
+ public function filterByEventTypeId($eventTypeId = null, ?string $comparison = null)
{
if (is_array($eventTypeId)) {
$useMinMax = false;
@@ -622,7 +657,9 @@ public function filterByEventTypeId($eventTypeId = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_TYPE, $eventTypeId, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_TYPE, $eventTypeId, $comparison);
+
+ return $this;
}
/**
@@ -637,15 +674,15 @@ public function filterByEventTypeId($eventTypeId = null, $comparison = null)
*
* @see filterByEventSubType()
*
- * @param mixed $eventSubTypeId The value to use as filter.
+ * @param mixed $eventSubTypeId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventSubTypeId($eventSubTypeId = null, $comparison = null)
+ public function filterByEventSubTypeId($eventSubTypeId = null, ?string $comparison = null)
{
if (is_array($eventSubTypeId)) {
$useMinMax = false;
@@ -665,7 +702,9 @@ public function filterByEventSubTypeId($eventSubTypeId = null, $comparison = nul
}
}
- return $this->addUsingAlias(EventTableMap::COL_SUBTYPE, $eventSubTypeId, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_SUBTYPE, $eventSubTypeId, $comparison);
+
+ return $this;
}
/**
@@ -680,15 +719,15 @@ public function filterByEventSubTypeId($eventSubTypeId = null, $comparison = nul
*
* @see filterByLocation()
*
- * @param mixed $locationId The value to use as filter.
+ * @param mixed $locationId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByLocationId($locationId = null, $comparison = null)
+ public function filterByLocationId($locationId = null, ?string $comparison = null)
{
if (is_array($locationId)) {
$useMinMax = false;
@@ -708,7 +747,9 @@ public function filterByLocationId($locationId = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_LOCATION, $locationId, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_LOCATION, $locationId, $comparison);
+
+ return $this;
}
/**
@@ -721,15 +762,15 @@ public function filterByLocationId($locationId = null, $comparison = null)
* $query->filterByNotified(array('min' => 12)); // WHERE notified > 12
*
*
- * @param mixed $notified The value to use as filter.
+ * @param mixed $notified The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByNotified($notified = null, $comparison = null)
+ public function filterByNotified($notified = null, ?string $comparison = null)
{
if (is_array($notified)) {
$useMinMax = false;
@@ -749,7 +790,9 @@ public function filterByNotified($notified = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_NOTIFIED, $notified, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_NOTIFIED, $notified, $comparison);
+
+ return $this;
}
/**
@@ -762,15 +805,15 @@ public function filterByNotified($notified = null, $comparison = null)
* $query->filterByRehearsal(array('min' => 12)); // WHERE rehearsal > 12
*
*
- * @param mixed $rehearsal The value to use as filter.
+ * @param mixed $rehearsal The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRehearsal($rehearsal = null, $comparison = null)
+ public function filterByRehearsal($rehearsal = null, ?string $comparison = null)
{
if (is_array($rehearsal)) {
$useMinMax = false;
@@ -790,7 +833,9 @@ public function filterByRehearsal($rehearsal = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_REHEARSAL, $rehearsal, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_REHEARSAL, $rehearsal, $comparison);
+
+ return $this;
}
/**
@@ -803,15 +848,15 @@ public function filterByRehearsal($rehearsal = null, $comparison = null)
* $query->filterByRemoved(array('min' => 12)); // WHERE removed > 12
*
*
- * @param mixed $removed The value to use as filter.
+ * @param mixed $removed The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByRemoved($removed = null, $comparison = null)
+ public function filterByRemoved($removed = null, ?string $comparison = null)
{
if (is_array($removed)) {
$useMinMax = false;
@@ -831,7 +876,9 @@ public function filterByRemoved($removed = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_REMOVED, $removed, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_REMOVED, $removed, $comparison);
+
+ return $this;
}
/**
@@ -846,15 +893,15 @@ public function filterByRemoved($removed = null, $comparison = null)
*
* @see filterByEventGroup()
*
- * @param mixed $eventGroupId The value to use as filter.
+ * @param mixed $eventGroupId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventGroupId($eventGroupId = null, $comparison = null)
+ public function filterByEventGroupId($eventGroupId = null, ?string $comparison = null)
{
if (is_array($eventGroupId)) {
$useMinMax = false;
@@ -874,7 +921,9 @@ public function filterByEventGroupId($eventGroupId = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_EVENTGROUP, $eventGroupId, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_EVENTGROUP, $eventGroupId, $comparison);
+
+ return $this;
}
/**
@@ -884,14 +933,15 @@ public function filterByEventGroupId($eventGroupId = null, $comparison = null)
*
* $query->filterBySermonTitle('fooValue'); // WHERE sermonTitle = 'fooValue'
* $query->filterBySermonTitle('%fooValue%', Criteria::LIKE); // WHERE sermonTitle LIKE '%fooValue%'
+ * $query->filterBySermonTitle(['foo', 'bar']); // WHERE sermonTitle IN ('foo', 'bar')
*
*
- * @param string $sermonTitle The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $sermonTitle The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterBySermonTitle($sermonTitle = null, $comparison = null)
+ public function filterBySermonTitle($sermonTitle = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($sermonTitle)) {
@@ -899,7 +949,9 @@ public function filterBySermonTitle($sermonTitle = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_SERMONTITLE, $sermonTitle, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_SERMONTITLE, $sermonTitle, $comparison);
+
+ return $this;
}
/**
@@ -909,14 +961,15 @@ public function filterBySermonTitle($sermonTitle = null, $comparison = null)
*
* $query->filterByBibleVerse('fooValue'); // WHERE bibleVerse = 'fooValue'
* $query->filterByBibleVerse('%fooValue%', Criteria::LIKE); // WHERE bibleVerse LIKE '%fooValue%'
+ * $query->filterByBibleVerse(['foo', 'bar']); // WHERE bibleVerse IN ('foo', 'bar')
*
*
- * @param string $bibleVerse The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $bibleVerse The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByBibleVerse($bibleVerse = null, $comparison = null)
+ public function filterByBibleVerse($bibleVerse = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($bibleVerse)) {
@@ -924,7 +977,9 @@ public function filterByBibleVerse($bibleVerse = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_BIBLEVERSE, $bibleVerse, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_BIBLEVERSE, $bibleVerse, $comparison);
+
+ return $this;
}
/**
@@ -937,17 +992,17 @@ public function filterByBibleVerse($bibleVerse = null, $comparison = null)
* $query->filterByCreated(array('max' => 'yesterday')); // WHERE created > '2011-03-13'
*
*
- * @param mixed $created The value to use as filter.
+ * @param mixed $created The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByCreated($created = null, $comparison = null)
+ public function filterByCreated($created = null, ?string $comparison = null)
{
if (is_array($created)) {
$useMinMax = false;
@@ -967,7 +1022,9 @@ public function filterByCreated($created = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_CREATED, $created, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_CREATED, $created, $comparison);
+
+ return $this;
}
/**
@@ -980,17 +1037,17 @@ public function filterByCreated($created = null, $comparison = null)
* $query->filterByUpdated(array('max' => 'yesterday')); // WHERE updated > '2011-03-13'
*
*
- * @param mixed $updated The value to use as filter.
+ * @param mixed $updated The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUpdated($updated = null, $comparison = null)
+ public function filterByUpdated($updated = null, ?string $comparison = null)
{
if (is_array($updated)) {
$useMinMax = false;
@@ -1010,20 +1067,22 @@ public function filterByUpdated($updated = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventTableMap::COL_UPDATED, $updated, $comparison);
+ $this->addUsingAlias(EventTableMap::COL_UPDATED, $updated, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\User object
*
* @param \TechWilk\Rota\User|ObjectCollection $user The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByUser($user, $comparison = null)
+ public function filterByUser($user, ?string $comparison = null)
{
if ($user instanceof \TechWilk\Rota\User) {
return $this
@@ -1033,8 +1092,10 @@ public function filterByUser($user, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_CREATEDBY, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByUser() only accepts arguments of type \TechWilk\Rota\User or Collection');
}
@@ -1043,12 +1104,12 @@ public function filterByUser($user, $comparison = null)
/**
* Adds a JOIN clause to the query using the User relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinUser(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('User');
@@ -1077,9 +1138,9 @@ public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\UserQuery A secondary query class using the current class as primary query
*/
@@ -1090,17 +1151,113 @@ public function useUserQuery($relationAlias = null, $joinType = Criteria::INNER_
->useQuery($relationAlias ? $relationAlias : 'User', '\TechWilk\Rota\UserQuery');
}
+ /**
+ * Use the User relation User object
+ *
+ * @param callable(\TechWilk\Rota\UserQuery):\TechWilk\Rota\UserQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withUserQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useUserQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to User table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the EXISTS statement
+ */
+ public function useUserExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT EXISTS query.
+ *
+ * @see useUserExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useUserNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useExistsQuery('User', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the IN statement
+ */
+ public function useInUserQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to User table for a NOT IN query.
+ *
+ * @see useUserInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\UserQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInUserQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\UserQuery */
+ $q = $this->useInQuery('User', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\EventType object
*
* @param \TechWilk\Rota\EventType|ObjectCollection $eventType The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventType($eventType, $comparison = null)
+ public function filterByEventType($eventType, ?string $comparison = null)
{
if ($eventType instanceof \TechWilk\Rota\EventType) {
return $this
@@ -1110,8 +1267,10 @@ public function filterByEventType($eventType, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_TYPE, $eventType->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEventType() only accepts arguments of type \TechWilk\Rota\EventType or Collection');
}
@@ -1120,12 +1279,12 @@ public function filterByEventType($eventType, $comparison = null)
/**
* Adds a JOIN clause to the query using the EventType relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEventType($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEventType(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('EventType');
@@ -1154,9 +1313,9 @@ public function joinEventType($relationAlias = null, $joinType = Criteria::INNER
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventTypeQuery A secondary query class using the current class as primary query
*/
@@ -1167,17 +1326,113 @@ public function useEventTypeQuery($relationAlias = null, $joinType = Criteria::I
->useQuery($relationAlias ? $relationAlias : 'EventType', '\TechWilk\Rota\EventTypeQuery');
}
+ /**
+ * Use the EventType relation EventType object
+ *
+ * @param callable(\TechWilk\Rota\EventTypeQuery):\TechWilk\Rota\EventTypeQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventTypeQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventTypeQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to EventType table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventTypeQuery The inner query object of the EXISTS statement
+ */
+ public function useEventTypeExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventTypeQuery */
+ $q = $this->useExistsQuery('EventType', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventType table for a NOT EXISTS query.
+ *
+ * @see useEventTypeExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventTypeQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventTypeNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventTypeQuery */
+ $q = $this->useExistsQuery('EventType', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventType table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventTypeQuery The inner query object of the IN statement
+ */
+ public function useInEventTypeQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventTypeQuery */
+ $q = $this->useInQuery('EventType', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventType table for a NOT IN query.
+ *
+ * @see useEventTypeInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventTypeQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventTypeQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventTypeQuery */
+ $q = $this->useInQuery('EventType', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\EventSubType object
*
* @param \TechWilk\Rota\EventSubType|ObjectCollection $eventSubType The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventSubType($eventSubType, $comparison = null)
+ public function filterByEventSubType($eventSubType, ?string $comparison = null)
{
if ($eventSubType instanceof \TechWilk\Rota\EventSubType) {
return $this
@@ -1187,8 +1442,10 @@ public function filterByEventSubType($eventSubType, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_SUBTYPE, $eventSubType->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEventSubType() only accepts arguments of type \TechWilk\Rota\EventSubType or Collection');
}
@@ -1197,12 +1454,12 @@ public function filterByEventSubType($eventSubType, $comparison = null)
/**
* Adds a JOIN clause to the query using the EventSubType relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEventSubType($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEventSubType(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('EventSubType');
@@ -1231,9 +1488,9 @@ public function joinEventSubType($relationAlias = null, $joinType = Criteria::IN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventSubTypeQuery A secondary query class using the current class as primary query
*/
@@ -1244,17 +1501,113 @@ public function useEventSubTypeQuery($relationAlias = null, $joinType = Criteria
->useQuery($relationAlias ? $relationAlias : 'EventSubType', '\TechWilk\Rota\EventSubTypeQuery');
}
+ /**
+ * Use the EventSubType relation EventSubType object
+ *
+ * @param callable(\TechWilk\Rota\EventSubTypeQuery):\TechWilk\Rota\EventSubTypeQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventSubTypeQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventSubTypeQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to EventSubType table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventSubTypeQuery The inner query object of the EXISTS statement
+ */
+ public function useEventSubTypeExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventSubTypeQuery */
+ $q = $this->useExistsQuery('EventSubType', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventSubType table for a NOT EXISTS query.
+ *
+ * @see useEventSubTypeExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventSubTypeQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventSubTypeNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventSubTypeQuery */
+ $q = $this->useExistsQuery('EventSubType', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventSubType table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventSubTypeQuery The inner query object of the IN statement
+ */
+ public function useInEventSubTypeQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventSubTypeQuery */
+ $q = $this->useInQuery('EventSubType', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventSubType table for a NOT IN query.
+ *
+ * @see useEventSubTypeInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventSubTypeQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventSubTypeQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventSubTypeQuery */
+ $q = $this->useInQuery('EventSubType', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\Location object
*
* @param \TechWilk\Rota\Location|ObjectCollection $location The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByLocation($location, $comparison = null)
+ public function filterByLocation($location, ?string $comparison = null)
{
if ($location instanceof \TechWilk\Rota\Location) {
return $this
@@ -1264,8 +1617,10 @@ public function filterByLocation($location, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_LOCATION, $location->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByLocation() only accepts arguments of type \TechWilk\Rota\Location or Collection');
}
@@ -1274,12 +1629,12 @@ public function filterByLocation($location, $comparison = null)
/**
* Adds a JOIN clause to the query using the Location relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinLocation($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinLocation(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Location');
@@ -1308,9 +1663,9 @@ public function joinLocation($relationAlias = null, $joinType = Criteria::INNER_
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\LocationQuery A secondary query class using the current class as primary query
*/
@@ -1321,17 +1676,113 @@ public function useLocationQuery($relationAlias = null, $joinType = Criteria::IN
->useQuery($relationAlias ? $relationAlias : 'Location', '\TechWilk\Rota\LocationQuery');
}
+ /**
+ * Use the Location relation Location object
+ *
+ * @param callable(\TechWilk\Rota\LocationQuery):\TechWilk\Rota\LocationQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withLocationQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useLocationQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Location table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\LocationQuery The inner query object of the EXISTS statement
+ */
+ public function useLocationExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\LocationQuery */
+ $q = $this->useExistsQuery('Location', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Location table for a NOT EXISTS query.
+ *
+ * @see useLocationExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\LocationQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useLocationNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\LocationQuery */
+ $q = $this->useExistsQuery('Location', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Location table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\LocationQuery The inner query object of the IN statement
+ */
+ public function useInLocationQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\LocationQuery */
+ $q = $this->useInQuery('Location', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Location table for a NOT IN query.
+ *
+ * @see useLocationInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\LocationQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInLocationQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\LocationQuery */
+ $q = $this->useInQuery('Location', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\EventGroup object
*
* @param \TechWilk\Rota\EventGroup|ObjectCollection $eventGroup The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @throws \Propel\Runtime\Exception\PropelException
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventGroup($eventGroup, $comparison = null)
+ public function filterByEventGroup($eventGroup, ?string $comparison = null)
{
if ($eventGroup instanceof \TechWilk\Rota\EventGroup) {
return $this
@@ -1341,8 +1792,10 @@ public function filterByEventGroup($eventGroup, $comparison = null)
$comparison = Criteria::IN;
}
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_EVENTGROUP, $eventGroup->toKeyValue('PrimaryKey', 'Id'), $comparison);
+
+ return $this;
} else {
throw new PropelException('filterByEventGroup() only accepts arguments of type \TechWilk\Rota\EventGroup or Collection');
}
@@ -1351,12 +1804,12 @@ public function filterByEventGroup($eventGroup, $comparison = null)
/**
* Adds a JOIN clause to the query using the EventGroup relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEventGroup($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinEventGroup(?string $relationAlias = null, ?string $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('EventGroup');
@@ -1385,9 +1838,9 @@ public function joinEventGroup($relationAlias = null, $joinType = Criteria::LEFT
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventGroupQuery A secondary query class using the current class as primary query
*/
@@ -1398,24 +1851,124 @@ public function useEventGroupQuery($relationAlias = null, $joinType = Criteria::
->useQuery($relationAlias ? $relationAlias : 'EventGroup', '\TechWilk\Rota\EventGroupQuery');
}
+ /**
+ * Use the EventGroup relation EventGroup object
+ *
+ * @param callable(\TechWilk\Rota\EventGroupQuery):\TechWilk\Rota\EventGroupQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventGroupQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::LEFT_JOIN
+ ) {
+ $relatedQuery = $this->useEventGroupQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to EventGroup table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventGroupQuery The inner query object of the EXISTS statement
+ */
+ public function useEventGroupExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventGroupQuery */
+ $q = $this->useExistsQuery('EventGroup', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventGroup table for a NOT EXISTS query.
+ *
+ * @see useEventGroupExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventGroupQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventGroupNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventGroupQuery */
+ $q = $this->useExistsQuery('EventGroup', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventGroup table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventGroupQuery The inner query object of the IN statement
+ */
+ public function useInEventGroupQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventGroupQuery */
+ $q = $this->useInQuery('EventGroup', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventGroup table for a NOT IN query.
+ *
+ * @see useEventGroupInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventGroupQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventGroupQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventGroupQuery */
+ $q = $this->useInQuery('EventGroup', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\Comment object
*
* @param \TechWilk\Rota\Comment|ObjectCollection $comment the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByComment($comment, $comparison = null)
+ public function filterByComment($comment, ?string $comparison = null)
{
if ($comment instanceof \TechWilk\Rota\Comment) {
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_ID, $comment->getEventId(), $comparison);
+
+ return $this;
} elseif ($comment instanceof ObjectCollection) {
- return $this
+ $this
->useCommentQuery()
->filterByPrimaryKeys($comment->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterByComment() only accepts arguments of type \TechWilk\Rota\Comment or Collection');
}
@@ -1424,12 +1977,12 @@ public function filterByComment($comment, $comparison = null)
/**
* Adds a JOIN clause to the query using the Comment relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinComment($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinComment(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Comment');
@@ -1458,9 +2011,9 @@ public function joinComment($relationAlias = null, $joinType = Criteria::INNER_J
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\CommentQuery A secondary query class using the current class as primary query
*/
@@ -1471,24 +2024,124 @@ public function useCommentQuery($relationAlias = null, $joinType = Criteria::INN
->useQuery($relationAlias ? $relationAlias : 'Comment', '\TechWilk\Rota\CommentQuery');
}
+ /**
+ * Use the Comment relation Comment object
+ *
+ * @param callable(\TechWilk\Rota\CommentQuery):\TechWilk\Rota\CommentQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withCommentQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useCommentQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Comment table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\CommentQuery The inner query object of the EXISTS statement
+ */
+ public function useCommentExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\CommentQuery */
+ $q = $this->useExistsQuery('Comment', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Comment table for a NOT EXISTS query.
+ *
+ * @see useCommentExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\CommentQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useCommentNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\CommentQuery */
+ $q = $this->useExistsQuery('Comment', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Comment table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\CommentQuery The inner query object of the IN statement
+ */
+ public function useInCommentQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\CommentQuery */
+ $q = $this->useInQuery('Comment', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Comment table for a NOT IN query.
+ *
+ * @see useCommentInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\CommentQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInCommentQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\CommentQuery */
+ $q = $this->useInQuery('Comment', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\EventPerson object
*
* @param \TechWilk\Rota\EventPerson|ObjectCollection $eventPerson the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEventPerson($eventPerson, $comparison = null)
+ public function filterByEventPerson($eventPerson, ?string $comparison = null)
{
if ($eventPerson instanceof \TechWilk\Rota\EventPerson) {
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_ID, $eventPerson->getEventId(), $comparison);
+
+ return $this;
} elseif ($eventPerson instanceof ObjectCollection) {
- return $this
+ $this
->useEventPersonQuery()
->filterByPrimaryKeys($eventPerson->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterByEventPerson() only accepts arguments of type \TechWilk\Rota\EventPerson or Collection');
}
@@ -1497,12 +2150,12 @@ public function filterByEventPerson($eventPerson, $comparison = null)
/**
* Adds a JOIN clause to the query using the EventPerson relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEventPerson($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEventPerson(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('EventPerson');
@@ -1531,9 +2184,9 @@ public function joinEventPerson($relationAlias = null, $joinType = Criteria::INN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventPersonQuery A secondary query class using the current class as primary query
*/
@@ -1544,24 +2197,124 @@ public function useEventPersonQuery($relationAlias = null, $joinType = Criteria:
->useQuery($relationAlias ? $relationAlias : 'EventPerson', '\TechWilk\Rota\EventPersonQuery');
}
+ /**
+ * Use the EventPerson relation EventPerson object
+ *
+ * @param callable(\TechWilk\Rota\EventPersonQuery):\TechWilk\Rota\EventPersonQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventPersonQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventPersonQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to EventPerson table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventPersonQuery The inner query object of the EXISTS statement
+ */
+ public function useEventPersonExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventPersonQuery */
+ $q = $this->useExistsQuery('EventPerson', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventPerson table for a NOT EXISTS query.
+ *
+ * @see useEventPersonExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventPersonQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventPersonNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventPersonQuery */
+ $q = $this->useExistsQuery('EventPerson', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventPerson table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventPersonQuery The inner query object of the IN statement
+ */
+ public function useInEventPersonQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventPersonQuery */
+ $q = $this->useInQuery('EventPerson', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to EventPerson table for a NOT IN query.
+ *
+ * @see useEventPersonInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventPersonQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventPersonQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventPersonQuery */
+ $q = $this->useInQuery('EventPerson', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Filter the query by a related \TechWilk\Rota\Availability object
*
* @param \TechWilk\Rota\Availability|ObjectCollection $availability the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByAvailability($availability, $comparison = null)
+ public function filterByAvailability($availability, ?string $comparison = null)
{
if ($availability instanceof \TechWilk\Rota\Availability) {
- return $this
+ $this
->addUsingAlias(EventTableMap::COL_ID, $availability->getEventId(), $comparison);
+
+ return $this;
} elseif ($availability instanceof ObjectCollection) {
- return $this
+ $this
->useAvailabilityQuery()
->filterByPrimaryKeys($availability->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterByAvailability() only accepts arguments of type \TechWilk\Rota\Availability or Collection');
}
@@ -1570,12 +2323,12 @@ public function filterByAvailability($availability, $comparison = null)
/**
* Adds a JOIN clause to the query using the Availability relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinAvailability($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinAvailability(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Availability');
@@ -1604,9 +2357,9 @@ public function joinAvailability($relationAlias = null, $joinType = Criteria::IN
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\AvailabilityQuery A secondary query class using the current class as primary query
*/
@@ -1617,12 +2370,108 @@ public function useAvailabilityQuery($relationAlias = null, $joinType = Criteria
->useQuery($relationAlias ? $relationAlias : 'Availability', '\TechWilk\Rota\AvailabilityQuery');
}
+ /**
+ * Use the Availability relation Availability object
+ *
+ * @param callable(\TechWilk\Rota\AvailabilityQuery):\TechWilk\Rota\AvailabilityQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withAvailabilityQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useAvailabilityQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Availability table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\AvailabilityQuery The inner query object of the EXISTS statement
+ */
+ public function useAvailabilityExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\AvailabilityQuery */
+ $q = $this->useExistsQuery('Availability', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Availability table for a NOT EXISTS query.
+ *
+ * @see useAvailabilityExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\AvailabilityQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useAvailabilityNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\AvailabilityQuery */
+ $q = $this->useExistsQuery('Availability', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Availability table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\AvailabilityQuery The inner query object of the IN statement
+ */
+ public function useInAvailabilityQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\AvailabilityQuery */
+ $q = $this->useInQuery('Availability', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Availability table for a NOT IN query.
+ *
+ * @see useAvailabilityInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\AvailabilityQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInAvailabilityQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\AvailabilityQuery */
+ $q = $this->useInQuery('Availability', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildEvent $event Object to remove from the list of results
+ * @param ChildEvent $event Object to remove from the list of results
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($event = null)
{
@@ -1639,7 +2488,7 @@ public function prune($event = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventTableMap::DATABASE_NAME);
@@ -1664,12 +2513,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventTableMap::DATABASE_NAME);
@@ -1699,64 +2548,77 @@ public function delete(ConnectionInterface $con = null)
/**
* Filter by the latest updated
*
- * @param int $nbDays Maximum age of the latest update in days
+ * @param int $nbDays Maximum age of the latest update in days
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
- return $this->addUsingAlias(EventTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(EventTableMap::COL_UPDATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by update date desc
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
- return $this->addDescendingOrderByColumn(EventTableMap::COL_UPDATED);
+ $this->addDescendingOrderByColumn(EventTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by update date asc
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
- return $this->addAscendingOrderByColumn(EventTableMap::COL_UPDATED);
+ $this->addAscendingOrderByColumn(EventTableMap::COL_UPDATED);
+
+ return $this;
}
/**
* Order by create date desc
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function lastCreatedFirst()
{
- return $this->addDescendingOrderByColumn(EventTableMap::COL_CREATED);
+ $this->addDescendingOrderByColumn(EventTableMap::COL_CREATED);
+
+ return $this;
}
/**
* Filter by the latest created
*
- * @param int $nbDays Maximum age of in days
+ * @param int $nbDays Maximum age of in days
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
- return $this->addUsingAlias(EventTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+ $this->addUsingAlias(EventTableMap::COL_CREATED, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
+
+ return $this;
}
/**
* Order by create date asc
*
- * @return $this|ChildEventQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function firstCreatedFirst()
{
- return $this->addAscendingOrderByColumn(EventTableMap::COL_CREATED);
+ $this->addAscendingOrderByColumn(EventTableMap::COL_CREATED);
+
+ return $this;
}
-} // EventQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/EventSubType.php b/generated-classes/TechWilk/Rota/Base/EventSubType.php
index 832d287f..2be8ee1b 100644
--- a/generated-classes/TechWilk/Rota/Base/EventSubType.php
+++ b/generated-classes/TechWilk/Rota/Base/EventSubType.php
@@ -34,19 +34,21 @@ abstract class EventSubType implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventSubTypeTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventSubTypeTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -55,14 +57,14 @@ abstract class EventSubType implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -88,6 +90,7 @@ abstract class EventSubType implements ActiveRecordInterface
/**
* @var ObjectCollection|ChildEvent[] Collection to store aggregation of ChildEvent objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildEvent objects.
*/
protected $collEvents;
protected $collEventsPartial;
@@ -96,13 +99,14 @@ abstract class EventSubType implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildEvent[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $eventsScheduledForDeletion = null;
@@ -112,7 +116,7 @@ abstract class EventSubType implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->name = '';
}
@@ -129,9 +133,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -139,10 +143,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -151,7 +155,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -161,9 +165,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -172,45 +176,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -219,10 +221,10 @@ public function resetModified($col = null)
* obj is an instance of EventSubType, delegates to
* equals(EventSubType). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -244,7 +246,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -252,10 +254,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -263,15 +265,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -280,12 +282,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|EventSubType The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -295,13 +297,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -312,24 +314,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -337,7 +342,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -377,8 +382,8 @@ public function getDescription()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventSubType The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -392,13 +397,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [name] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventSubType The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setName($v)
{
@@ -412,13 +417,13 @@ public function setName($v)
}
return $this;
- } // setName()
+ }
/**
* Set the value of [description] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventSubType The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDescription($v)
{
@@ -432,7 +437,7 @@ public function setDescription($v)
}
return $this;
- } // setDescription()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -440,17 +445,17 @@ public function setDescription($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->name !== '') {
- return false;
- }
+ if ($this->name !== '') {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -460,19 +465,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EventSubTypeTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -481,8 +487,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : EventSubTypeTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
$this->description = (null !== $col) ? (string) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -490,6 +496,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 3; // 3 = EventSubTypeTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\EventSubType'), 0, $e);
}
@@ -506,23 +513,24 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -550,19 +558,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
if ($deep) { // also de-associate any related objects?
$this->collEvents = null;
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see EventSubType::setDeleted()
* @see EventSubType::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -592,12 +601,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -642,12 +651,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -682,22 +691,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EventSubTypeTableMap::COL_ID] = true;
@@ -728,12 +738,15 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'name':
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
+
break;
case 'description':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+
break;
}
}
@@ -756,12 +769,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -772,14 +785,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventSubTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -791,24 +804,23 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getName();
- break;
+
case 2:
return $this->getDescription();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -818,27 +830,27 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['EventSubType'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['EventSubType'][$this->hashCode()] = true;
$keys = EventSubTypeTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getName(),
$keys[2] => $this->getDescription(),
- );
+ ];
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
@@ -846,6 +858,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->collEvents) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'events';
@@ -867,30 +880,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\EventSubType
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventSubTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\EventSubType
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -920,11 +935,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EventSubTypeTableMap::getFieldNames($keyType);
@@ -937,6 +952,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[2], $arr)) {
$this->setDescription($arr[$keys[2]]);
}
+
+ return $this;
}
/**
@@ -956,9 +973,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\EventSubType The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -972,9 +989,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EventSubTypeTableMap::DATABASE_NAME);
@@ -995,13 +1012,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEventSubTypeQuery::create();
$criteria->add(EventSubTypeTableMap::COL_ID, $this->id);
@@ -1013,7 +1030,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1043,19 +1060,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1066,12 +1084,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\EventSubType (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\EventSubType (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setName($this->getName());
$copyObj->setDescription($this->getDescription());
@@ -1086,11 +1105,12 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->addEvent($relObj->copy($deepCopy));
}
}
+
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1102,11 +1122,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\EventSubType Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1122,12 +1142,12 @@ public function copy($deepCopy = false)
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
- * @param string $relationName The name of the relation to initialize
+ * @param string $relationName The name of the relation to initialize
* @return void
*/
- public function initRelation($relationName)
+ public function initRelation($relationName): void
{
- if ('Event' == $relationName) {
+ if ('Event' === $relationName) {
$this->initEvents();
return;
}
@@ -1139,18 +1159,22 @@ public function initRelation($relationName)
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addEvents()
+ * @return $this
+ * @see addEvents()
*/
public function clearEvents()
{
$this->collEvents = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collEvents collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialEvents($v = true)
+ public function resetPartialEvents($v = true): void
{
$this->collEventsPartial = $v;
}
@@ -1162,12 +1186,12 @@ public function resetPartialEvents($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initEvents($overrideExisting = true)
+ public function initEvents(bool $overrideExisting = true): void
{
if (null !== $this->collEvents && !$overrideExisting) {
return;
@@ -1188,18 +1212,28 @@ public function initEvents($overrideExisting = true)
* If this ChildEventSubType is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvents(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getEvents(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collEventsPartial && !$this->isNew();
- if (null === $this->collEvents || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collEvents) {
+ if (null === $this->collEvents || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initEvents();
+ if (null === $this->collEvents) {
+ $this->initEvents();
+ } else {
+ $collectionClassName = EventTableMap::getTableMap()->getCollectionClassName();
+
+ $collEvents = new $collectionClassName;
+ $collEvents->setModel('\TechWilk\Rota\Event');
+
+ return $collEvents;
+ }
} else {
$collEvents = ChildEventQuery::create(null, $criteria)
->filterByEventSubType($this)
@@ -1243,11 +1277,11 @@ public function getEvents(Criteria $criteria = null, ConnectionInterface $con =
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $events A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEventSubType The current object (for fluent API support)
+ * @param Collection $events A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setEvents(Collection $events, ConnectionInterface $con = null)
+ public function setEvents(Collection $events, ?ConnectionInterface $con = null)
{
/** @var ChildEvent[] $eventsToDelete */
$eventsToDelete = $this->getEvents(new Criteria(), $con)->diff($events);
@@ -1273,13 +1307,13 @@ public function setEvents(Collection $events, ConnectionInterface $con = null)
/**
* Returns the number of related Event objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Event objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Event objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countEvents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countEvents(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collEventsPartial && !$this->isNew();
if (null === $this->collEvents || null !== $criteria || $partial) {
@@ -1308,8 +1342,8 @@ public function countEvents(Criteria $criteria = null, $distinct = false, Connec
* Method called to associate a ChildEvent object to this object
* through the ChildEvent foreign key attribute.
*
- * @param ChildEvent $l ChildEvent
- * @return $this|\TechWilk\Rota\EventSubType The current object (for fluent API support)
+ * @param ChildEvent $l ChildEvent
+ * @return $this The current object (for fluent API support)
*/
public function addEvent(ChildEvent $l)
{
@@ -1332,15 +1366,15 @@ public function addEvent(ChildEvent $l)
/**
* @param ChildEvent $event The ChildEvent object to add.
*/
- protected function doAddEvent(ChildEvent $event)
+ protected function doAddEvent(ChildEvent $event): void
{
$this->collEvents[]= $event;
$event->setEventSubType($this);
}
/**
- * @param ChildEvent $event The ChildEvent object to remove.
- * @return $this|ChildEventSubType The current object (for fluent API support)
+ * @param ChildEvent $event The ChildEvent object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeEvent(ChildEvent $event)
{
@@ -1370,12 +1404,13 @@ public function removeEvent(ChildEvent $event)
* api reasonable. You can provide public methods for those you
* actually need in EventSubType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -1395,12 +1430,13 @@ public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface
* api reasonable. You can provide public methods for those you
* actually need in EventSubType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventType(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventType(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventType', $joinBehavior);
@@ -1420,12 +1456,13 @@ public function getEventsJoinEventType(Criteria $criteria = null, ConnectionInte
* api reasonable. You can provide public methods for those you
* actually need in EventSubType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinLocation(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('Location', $joinBehavior);
@@ -1445,12 +1482,13 @@ public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInter
* api reasonable. You can provide public methods for those you
* actually need in EventSubType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventGroup(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventGroup(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventGroup', $joinBehavior);
@@ -1462,6 +1500,8 @@ public function getEventsJoinEventGroup(Criteria $criteria = null, ConnectionInt
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1474,6 +1514,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1482,9 +1524,10 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
if ($this->collEvents) {
@@ -1495,6 +1538,7 @@ public function clearAllReferences($deep = false)
} // if ($deep)
$this->collEvents = null;
+ return $this;
}
/**
@@ -1509,99 +1553,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -1611,7 +1635,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -1631,17 +1655,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EventSubTypeQuery.php b/generated-classes/TechWilk/Rota/Base/EventSubTypeQuery.php
index 87141882..94066ee1 100644
--- a/generated-classes/TechWilk/Rota/Base/EventSubTypeQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EventSubTypeQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\EventSubTypeTableMap;
/**
- * Base class that represents a query for the 'eventSubTypes' table.
- *
- *
+ * Base class that represents a query for the `eventSubTypes` table.
*
* @method ChildEventSubTypeQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEventSubTypeQuery orderByName($order = Criteria::ASC) Order by the name column
@@ -48,26 +47,32 @@
*
* @method \TechWilk\Rota\EventQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildEventSubType findOne(ConnectionInterface $con = null) Return the first ChildEventSubType matching the query
- * @method ChildEventSubType findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEventSubType matching the query, or a new ChildEventSubType object populated from the query conditions when no match is found
+ * @method ChildEventSubType|null findOne(?ConnectionInterface $con = null) Return the first ChildEventSubType matching the query
+ * @method ChildEventSubType findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEventSubType matching the query, or a new ChildEventSubType object populated from the query conditions when no match is found
*
- * @method ChildEventSubType findOneById(int $id) Return the first ChildEventSubType filtered by the id column
- * @method ChildEventSubType findOneByName(string $name) Return the first ChildEventSubType filtered by the name column
- * @method ChildEventSubType findOneByDescription(string $description) Return the first ChildEventSubType filtered by the description column *
-
- * @method ChildEventSubType requirePk($key, ConnectionInterface $con = null) Return the ChildEventSubType by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEventSubType requireOne(ConnectionInterface $con = null) Return the first ChildEventSubType matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventSubType|null findOneById(int $id) Return the first ChildEventSubType filtered by the id column
+ * @method ChildEventSubType|null findOneByName(string $name) Return the first ChildEventSubType filtered by the name column
+ * @method ChildEventSubType|null findOneByDescription(string $description) Return the first ChildEventSubType filtered by the description column
+ *
+ * @method ChildEventSubType requirePk($key, ?ConnectionInterface $con = null) Return the ChildEventSubType by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventSubType requireOne(?ConnectionInterface $con = null) Return the first ChildEventSubType matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEventSubType requireOneById(int $id) Return the first ChildEventSubType filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventSubType requireOneByName(string $name) Return the first ChildEventSubType filtered by the name column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventSubType requireOneByDescription(string $description) Return the first ChildEventSubType filtered by the description column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEventSubType[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEventSubType objects based on current ModelCriteria
- * @method ChildEventSubType[]|ObjectCollection findById(int $id) Return ChildEventSubType objects filtered by the id column
- * @method ChildEventSubType[]|ObjectCollection findByName(string $name) Return ChildEventSubType objects filtered by the name column
- * @method ChildEventSubType[]|ObjectCollection findByDescription(string $description) Return ChildEventSubType objects filtered by the description column
- * @method ChildEventSubType[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEventSubType[]|Collection find(?ConnectionInterface $con = null) Return ChildEventSubType objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEventSubType objects based on current ModelCriteria
+ *
+ * @method ChildEventSubType[]|Collection findById(int|array $id) Return ChildEventSubType objects filtered by the id column
+ * @psalm-method Collection&\Traversable findById(int|array $id) Return ChildEventSubType objects filtered by the id column
+ * @method ChildEventSubType[]|Collection findByName(string|array $name) Return ChildEventSubType objects filtered by the name column
+ * @psalm-method Collection&\Traversable findByName(string|array $name) Return ChildEventSubType objects filtered by the name column
+ * @method ChildEventSubType[]|Collection findByDescription(string|array $description) Return ChildEventSubType objects filtered by the description column
+ * @psalm-method Collection&\Traversable findByDescription(string|array $description) Return ChildEventSubType objects filtered by the description column
*
+ * @method ChildEventSubType[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @psalm-method \Propel\Runtime\Util\PropelModelPager&\Traversable paginate($page = 1, $maxPerPage = 10, ?ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
*/
abstract class EventSubTypeQuery extends ModelCriteria
{
@@ -76,9 +81,9 @@ abstract class EventSubTypeQuery extends ModelCriteria
/**
* Initializes internal state of \TechWilk\Rota\Base\EventSubTypeQuery object.
*
- * @param string $dbName The database name
- * @param string $modelName The phpName of a model, e.g. 'Book'
- * @param string $modelAlias The alias for the model in this query, e.g. 'b'
+ * @param string $dbName The database name
+ * @param string $modelName The phpName of a model, e.g. 'Book'
+ * @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\\EventSubType', $modelAlias = null)
{
@@ -88,12 +93,12 @@ public function __construct($dbName = 'default', $modelName = '\\TechWilk\\Rota\
/**
* Returns a new ChildEventSubTypeQuery object.
*
- * @param string $modelAlias The alias of a model in the query
- * @param Criteria $criteria Optional Criteria to build the query from
+ * @param string $modelAlias The alias of a model in the query
+ * @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildEventSubTypeQuery
*/
- public static function create($modelAlias = null, Criteria $criteria = null)
+ public static function create(?string $modelAlias = null, ?Criteria $criteria = null): Criteria
{
if ($criteria instanceof ChildEventSubTypeQuery) {
return $criteria;
@@ -123,7 +128,7 @@ public static function create($modelAlias = null, Criteria $criteria = null)
*
* @return ChildEventSubType|array|mixed the result, formatted by the current formatter
*/
- public function findPk($key, ConnectionInterface $con = null)
+ public function findPk($key, ?ConnectionInterface $con = null)
{
if ($key === null) {
return null;
@@ -155,8 +160,8 @@ public function findPk($key, ConnectionInterface $con = null)
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @throws \Propel\Runtime\Exception\PropelException
*
@@ -188,8 +193,8 @@ protected function findPkSimple($key, ConnectionInterface $con)
/**
* Find object by primary key.
*
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
+ * @param mixed $key Primary key to use for the query
+ * @param ConnectionInterface $con A connection object
*
* @return ChildEventSubType|array|mixed the result, formatted by the current formatter
*/
@@ -209,12 +214,12 @@ protected function findPkComplex($key, ConnectionInterface $con)
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
+ * @param array $keys Primary keys to use for the query
+ * @param ConnectionInterface $con an optional connection object
*
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return Collection|array|mixed the list of results, formatted by the current formatter
*/
- public function findPks($keys, ConnectionInterface $con = null)
+ public function findPks($keys, ?ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
@@ -231,25 +236,31 @@ public function findPks($keys, ConnectionInterface $con = null)
/**
* Filter the query by primary key
*
- * @param mixed $key Primary key to use for the query
+ * @param mixed $key Primary key to use for the query
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
- return $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $key, Criteria::EQUAL);
+
+ return $this;
}
/**
* Filter the query by a list of primary keys
*
- * @param array $keys The list of primary key to use for the query
+ * @param array|int $keys The list of primary key to use for the query
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
- return $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $keys, Criteria::IN);
+
+ $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $keys, Criteria::IN);
+
+ return $this;
}
/**
@@ -262,15 +273,15 @@ public function filterByPrimaryKeys($keys)
* $query->filterById(array('min' => 12)); // WHERE id > 12
*
*
- * @param mixed $id The value to use as filter.
+ * @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterById($id = null, $comparison = null)
+ public function filterById($id = null, ?string $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
@@ -290,7 +301,9 @@ public function filterById($id = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $id, $comparison);
+ $this->addUsingAlias(EventSubTypeTableMap::COL_ID, $id, $comparison);
+
+ return $this;
}
/**
@@ -300,14 +313,15 @@ public function filterById($id = null, $comparison = null)
*
* $query->filterByName('fooValue'); // WHERE name = 'fooValue'
* $query->filterByName('%fooValue%', Criteria::LIKE); // WHERE name LIKE '%fooValue%'
+ * $query->filterByName(['foo', 'bar']); // WHERE name IN ('foo', 'bar')
*
*
- * @param string $name The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $name The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByName($name = null, $comparison = null)
+ public function filterByName($name = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($name)) {
@@ -315,7 +329,9 @@ public function filterByName($name = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventSubTypeTableMap::COL_NAME, $name, $comparison);
+ $this->addUsingAlias(EventSubTypeTableMap::COL_NAME, $name, $comparison);
+
+ return $this;
}
/**
@@ -325,14 +341,15 @@ public function filterByName($name = null, $comparison = null)
*
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%', Criteria::LIKE); // WHERE description LIKE '%fooValue%'
+ * $query->filterByDescription(['foo', 'bar']); // WHERE description IN ('foo', 'bar')
*
*
- * @param string $description The value to use as filter.
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|string[] $description The value to use as filter.
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByDescription($description = null, $comparison = null)
+ public function filterByDescription($description = null, ?string $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
@@ -340,27 +357,33 @@ public function filterByDescription($description = null, $comparison = null)
}
}
- return $this->addUsingAlias(EventSubTypeTableMap::COL_DESCRIPTION, $description, $comparison);
+ $this->addUsingAlias(EventSubTypeTableMap::COL_DESCRIPTION, $description, $comparison);
+
+ return $this;
}
/**
* Filter the query by a related \TechWilk\Rota\Event object
*
* @param \TechWilk\Rota\Event|ObjectCollection $event the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ * @param string|null $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function filterByEvent($event, $comparison = null)
+ public function filterByEvent($event, ?string $comparison = null)
{
if ($event instanceof \TechWilk\Rota\Event) {
- return $this
+ $this
->addUsingAlias(EventSubTypeTableMap::COL_ID, $event->getEventSubTypeId(), $comparison);
+
+ return $this;
} elseif ($event instanceof ObjectCollection) {
- return $this
+ $this
->useEventQuery()
->filterByPrimaryKeys($event->getPrimaryKeys())
->endUse();
+
+ return $this;
} else {
throw new PropelException('filterByEvent() only accepts arguments of type \TechWilk\Rota\Event or Collection');
}
@@ -369,12 +392,12 @@ public function filterByEvent($event, $comparison = null)
/**
* Adds a JOIN clause to the query using the Event relation
*
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string|null $relationAlias Optional alias for the relation
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
- public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOIN)
+ public function joinEvent(?string $relationAlias = null, ?string $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Event');
@@ -403,9 +426,9 @@ public function joinEvent($relationAlias = null, $joinType = Criteria::INNER_JOI
*
* @see useQuery()
*
- * @param string $relationAlias optional alias for the relation,
+ * @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \TechWilk\Rota\EventQuery A secondary query class using the current class as primary query
*/
@@ -416,12 +439,108 @@ public function useEventQuery($relationAlias = null, $joinType = Criteria::INNER
->useQuery($relationAlias ? $relationAlias : 'Event', '\TechWilk\Rota\EventQuery');
}
+ /**
+ * Use the Event relation Event object
+ *
+ * @param callable(\TechWilk\Rota\EventQuery):\TechWilk\Rota\EventQuery $callable A function working on the related query
+ *
+ * @param string|null $relationAlias optional alias for the relation
+ *
+ * @param string|null $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return $this
+ */
+ public function withEventQuery(
+ callable $callable,
+ string $relationAlias = null,
+ ?string $joinType = Criteria::INNER_JOIN
+ ) {
+ $relatedQuery = $this->useEventQuery(
+ $relationAlias,
+ $joinType
+ );
+ $callable($relatedQuery);
+ $relatedQuery->endUse();
+
+ return $this;
+ }
+
+ /**
+ * Use the relation to Event table for an EXISTS query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ * @param string $typeOfExists Either ExistsQueryCriterion::TYPE_EXISTS or ExistsQueryCriterion::TYPE_NOT_EXISTS
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the EXISTS statement
+ */
+ public function useEventExistsQuery($modelAlias = null, $queryClass = null, $typeOfExists = 'EXISTS')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, $typeOfExists);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT EXISTS query.
+ *
+ * @see useEventExistsQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the exists query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT EXISTS statement
+ */
+ public function useEventNotExistsQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useExistsQuery('Event', $modelAlias, $queryClass, 'NOT EXISTS');
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for an IN query.
+ *
+ * @see \Propel\Runtime\ActiveQuery\ModelCriteria::useInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the IN query, like ExtendedBookQuery::class
+ * @param string $typeOfIn Criteria::IN or Criteria::NOT_IN
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the IN statement
+ */
+ public function useInEventQuery($modelAlias = null, $queryClass = null, $typeOfIn = 'IN')
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, $typeOfIn);
+ return $q;
+ }
+
+ /**
+ * Use the relation to Event table for a NOT IN query.
+ *
+ * @see useEventInQuery()
+ *
+ * @param string|null $modelAlias sets an alias for the nested query
+ * @param string|null $queryClass Allows to use a custom query class for the NOT IN query, like ExtendedBookQuery::class
+ *
+ * @return \TechWilk\Rota\EventQuery The inner query object of the NOT IN statement
+ */
+ public function useNotInEventQuery($modelAlias = null, $queryClass = null)
+ {
+ /** @var $q \TechWilk\Rota\EventQuery */
+ $q = $this->useInQuery('Event', $modelAlias, $queryClass, 'NOT IN');
+ return $q;
+ }
+
/**
* Exclude object from result
*
- * @param ChildEventSubType $eventSubType Object to remove from the list of results
+ * @param ChildEventSubType $eventSubType Object to remove from the list of results
*
- * @return $this|ChildEventSubTypeQuery The current query, for fluid interface
+ * @return $this The current query, for fluid interface
*/
public function prune($eventSubType = null)
{
@@ -438,7 +557,7 @@ public function prune($eventSubType = null)
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
- public function doDeleteAll(ConnectionInterface $con = null)
+ public function doDeleteAll(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventSubTypeTableMap::DATABASE_NAME);
@@ -463,12 +582,12 @@ public function doDeleteAll(ConnectionInterface $con = null)
* Performs a DELETE on the database based on the current ModelCriteria
*
* @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
+ * @throws \Propel\Runtime\Exception\PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): int
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(EventSubTypeTableMap::DATABASE_NAME);
@@ -492,4 +611,5 @@ public function delete(ConnectionInterface $con = null)
return $affectedRows;
});
}
-} // EventSubTypeQuery
+
+}
diff --git a/generated-classes/TechWilk/Rota/Base/EventType.php b/generated-classes/TechWilk/Rota/Base/EventType.php
index 1e6ed34a..75f53126 100644
--- a/generated-classes/TechWilk/Rota/Base/EventType.php
+++ b/generated-classes/TechWilk/Rota/Base/EventType.php
@@ -38,19 +38,21 @@ abstract class EventType implements ActiveRecordInterface
{
/**
* TableMap class name
+ *
+ * @var string
*/
- const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventTypeTableMap';
+ public const TABLE_MAP = '\\TechWilk\\Rota\\Map\\EventTypeTableMap';
/**
* attribute to determine if this object has previously been saved.
- * @var boolean
+ * @var bool
*/
protected $new = true;
/**
* attribute to determine whether this object has been deleted.
- * @var boolean
+ * @var bool
*/
protected $deleted = false;
@@ -59,14 +61,14 @@ abstract class EventType implements ActiveRecordInterface
* Tracking modified columns allows us to only update modified columns.
* @var array
*/
- protected $modifiedColumns = array();
+ protected $modifiedColumns = [];
/**
* The (virtual) columns that are added at runtime
* The formatters can add supplementary columns based on a resultset
* @var array
*/
- protected $virtualColumns = array();
+ protected $virtualColumns = [];
/**
* The value for the id field.
@@ -92,28 +94,28 @@ abstract class EventType implements ActiveRecordInterface
/**
* The value for the defaultday field.
*
- * @var int
+ * @var int|null
*/
protected $defaultday;
/**
* The value for the defaulttime field.
*
- * @var DateTime
+ * @var DateTime|null
*/
protected $defaulttime;
/**
* The value for the defaultrepitition field.
*
- * @var int
+ * @var int|null
*/
protected $defaultrepitition;
/**
* The value for the defaultlocationid field.
*
- * @var int
+ * @var int|null
*/
protected $defaultlocationid;
@@ -140,6 +142,7 @@ abstract class EventType implements ActiveRecordInterface
/**
* @var ObjectCollection|ChildEvent[] Collection to store aggregation of ChildEvent objects.
+ * @phpstan-var ObjectCollection&\Traversable Collection to store aggregation of ChildEvent objects.
*/
protected $collEvents;
protected $collEventsPartial;
@@ -148,13 +151,14 @@ abstract class EventType implements ActiveRecordInterface
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
*
- * @var boolean
+ * @var bool
*/
protected $alreadyInSave = false;
/**
* An array of objects scheduled for deletion.
* @var ObjectCollection|ChildEvent[]
+ * @phpstan-var ObjectCollection&\Traversable
*/
protected $eventsScheduledForDeletion = null;
@@ -164,7 +168,7 @@ abstract class EventType implements ActiveRecordInterface
* equivalent initialization method).
* @see __construct()
*/
- public function applyDefaultValues()
+ public function applyDefaultValues(): void
{
$this->rehearsal = 0;
$this->groupformat = 0;
@@ -182,9 +186,9 @@ public function __construct()
/**
* Returns whether the object has been modified.
*
- * @return boolean True if the object has been modified.
+ * @return bool True if the object has been modified.
*/
- public function isModified()
+ public function isModified(): bool
{
return !!$this->modifiedColumns;
}
@@ -192,10 +196,10 @@ public function isModified()
/**
* Has specified column been modified?
*
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
+ * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
+ * @return bool True if $col has been modified.
*/
- public function isColumnModified($col)
+ public function isColumnModified(string $col): bool
{
return $this->modifiedColumns && isset($this->modifiedColumns[$col]);
}
@@ -204,7 +208,7 @@ public function isColumnModified($col)
* Get the columns that have been modified in this object.
* @return array A unique list of the modified column names for this object.
*/
- public function getModifiedColumns()
+ public function getModifiedColumns(): array
{
return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];
}
@@ -214,9 +218,9 @@ public function getModifiedColumns()
* be false, if the object was retrieved from storage or was created
* and then saved.
*
- * @return boolean true, if the object has never been persisted.
+ * @return bool True, if the object has never been persisted.
*/
- public function isNew()
+ public function isNew(): bool
{
return $this->new;
}
@@ -225,45 +229,43 @@ public function isNew()
* Setter for the isNew attribute. This method will be called
* by Propel-generated children and objects.
*
- * @param boolean $b the state of the object.
+ * @param bool $b the state of the object.
*/
- public function setNew($b)
+ public function setNew(bool $b): void
{
- $this->new = (boolean) $b;
+ $this->new = $b;
}
/**
* Whether this object has been deleted.
- * @return boolean The deleted state of this object.
+ * @return bool The deleted state of this object.
*/
- public function isDeleted()
+ public function isDeleted(): bool
{
return $this->deleted;
}
/**
* Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
+ * @param bool $b The deleted state of this object.
* @return void
*/
- public function setDeleted($b)
+ public function setDeleted(bool $b): void
{
- $this->deleted = (boolean) $b;
+ $this->deleted = $b;
}
/**
* Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
+ * @param string $col If supplied, only the specified column is reset.
* @return void
*/
- public function resetModified($col = null)
+ public function resetModified(?string $col = null): void
{
if (null !== $col) {
- if (isset($this->modifiedColumns[$col])) {
- unset($this->modifiedColumns[$col]);
- }
+ unset($this->modifiedColumns[$col]);
} else {
- $this->modifiedColumns = array();
+ $this->modifiedColumns = [];
}
}
@@ -272,10 +274,10 @@ public function resetModified($col = null)
* obj is an instance of EventType, delegates to
* equals(EventType). Otherwise, returns false.
*
- * @param mixed $obj The object to compare to.
- * @return boolean Whether equal to the object specified.
+ * @param mixed $obj The object to compare to.
+ * @return bool Whether equal to the object specified.
*/
- public function equals($obj)
+ public function equals($obj): bool
{
if (!$obj instanceof static) {
return false;
@@ -297,7 +299,7 @@ public function equals($obj)
*
* @return array
*/
- public function getVirtualColumns()
+ public function getVirtualColumns(): array
{
return $this->virtualColumns;
}
@@ -305,10 +307,10 @@ public function getVirtualColumns()
/**
* Checks the existence of a virtual column in this object
*
- * @param string $name The virtual column name
- * @return boolean
+ * @param string $name The virtual column name
+ * @return bool
*/
- public function hasVirtualColumn($name)
+ public function hasVirtualColumn(string $name): bool
{
return array_key_exists($name, $this->virtualColumns);
}
@@ -316,15 +318,15 @@ public function hasVirtualColumn($name)
/**
* Get the value of a virtual column in this object
*
- * @param string $name The virtual column name
+ * @param string $name The virtual column name
* @return mixed
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getVirtualColumn($name)
+ public function getVirtualColumn(string $name)
{
if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
+ throw new PropelException(sprintf('Cannot get value of nonexistent virtual column `%s`.', $name));
}
return $this->virtualColumns[$name];
@@ -333,12 +335,12 @@ public function getVirtualColumn($name)
/**
* Set the value of a virtual column in this object
*
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
+ * @param string $name The virtual column name
+ * @param mixed $value The value to give to the virtual column
*
- * @return $this|EventType The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function setVirtualColumn($name, $value)
+ public function setVirtualColumn(string $name, $value)
{
$this->virtualColumns[$name] = $value;
@@ -348,13 +350,13 @@ public function setVirtualColumn($name, $value)
/**
* Logs a message using Propel::log().
*
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
+ * @param string $msg
+ * @param int $priority One of the Propel::LOG_* logging levels
+ * @return void
*/
- protected function log($msg, $priority = Propel::LOG_INFO)
+ protected function log(string $msg, int $priority = Propel::LOG_INFO): void
{
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
+ Propel::log(get_class($this) . ': ' . $msg, $priority);
}
/**
@@ -365,24 +367,27 @@ protected function log($msg, $priority = Propel::LOG_INFO)
* => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
*
*
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
+ * @param \Propel\Runtime\Parser\AbstractParser|string $parser An AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.
+ * @return string The exported data
*/
- public function exportTo($parser, $includeLazyLoadColumns = true)
+ public function exportTo($parser, bool $includeLazyLoadColumns = true, string $keyType = TableMap::TYPE_PHPNAME): string
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
}
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
+ return $parser->fromArray($this->toArray($keyType, $includeLazyLoadColumns, array(), true));
}
/**
* Clean up internal collections prior to serializing
* Avoids recursive loops that turn into segmentation faults when serializing
+ *
+ * @return array
*/
- public function __sleep()
+ public function __sleep(): array
{
$this->clearAllReferences();
@@ -390,7 +395,7 @@ public function __sleep()
$propertyNames = [];
$serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
- foreach ($serializableProperties as $property) {
+ foreach($serializableProperties as $property) {
$propertyNames[] = $property->getName();
}
@@ -430,7 +435,7 @@ public function getDescription()
/**
* Get the [defaultday] column value.
*
- * @return int
+ * @return int|null
*/
public function getDefaultDay()
{
@@ -441,12 +446,14 @@ public function getDefaultDay()
* Get the [optionally formatted] temporal [defaulttime] column value.
*
*
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
+ * @param string|null $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
*
- * @return string|DateTime Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
+ * @return string|DateTime|null Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL.
*
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @throws \Propel\Runtime\Exception\PropelException - if unable to parse/validate the date/time value.
+ *
+ * @psalm-return ($format is null ? DateTime|null : string|null)
*/
public function getDefaultTime($format = null)
{
@@ -460,7 +467,7 @@ public function getDefaultTime($format = null)
/**
* Get the [defaultrepitition] column value.
*
- * @return int
+ * @return int|null
*/
public function getDefaultRepitition()
{
@@ -470,7 +477,7 @@ public function getDefaultRepitition()
/**
* Get the [defaultlocationid] column value.
*
- * @return int
+ * @return int|null
*/
public function getDefaultLocationId()
{
@@ -500,8 +507,8 @@ public function getGroupFormat()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setId($v)
{
@@ -515,13 +522,13 @@ public function setId($v)
}
return $this;
- } // setId()
+ }
/**
* Set the value of [name] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setName($v)
{
@@ -535,13 +542,13 @@ public function setName($v)
}
return $this;
- } // setName()
+ }
/**
* Set the value of [description] column.
*
- * @param string $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param string $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDescription($v)
{
@@ -555,13 +562,13 @@ public function setDescription($v)
}
return $this;
- } // setDescription()
+ }
/**
* Set the value of [defaultday] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDefaultDay($v)
{
@@ -575,14 +582,14 @@ public function setDefaultDay($v)
}
return $this;
- } // setDefaultDay()
+ }
/**
* Sets the value of [defaulttime] column to a normalized version of the date/time value specified.
*
- * @param mixed $v string, integer (timestamp), or \DateTimeInterface value.
+ * @param string|integer|\DateTimeInterface|null $v string, integer (timestamp), or \DateTimeInterface value.
* Empty strings are treated as NULL.
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @return $this The current object (for fluent API support)
*/
public function setDefaultTime($v)
{
@@ -595,13 +602,13 @@ public function setDefaultTime($v)
} // if either are not null
return $this;
- } // setDefaultTime()
+ }
/**
* Set the value of [defaultrepitition] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDefaultRepitition($v)
{
@@ -615,13 +622,13 @@ public function setDefaultRepitition($v)
}
return $this;
- } // setDefaultRepitition()
+ }
/**
* Set the value of [defaultlocationid] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int|null $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setDefaultLocationId($v)
{
@@ -639,13 +646,13 @@ public function setDefaultLocationId($v)
}
return $this;
- } // setDefaultLocationId()
+ }
/**
* Set the value of [rehearsal] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setRehearsal($v)
{
@@ -659,13 +666,13 @@ public function setRehearsal($v)
}
return $this;
- } // setRehearsal()
+ }
/**
* Set the value of [groupformat] column.
*
- * @param int $v new value
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param int $v New value
+ * @return $this The current object (for fluent API support)
*/
public function setGroupFormat($v)
{
@@ -679,7 +686,7 @@ public function setGroupFormat($v)
}
return $this;
- } // setGroupFormat()
+ }
/**
* Indicates whether the columns in this object are only set to default values.
@@ -687,21 +694,21 @@ public function setGroupFormat($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return bool Whether the columns in this object are only been set with default values.
*/
- public function hasOnlyDefaultValues()
+ public function hasOnlyDefaultValues(): bool
{
- if ($this->rehearsal !== 0) {
- return false;
- }
+ if ($this->rehearsal !== 0) {
+ return false;
+ }
- if ($this->groupformat !== 0) {
- return false;
- }
+ if ($this->groupformat !== 0) {
+ return false;
+ }
// otherwise, everything was equal, so return TRUE
return true;
- } // hasOnlyDefaultValues()
+ }
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -711,19 +718,20 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
+ * @param array $row The row returned by DataFetcher->fetch().
+ * @param int $startcol 0-based offset column which indicates which resultset column to start with.
+ * @param bool $rehydrate Whether this object is being re-hydrated from the database.
+ * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @return int next starting column
+ * @throws \Propel\Runtime\Exception\PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
+ public function hydrate(array $row, int $startcol = 0, bool $rehydrate = false, string $indexType = TableMap::TYPE_NUM): int
{
try {
+
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : EventTypeTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -750,8 +758,8 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : EventTypeTableMap::translateFieldName('GroupFormat', TableMap::TYPE_PHPNAME, $indexType)];
$this->groupformat = (null !== $col) ? (int) $col : null;
- $this->resetModified();
+ $this->resetModified();
$this->setNew(false);
if ($rehydrate) {
@@ -759,6 +767,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
}
return $startcol + 9; // 9 = EventTypeTableMap::NUM_HYDRATE_COLUMNS.
+
} catch (Exception $e) {
throw new PropelException(sprintf('Error populating %s object', '\\TechWilk\\Rota\\EventType'), 0, $e);
}
@@ -775,26 +784,27 @@ public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = Ta
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function ensureConsistency()
+ public function ensureConsistency(): void
{
if ($this->aLocation !== null && $this->defaultlocationid !== $this->aLocation->getId()) {
$this->aLocation = null;
}
- } // ensureConsistency
+ }
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
+ * @param bool $deep (optional) Whether to also de-associated any related objects.
+ * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
* @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @throws \Propel\Runtime\Exception\PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
- public function reload($deep = false, ConnectionInterface $con = null)
+ public function reload(bool $deep = false, ?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
@@ -823,19 +833,20 @@ public function reload($deep = false, ConnectionInterface $con = null)
$this->aLocation = null;
$this->collEvents = null;
+
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
* @return void
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see EventType::setDeleted()
* @see EventType::isDeleted()
*/
- public function delete(ConnectionInterface $con = null)
+ public function delete(?ConnectionInterface $con = null): void
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
@@ -865,12 +876,12 @@ public function delete(ConnectionInterface $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- public function save(ConnectionInterface $con = null)
+ public function save(?ConnectionInterface $con = null): int
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
@@ -915,12 +926,12 @@ public function save(ConnectionInterface $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param ConnectionInterface $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws \Propel\Runtime\Exception\PropelException
* @see save()
*/
- protected function doSave(ConnectionInterface $con)
+ protected function doSave(ConnectionInterface $con): int
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
@@ -967,22 +978,23 @@ protected function doSave(ConnectionInterface $con)
}
$this->alreadyInSave = false;
+
}
return $affectedRows;
- } // doSave()
+ }
/**
* Insert the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
* @see doSave()
*/
- protected function doInsert(ConnectionInterface $con)
+ protected function doInsert(ConnectionInterface $con): void
{
- $modifiedColumns = array();
+ $modifiedColumns = [];
$index = 0;
$this->modifiedColumns[EventTypeTableMap::COL_ID] = true;
@@ -1031,30 +1043,39 @@ protected function doInsert(ConnectionInterface $con)
switch ($columnName) {
case 'id':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
+
break;
case 'name':
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
+
break;
case 'description':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+
break;
case 'defaultDay':
$stmt->bindValue($identifier, $this->defaultday, PDO::PARAM_INT);
+
break;
case 'defaultTime':
- $stmt->bindValue($identifier, $this->defaulttime ? $this->defaulttime->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
+ $stmt->bindValue($identifier, $this->defaulttime ? $this->defaulttime->format("H:i:s.u") : null, PDO::PARAM_STR);
+
break;
case 'defaultRepitition':
$stmt->bindValue($identifier, $this->defaultrepitition, PDO::PARAM_INT);
+
break;
case 'defaultLocationId':
$stmt->bindValue($identifier, $this->defaultlocationid, PDO::PARAM_INT);
+
break;
case 'rehearsal':
$stmt->bindValue($identifier, $this->rehearsal, PDO::PARAM_INT);
+
break;
case 'groupformat':
$stmt->bindValue($identifier, $this->groupformat, PDO::PARAM_INT);
+
break;
}
}
@@ -1077,12 +1098,12 @@ protected function doInsert(ConnectionInterface $con)
/**
* Update the row in the database.
*
- * @param ConnectionInterface $con
+ * @param ConnectionInterface $con
*
- * @return Integer Number of updated rows
+ * @return int Number of updated rows
* @see doSave()
*/
- protected function doUpdate(ConnectionInterface $con)
+ protected function doUpdate(ConnectionInterface $con): int
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
@@ -1093,14 +1114,14 @@ protected function doUpdate(ConnectionInterface $con)
/**
* Retrieves a field from the object by name passed in as a string.
*
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
* @return mixed Value of field.
*/
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
+ public function getByName(string $name, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
$field = $this->getByPosition($pos);
@@ -1112,42 +1133,41 @@ public function getByName($name, $type = TableMap::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
+ * @param int $pos Position in XML schema
* @return mixed Value of field at $pos
*/
- public function getByPosition($pos)
+ public function getByPosition(int $pos)
{
switch ($pos) {
case 0:
return $this->getId();
- break;
+
case 1:
return $this->getName();
- break;
+
case 2:
return $this->getDescription();
- break;
+
case 3:
return $this->getDefaultDay();
- break;
+
case 4:
return $this->getDefaultTime();
- break;
+
case 5:
return $this->getDefaultRepitition();
- break;
+
case 6:
return $this->getDefaultLocationId();
- break;
+
case 7:
return $this->getRehearsal();
- break;
+
case 8:
return $this->getGroupFormat();
- break;
+
default:
return null;
- break;
} // switch()
}
@@ -1157,23 +1177,23 @@ public function getByPosition($pos)
* You can specify the key type of the array by passing one of the class
* type constants.
*
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
+ * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
+ * @param bool $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
+ * @param bool $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array An associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
+ public function toArray(string $keyType = TableMap::TYPE_PHPNAME, bool $includeLazyLoadColumns = true, array $alreadyDumpedObjects = [], bool $includeForeignObjects = false): array
{
if (isset($alreadyDumpedObjects['EventType'][$this->hashCode()])) {
- return '*RECURSION*';
+ return ['*RECURSION*'];
}
$alreadyDumpedObjects['EventType'][$this->hashCode()] = true;
$keys = EventTypeTableMap::getFieldNames($keyType);
- $result = array(
+ $result = [
$keys[0] => $this->getId(),
$keys[1] => $this->getName(),
$keys[2] => $this->getDescription(),
@@ -1183,9 +1203,9 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$keys[6] => $this->getDefaultLocationId(),
$keys[7] => $this->getRehearsal(),
$keys[8] => $this->getGroupFormat(),
- );
+ ];
if ($result[$keys[4]] instanceof \DateTimeInterface) {
- $result[$keys[4]] = $result[$keys[4]]->format('c');
+ $result[$keys[4]] = $result[$keys[4]]->format('H:i:s.u');
}
$virtualColumns = $this->virtualColumns;
@@ -1195,6 +1215,7 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
if ($includeForeignObjects) {
if (null !== $this->aLocation) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'location';
@@ -1206,9 +1227,10 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
$key = 'Location';
}
- $result[$key] = $this->aLocation->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
+ $result[$key] = $this->aLocation->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->collEvents) {
+
switch ($keyType) {
case TableMap::TYPE_CAMELNAME:
$key = 'events';
@@ -1230,30 +1252,32 @@ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColum
/**
* Sets a field from the object by name passed in as a string.
*
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
+ * @param string $name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
* one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* Defaults to TableMap::TYPE_PHPNAME.
- * @return $this|\TechWilk\Rota\EventType
+ * @return $this
*/
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
+ public function setByName(string $name, $value, string $type = TableMap::TYPE_PHPNAME)
{
$pos = EventTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- return $this->setByPosition($pos, $value);
+ $this->setByPosition($pos, $value);
+
+ return $this;
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return $this|\TechWilk\Rota\EventType
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return $this
*/
- public function setByPosition($pos, $value)
+ public function setByPosition(int $pos, $value)
{
switch ($pos) {
case 0:
@@ -1301,11 +1325,11 @@ public function setByPosition($pos, $value)
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
* The default key type is the column's TableMap::TYPE_PHPNAME.
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return $this
*/
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
+ public function fromArray(array $arr, string $keyType = TableMap::TYPE_PHPNAME)
{
$keys = EventTypeTableMap::getFieldNames($keyType);
@@ -1336,6 +1360,8 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
if (array_key_exists($keys[8], $arr)) {
$this->setGroupFormat($arr[$keys[8]]);
}
+
+ return $this;
}
/**
@@ -1355,9 +1381,9 @@ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
* @param string $data The source data to import from
* @param string $keyType The type of keys the array uses.
*
- * @return $this|\TechWilk\Rota\EventType The current object, for fluid interface
+ * @return $this The current object, for fluid interface
*/
- public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
+ public function importFrom($parser, string $data, string $keyType = TableMap::TYPE_PHPNAME)
{
if (!$parser instanceof AbstractParser) {
$parser = AbstractParser::getParser($parser);
@@ -1371,9 +1397,9 @@ public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing all modified values.
*/
- public function buildCriteria()
+ public function buildCriteria(): Criteria
{
$criteria = new Criteria(EventTypeTableMap::DATABASE_NAME);
@@ -1412,13 +1438,13 @@ public function buildCriteria()
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
+ * of whether they have been modified.
*
* @throws LogicException if no primary key is defined
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return \Propel\Runtime\ActiveQuery\Criteria The Criteria object containing value(s) for primary key(s).
*/
- public function buildPkeyCriteria()
+ public function buildPkeyCriteria(): Criteria
{
$criteria = ChildEventTypeQuery::create();
$criteria->add(EventTypeTableMap::COL_ID, $this->id);
@@ -1430,7 +1456,7 @@ public function buildPkeyCriteria()
* If the primary key is not null, return the hashcode of the
* primary key. Otherwise, return the hash code of the object.
*
- * @return int Hashcode
+ * @return int|string Hashcode
*/
public function hashCode()
{
@@ -1460,19 +1486,20 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
+ * @param int|null $key Primary key.
* @return void
*/
- public function setPrimaryKey($key)
+ public function setPrimaryKey(?int $key = null): void
{
$this->setId($key);
}
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ *
+ * @return bool
*/
- public function isPrimaryKeyNull()
+ public function isPrimaryKeyNull(): bool
{
return null === $this->getId();
}
@@ -1483,12 +1510,13 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of \TechWilk\Rota\EventType (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of \TechWilk\Rota\EventType (or compatible) type.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @return void
*/
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
+ public function copyInto(object $copyObj, bool $deepCopy = false, bool $makeNew = true): void
{
$copyObj->setName($this->getName());
$copyObj->setDescription($this->getDescription());
@@ -1509,11 +1537,12 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->addEvent($relObj->copy($deepCopy));
}
}
+
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
- $copyObj->setId(null); // this is a auto-increment column, so set to default value
+ $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
}
}
@@ -1525,11 +1554,11 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param bool $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return \TechWilk\Rota\EventType Clone of current object.
- * @throws PropelException
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function copy($deepCopy = false)
+ public function copy(bool $deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
@@ -1542,14 +1571,14 @@ public function copy($deepCopy = false)
/**
* Declares an association between this object and a ChildLocation object.
*
- * @param ChildLocation $v
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
- * @throws PropelException
+ * @param ChildLocation|null $v
+ * @return $this The current object (for fluent API support)
+ * @throws \Propel\Runtime\Exception\PropelException
*/
public function setLocation(ChildLocation $v = null)
{
if ($v === null) {
- $this->setDefaultLocationId(null);
+ $this->setDefaultLocationId(NULL);
} else {
$this->setDefaultLocationId($v->getId());
}
@@ -1570,11 +1599,11 @@ public function setLocation(ChildLocation $v = null)
/**
* Get the associated ChildLocation object
*
- * @param ConnectionInterface $con Optional Connection object.
- * @return ChildLocation The associated ChildLocation object.
- * @throws PropelException
+ * @param ConnectionInterface $con Optional Connection object.
+ * @return ChildLocation|null The associated ChildLocation object.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getLocation(ConnectionInterface $con = null)
+ public function getLocation(?ConnectionInterface $con = null)
{
if ($this->aLocation === null && ($this->defaultlocationid != 0)) {
$this->aLocation = ChildLocationQuery::create()->findPk($this->defaultlocationid, $con);
@@ -1596,12 +1625,12 @@ public function getLocation(ConnectionInterface $con = null)
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
- * @param string $relationName The name of the relation to initialize
+ * @param string $relationName The name of the relation to initialize
* @return void
*/
- public function initRelation($relationName)
+ public function initRelation($relationName): void
{
- if ('Event' == $relationName) {
+ if ('Event' === $relationName) {
$this->initEvents();
return;
}
@@ -1613,18 +1642,22 @@ public function initRelation($relationName)
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
- * @return void
- * @see addEvents()
+ * @return $this
+ * @see addEvents()
*/
public function clearEvents()
{
$this->collEvents = null; // important to set this to NULL since that means it is uninitialized
+
+ return $this;
}
/**
* Reset is the collEvents collection loaded partially.
+ *
+ * @return void
*/
- public function resetPartialEvents($v = true)
+ public function resetPartialEvents($v = true): void
{
$this->collEventsPartial = $v;
}
@@ -1636,12 +1669,12 @@ public function resetPartialEvents($v = true)
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
- * @param boolean $overrideExisting If set to true, the method call initializes
+ * @param bool $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
- public function initEvents($overrideExisting = true)
+ public function initEvents(bool $overrideExisting = true): void
{
if (null !== $this->collEvents && !$overrideExisting) {
return;
@@ -1662,18 +1695,28 @@ public function initEvents($overrideExisting = true)
* If this ChildEventType is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
- * @throws PropelException
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function getEvents(Criteria $criteria = null, ConnectionInterface $con = null)
+ public function getEvents(?Criteria $criteria = null, ?ConnectionInterface $con = null)
{
$partial = $this->collEventsPartial && !$this->isNew();
- if (null === $this->collEvents || null !== $criteria || $partial) {
- if ($this->isNew() && null === $this->collEvents) {
+ if (null === $this->collEvents || null !== $criteria || $partial) {
+ if ($this->isNew()) {
// return empty collection
- $this->initEvents();
+ if (null === $this->collEvents) {
+ $this->initEvents();
+ } else {
+ $collectionClassName = EventTableMap::getTableMap()->getCollectionClassName();
+
+ $collEvents = new $collectionClassName;
+ $collEvents->setModel('\TechWilk\Rota\Event');
+
+ return $collEvents;
+ }
} else {
$collEvents = ChildEventQuery::create(null, $criteria)
->filterByEventType($this)
@@ -1717,11 +1760,11 @@ public function getEvents(Criteria $criteria = null, ConnectionInterface $con =
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
- * @param Collection $events A Propel collection.
- * @param ConnectionInterface $con Optional connection object
- * @return $this|ChildEventType The current object (for fluent API support)
+ * @param Collection $events A Propel collection.
+ * @param ConnectionInterface $con Optional connection object
+ * @return $this The current object (for fluent API support)
*/
- public function setEvents(Collection $events, ConnectionInterface $con = null)
+ public function setEvents(Collection $events, ?ConnectionInterface $con = null)
{
/** @var ChildEvent[] $eventsToDelete */
$eventsToDelete = $this->getEvents(new Criteria(), $con)->diff($events);
@@ -1747,13 +1790,13 @@ public function setEvents(Collection $events, ConnectionInterface $con = null)
/**
* Returns the number of related Event objects.
*
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param ConnectionInterface $con
- * @return int Count of related Event objects.
- * @throws PropelException
+ * @param Criteria $criteria
+ * @param bool $distinct
+ * @param ConnectionInterface $con
+ * @return int Count of related Event objects.
+ * @throws \Propel\Runtime\Exception\PropelException
*/
- public function countEvents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
+ public function countEvents(?Criteria $criteria = null, bool $distinct = false, ?ConnectionInterface $con = null): int
{
$partial = $this->collEventsPartial && !$this->isNew();
if (null === $this->collEvents || null !== $criteria || $partial) {
@@ -1782,8 +1825,8 @@ public function countEvents(Criteria $criteria = null, $distinct = false, Connec
* Method called to associate a ChildEvent object to this object
* through the ChildEvent foreign key attribute.
*
- * @param ChildEvent $l ChildEvent
- * @return $this|\TechWilk\Rota\EventType The current object (for fluent API support)
+ * @param ChildEvent $l ChildEvent
+ * @return $this The current object (for fluent API support)
*/
public function addEvent(ChildEvent $l)
{
@@ -1806,15 +1849,15 @@ public function addEvent(ChildEvent $l)
/**
* @param ChildEvent $event The ChildEvent object to add.
*/
- protected function doAddEvent(ChildEvent $event)
+ protected function doAddEvent(ChildEvent $event): void
{
$this->collEvents[]= $event;
$event->setEventType($this);
}
/**
- * @param ChildEvent $event The ChildEvent object to remove.
- * @return $this|ChildEventType The current object (for fluent API support)
+ * @param ChildEvent $event The ChildEvent object to remove.
+ * @return $this The current object (for fluent API support)
*/
public function removeEvent(ChildEvent $event)
{
@@ -1844,12 +1887,13 @@ public function removeEvent(ChildEvent $event)
* api reasonable. You can provide public methods for those you
* actually need in EventType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinUser(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('User', $joinBehavior);
@@ -1869,12 +1913,13 @@ public function getEventsJoinUser(Criteria $criteria = null, ConnectionInterface
* api reasonable. You can provide public methods for those you
* actually need in EventType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventSubType(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventSubType(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventSubType', $joinBehavior);
@@ -1894,12 +1939,13 @@ public function getEventsJoinEventSubType(Criteria $criteria = null, ConnectionI
* api reasonable. You can provide public methods for those you
* actually need in EventType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinLocation(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('Location', $joinBehavior);
@@ -1919,12 +1965,13 @@ public function getEventsJoinLocation(Criteria $criteria = null, ConnectionInter
* api reasonable. You can provide public methods for those you
* actually need in EventType.
*
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param ConnectionInterface $con optional connection object
+ * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return ObjectCollection|ChildEvent[] List of ChildEvent objects
+ * @phpstan-return ObjectCollection&\Traversable List of ChildEvent objects
*/
- public function getEventsJoinEventGroup(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
+ public function getEventsJoinEventGroup(?Criteria $criteria = null, ?ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
{
$query = ChildEventQuery::create(null, $criteria);
$query->joinWith('EventGroup', $joinBehavior);
@@ -1936,6 +1983,8 @@ public function getEventsJoinEventGroup(Criteria $criteria = null, ConnectionInt
* Clears the current object, sets all attributes to their default values and removes
* outgoing references as well as back-references (from other objects to this one. Results probably in a database
* change of those foreign objects when you call `save` there).
+ *
+ * @return $this
*/
public function clear()
{
@@ -1957,6 +2006,8 @@ public function clear()
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
+
+ return $this;
}
/**
@@ -1965,9 +2016,10 @@ public function clear()
* This method is used to reset all php object references (not the actual reference in the database).
* Necessary for object serialisation.
*
- * @param boolean $deep Whether to also clear the references on all referrer objects.
+ * @param bool $deep Whether to also clear the references on all referrer objects.
+ * @return $this
*/
- public function clearAllReferences($deep = false)
+ public function clearAllReferences(bool $deep = false)
{
if ($deep) {
if ($this->collEvents) {
@@ -1979,6 +2031,7 @@ public function clearAllReferences($deep = false)
$this->collEvents = null;
$this->aLocation = null;
+ return $this;
}
/**
@@ -1993,99 +2046,79 @@ public function __toString()
/**
* Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preSave(ConnectionInterface $con = null)
+ public function preSave(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preSave')) {
- return parent::preSave($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after persisting the object
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postSave(ConnectionInterface $con = null)
+ public function postSave(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postSave')) {
- parent::postSave($con);
- }
- }
+ }
/**
* Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preInsert(ConnectionInterface $con = null)
+ public function preInsert(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preInsert')) {
- return parent::preInsert($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after inserting to database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postInsert(ConnectionInterface $con = null)
+ public function postInsert(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postInsert')) {
- parent::postInsert($con);
- }
- }
+ }
/**
* Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preUpdate(ConnectionInterface $con = null)
+ public function preUpdate(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preUpdate')) {
- return parent::preUpdate($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after updating the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postUpdate(ConnectionInterface $con = null)
+ public function postUpdate(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postUpdate')) {
- parent::postUpdate($con);
- }
- }
+ }
/**
* Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
+ * @param ConnectionInterface|null $con
+ * @return bool
*/
- public function preDelete(ConnectionInterface $con = null)
+ public function preDelete(?ConnectionInterface $con = null): bool
{
- if (is_callable('parent::preDelete')) {
- return parent::preDelete($con);
- }
- return true;
+ return true;
}
/**
* Code to be run after deleting the object in database
- * @param ConnectionInterface $con
+ * @param ConnectionInterface|null $con
+ * @return void
*/
- public function postDelete(ConnectionInterface $con = null)
+ public function postDelete(?ConnectionInterface $con = null): void
{
- if (is_callable('parent::postDelete')) {
- parent::postDelete($con);
- }
- }
+ }
/**
@@ -2095,7 +2128,7 @@ public function postDelete(ConnectionInterface $con = null)
* Allows to define default __call() behavior if you overwrite __call()
*
* @param string $name
- * @param mixed $params
+ * @param mixed $params
*
* @return array|string
*/
@@ -2115,17 +2148,21 @@ public function __call($name, $params)
if (0 === strpos($name, 'from')) {
$format = substr($name, 4);
+ $inputData = $params[0];
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->importFrom($format, reset($params));
+ return $this->importFrom($format, $inputData, $keyType);
}
if (0 === strpos($name, 'to')) {
$format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
+ $includeLazyLoadColumns = $params[0] ?? true;
+ $keyType = $params[1] ?? TableMap::TYPE_PHPNAME;
- return $this->exportTo($format, $includeLazyLoadColumns);
+ return $this->exportTo($format, $includeLazyLoadColumns, $keyType);
}
throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
}
+
}
diff --git a/generated-classes/TechWilk/Rota/Base/EventTypeQuery.php b/generated-classes/TechWilk/Rota/Base/EventTypeQuery.php
index 8ebc9914..42c57989 100644
--- a/generated-classes/TechWilk/Rota/Base/EventTypeQuery.php
+++ b/generated-classes/TechWilk/Rota/Base/EventTypeQuery.php
@@ -8,6 +8,7 @@
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveQuery\ModelJoin;
+use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Collection\ObjectCollection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\PropelException;
@@ -16,9 +17,7 @@
use TechWilk\Rota\Map\EventTypeTableMap;
/**
- * Base class that represents a query for the 'eventTypes' table.
- *
- *
+ * Base class that represents a query for the `eventTypes` table.
*
* @method ChildEventTypeQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildEventTypeQuery orderByName($order = Criteria::ASC) Order by the name column
@@ -70,21 +69,21 @@
*
* @method \TechWilk\Rota\LocationQuery|\TechWilk\Rota\EventQuery endUse() Finalizes a secondary criteria and merges it with its primary Criteria
*
- * @method ChildEventType findOne(ConnectionInterface $con = null) Return the first ChildEventType matching the query
- * @method ChildEventType findOneOrCreate(ConnectionInterface $con = null) Return the first ChildEventType matching the query, or a new ChildEventType object populated from the query conditions when no match is found
+ * @method ChildEventType|null findOne(?ConnectionInterface $con = null) Return the first ChildEventType matching the query
+ * @method ChildEventType findOneOrCreate(?ConnectionInterface $con = null) Return the first ChildEventType matching the query, or a new ChildEventType object populated from the query conditions when no match is found
*
- * @method ChildEventType findOneById(int $id) Return the first ChildEventType filtered by the id column
- * @method ChildEventType findOneByName(string $name) Return the first ChildEventType filtered by the name column
- * @method ChildEventType findOneByDescription(string $description) Return the first ChildEventType filtered by the description column
- * @method ChildEventType findOneByDefaultDay(int $defaultDay) Return the first ChildEventType filtered by the defaultDay column
- * @method ChildEventType findOneByDefaultTime(string $defaultTime) Return the first ChildEventType filtered by the defaultTime column
- * @method ChildEventType findOneByDefaultRepitition(int $defaultRepitition) Return the first ChildEventType filtered by the defaultRepitition column
- * @method ChildEventType findOneByDefaultLocationId(int $defaultLocationId) Return the first ChildEventType filtered by the defaultLocationId column
- * @method ChildEventType findOneByRehearsal(int $rehearsal) Return the first ChildEventType filtered by the rehearsal column
- * @method ChildEventType findOneByGroupFormat(int $groupformat) Return the first ChildEventType filtered by the groupformat column *
-
- * @method ChildEventType requirePk($key, ConnectionInterface $con = null) Return the ChildEventType by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
- * @method ChildEventType requireOne(ConnectionInterface $con = null) Return the first ChildEventType matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventType|null findOneById(int $id) Return the first ChildEventType filtered by the id column
+ * @method ChildEventType|null findOneByName(string $name) Return the first ChildEventType filtered by the name column
+ * @method ChildEventType|null findOneByDescription(string $description) Return the first ChildEventType filtered by the description column
+ * @method ChildEventType|null findOneByDefaultDay(int $defaultDay) Return the first ChildEventType filtered by the defaultDay column
+ * @method ChildEventType|null findOneByDefaultTime(string $defaultTime) Return the first ChildEventType filtered by the defaultTime column
+ * @method ChildEventType|null findOneByDefaultRepitition(int $defaultRepitition) Return the first ChildEventType filtered by the defaultRepitition column
+ * @method ChildEventType|null findOneByDefaultLocationId(int $defaultLocationId) Return the first ChildEventType filtered by the defaultLocationId column
+ * @method ChildEventType|null findOneByRehearsal(int $rehearsal) Return the first ChildEventType filtered by the rehearsal column
+ * @method ChildEventType|null findOneByGroupFormat(int $groupformat) Return the first ChildEventType filtered by the groupformat column
+ *
+ * @method ChildEventType requirePk($key, ?ConnectionInterface $con = null) Return the ChildEventType by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
+ * @method ChildEventType requireOne(?ConnectionInterface $con = null) Return the first ChildEventType matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
* @method ChildEventType requireOneById(int $id) Return the first ChildEventType filtered by the id column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventType requireOneByName(string $name) Return the first ChildEventType filtered by the name column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
@@ -96,18 +95,30 @@
* @method ChildEventType requireOneByRehearsal(int $rehearsal) Return the first ChildEventType filtered by the rehearsal column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
* @method ChildEventType requireOneByGroupFormat(int $groupformat) Return the first ChildEventType filtered by the groupformat column and throws \Propel\Runtime\Exception\EntityNotFoundException when not found
*
- * @method ChildEventType[]|ObjectCollection find(ConnectionInterface $con = null) Return ChildEventType objects based on current ModelCriteria
- * @method ChildEventType[]|ObjectCollection findById(int $id) Return ChildEventType objects filtered by the id column
- * @method ChildEventType[]|ObjectCollection findByName(string $name) Return ChildEventType objects filtered by the name column
- * @method ChildEventType[]|ObjectCollection findByDescription(string $description) Return ChildEventType objects filtered by the description column
- * @method ChildEventType[]|ObjectCollection findByDefaultDay(int $defaultDay) Return ChildEventType objects filtered by the defaultDay column
- * @method ChildEventType[]|ObjectCollection findByDefaultTime(string $defaultTime) Return ChildEventType objects filtered by the defaultTime column
- * @method ChildEventType[]|ObjectCollection findByDefaultRepitition(int $defaultRepitition) Return ChildEventType objects filtered by the defaultRepitition column
- * @method ChildEventType[]|ObjectCollection findByDefaultLocationId(int $defaultLocationId) Return ChildEventType objects filtered by the defaultLocationId column
- * @method ChildEventType[]|ObjectCollection findByRehearsal(int $rehearsal) Return ChildEventType objects filtered by the rehearsal column
- * @method ChildEventType[]|ObjectCollection findByGroupFormat(int $groupformat) Return ChildEventType objects filtered by the groupformat column
- * @method ChildEventType[]|\Propel\Runtime\Util\PropelModelPager paginate($page = 1, $maxPerPage = 10, ConnectionInterface $con = null) Issue a SELECT query based on the current ModelCriteria and uses a page and a maximum number of results per page to compute an offset and a limit
+ * @method ChildEventType[]|Collection find(?ConnectionInterface $con = null) Return ChildEventType objects based on current ModelCriteria
+ * @psalm-method Collection&\Traversable find(?ConnectionInterface $con = null) Return ChildEventType objects based on current ModelCriteria
+ *
+ * @method ChildEventType[]|Collection findById(int|array