Commit e5e258f9 authored by Mark Harding's avatar Mark Harding

(chore): add in static analysis

1 merge request!306WIP: (chore): add in static analysis
Pipeline #79192196 passed with stages
in 16 minutes and 13 seconds
......@@ -41,6 +41,13 @@ lint:
script:
- bin/php-cs-fixer fix --allow-risky=yes --verbose --dry-run
static-analysis:
stage: test
image: minds/php-tests:latest
script:
- bin/phpstan analyse --memory-limit=1G
allow_failure: true
prepare:fpm:
stage: prepare
image: minds/ci:latest
......
......@@ -13,7 +13,6 @@ use Minds\Core\Security;
use Minds\Entities;
use Minds\Helpers;
use Minds\Core\Messenger;
use Minds\Core\Messenger\Conversations;
use Minds\Interfaces;
use Minds\Api\Factory;
use Minds\Core\Sockets;
......
......@@ -10,6 +10,11 @@ class CypherQuery implements Interfaces\PreparedInterface
{
private $template;
private $values;
public function getOpts()
{
return null;
}
public function build()
{
......
......@@ -35,6 +35,11 @@ To enable admin functionality, set 'development_mode' to **true** in your settin
* To run all tests: ```bin/phpsec run```
* To run a specific spec, include a specific spec file ```bin/phpspec run Spec/Core/Feeds/Suggested/RepositorySpec.php```
* To run a specific test in a spec, include a specific spec file:line number of the test function: ```bin/phpspec run Spec/Core/Feeds/Suggested/RepositorySpec.php:82```
### Running static analysis
`bin/phpstan analyse --memory-limit=1G`
## Contributing
If you'd like to contribute to the Minds project, check out the [Contribution](https://www.minds.org/docs/contributing.html) section of Minds.org or head right over to the [Minds Open Source Community](https://www.minds.com/groups/profile/365903183068794880). If you've found or fixed a bug, let us know in the [Minds Help and Support Group](https://www.minds.com/groups/profile/100000000000000681/activity)!
......
......@@ -11,6 +11,10 @@ error_reporting(E_ALL);
ini_set('display_errors', 1);
date_default_timezone_set('UTC');
if (!isset($argv)) {
$argv = [];
}
array_shift($argv);
if (isset($argv[0]) && $argv[0] == 'help') {
......@@ -23,7 +27,8 @@ if (isset($argv[0]) && $argv[0] == 'help') {
if (!$argv) {
// TODO: list handlers?
echo "{$_SCRIPTNAME}: specify a controller" . PHP_EOL;
exit(1);
//exit(1);
return;
}
try {
......
This diff is collapsed.
parameters:
level: 1
paths:
- %currentWorkingDirectory%
excludes_analyse:
- %currentWorkingDirectory%/vendor
ignoreErrors:
## Ignoring Cassandra is temporary
-
message: '#Instantiated class Cassandra\\[a-zA-Z\\_]+ not found#'
path: %currentWorkingDirectory%
-
message: '#Call to static method text\(\) on an unknown class Cassandra\\Type\\Map#'
path: %currentWorkingDirectory%
-
message: '#Call to static method boolean\(\) on an unknown class Cassandra\\Type\\Map#'
path: %currentWorkingDirectory%
-
message: '#Call to static method varint\(\) on an unknown class Cassandra\\Type\\Set#'
path: %currentWorkingDirectory%
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment