Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,34 @@ jobs:
fail-fast: false
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
composer:
- ''
- '--prefer-lowest'
- '8.3'
- '8.4'
symfony_version:
- '5.4.*'
- '6.0.*'
- '6.1.*'
- '6.2.*'
- '6.3.*'
- '6.4.*'
exclude:
# symfony 6.1+ requires PHP 8.1+
- php: '8.0'
symfony_version: '6.1.*'
- php: '8.0'
symfony_version: '6.2.*'
- php: '8.0'
symfony_version: '6.3.*'
- php: '8.0'
symfony_version: '6.4.*'
# deps:
# - 'highest'
# - 'lowest'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use PHP
uses: shivammathur/setup-php@v2
Expand All @@ -38,22 +56,27 @@ jobs:

- name: cache dependencies
id: angular-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-

- name: Set Symfony minor version
run: |
sed -i 's|\("symfony/.*"\): ".*"|\1: "${{ matrix.symfony_version }}"|' composer.json
working-directory: ./

- name: Validate composer.json and composer.lock
run: composer validate
working-directory: ./

- name: Install dependencies
env:
COMPOSER_FLAGS: ${{ matrix.composer }}
run: composer update ${COMPOSER_FLAGS} --prefer-source
working-directory: ./
uses: ramsey/composer-install@v3
with:
# dependency-versions: '${{ matrix.deps }}'
working-directory: ./

- name: Run Tests
run: composer run-script ci-test
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Qodana
on:
push:

jobs:
qodana:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php:
- '8.1'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: sqlite3, zip
coverage: xdebug
tools: composer:v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-dir)"
working-directory: ./

- name: cache dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-

- name: Validate composer.json and composer.lock
run: composer validate
working-directory: ./

- name: Install dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
COMPOSER_FLAGS: ${{ matrix.composer }}
run: composer update ${COMPOSER_FLAGS} --prefer-source
working-directory: ./

- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2024.1
with:
args: --baseline,qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ Model/*/om
vendor
composer.lock
composer.phar

.phpunit.result.cache
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 24 additions & 32 deletions Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,53 +33,49 @@
* Additional Phing args to add in specialized commands.
* @var array
*/
protected $additionalPhingArgs = array();
protected $additionalPhingArgs = [];

Check notice on line 36 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
* Temporary XML schemas used on command execution.
* @var array
*/
protected $tempSchemas = array();
protected $tempSchemas = [];

Check notice on line 42 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
* @var string
*/
protected $cacheDir = null;

Check notice on line 47 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
* The Phing output.
* @string
*/
protected $buffer = null;

Check notice on line 53 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
* @var Symfony\Component\HttpKernel\Bundle\BundleInterface
*/
protected $bundle = null;

Check notice on line 58 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
* @var Boolean
*/
private $alreadyWroteConnection = false;

Check notice on line 63 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
*
* @var InputInterface
*/
protected $input;

Check notice on line 69 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

/**
*
* @var OutputInterface
*/
protected $output;

Check notice on line 75 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing property's type declaration

Missing property's type declaration

private ContainerInterface $container;

public function __construct(ContainerInterface $container, $name = null)
public function __construct(private ContainerInterface $container, $name = null)
{
$this->container = $container;

parent::__construct($name);
}

Expand All @@ -88,15 +84,15 @@
return $this->container;
}

/**

Check notice on line 87 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

PHPDoc comment signature is not complete

PHPDoc comment signature is not complete
* Return the package for a given bundle.
*
* @param Bundle $bundle
* @param string $baseDirectory The base directory to exclude from prefix.
*
* @return string
*/

Check notice on line 94 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

PHPDoc comment signature is not complete

PHPDoc comment signature is not complete
protected function getPackage(Bundle $bundle, $namespace = '', $baseDirectory = '')

Check notice on line 95 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$path = explode(DIRECTORY_SEPARATOR, realpath($bundle->getPath()));
$bundle_namespace = explode('\\', $bundle->getNamespace());
Expand Down Expand Up @@ -138,7 +134,7 @@
/**
* {@inheritdoc}
*/
protected function initialize(InputInterface $input, OutputInterface $output)

Check notice on line 137 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
parent::initialize($input, $output);

Expand All @@ -153,7 +149,7 @@

if ($input->hasArgument('bundle') && $input->getArgument('bundle')) {
$bundleName = $input->getArgument('bundle');
if (0 === strpos($bundleName, '@')) {
if (str_starts_with($bundleName, '@')) {
$bundleName = substr($bundleName, 1);
}

Expand All @@ -161,13 +157,13 @@
}
}

/**

Check notice on line 160 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing @throws tag(s)

PHPDoc comment doesn't contain all the necessary @throws tags
* Call a Phing task.
*
* @param string $taskName A Propel task name.
* @param array $properties An array of properties to pass to Phing.
*/

Check notice on line 165 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing @throws tag(s)

PHPDoc comment doesn't contain all the necessary @throws tags
protected function callPhing($taskName, $properties = array())
protected function callPhing($taskName, $properties = [])

Check notice on line 166 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 166 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 166 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
$kernel = $this->getApplication()->getKernel();

Expand Down Expand Up @@ -197,7 +193,7 @@

// Add any arbitrary arguments last
foreach ($this->additionalPhingArgs as $arg) {
if (in_array($arg, array('verbose', 'debug'))) {
if (in_array($arg, ['verbose', 'debug'])) {
$bufferPhingOutput = false;
}

Expand All @@ -207,8 +203,8 @@
$args[] = $taskName;

// Enable output buffering
Phing::setOutputStream(new \OutputStream(fopen('php://output', 'w')));

Check notice on line 206 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
Phing::setErrorStream(new \OutputStream(fopen('php://output', 'w')));

Check notice on line 207 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
Phing::startup();
Phing::setProperty('phing.home', getenv('PHING_HOME'));

Expand All @@ -229,7 +225,7 @@
strstr($this->buffer, 'failed for the following reason:')) {
$returnStatus = false;
}
} catch (\Exception $e) {
} catch (\Exception) {

Check notice on line 228 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
$returnStatus = false;
}

Expand All @@ -251,10 +247,10 @@

$base = ltrim(realpath($kernel->getProjectDir()), DIRECTORY_SEPARATOR);

/** @var array<string, array{?BundleInterface, \SplFileInfo}> $finalSchemas */

Check notice on line 250 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
$finalSchemas = $this->getFinalSchemas($kernel, $this->bundle);
foreach ($finalSchemas as $schema) {
list($bundle, $finalSchema) = $schema;
[$bundle, $finalSchema] = $schema;

if ($bundle) {
$file = $cacheDir.DIRECTORY_SEPARATOR.'bundle-'.$bundle->getName().'-'.$finalSchema->getBaseName();
Expand All @@ -267,7 +263,7 @@
// the package needs to be set absolute
// besides, the automated namespace to package conversion has
// not taken place yet so it needs to be done manually
$database = simplexml_load_file($file);

Check warning on line 266 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Extension is missing in composer.json

'ext-simplexml' is missing in composer.json

if (isset($database['package'])) {
// Do not use the prefix!
Expand All @@ -280,7 +276,7 @@
$database['package'] = $this->getPackageFromApp((string)$database['namespace']);
}
} else {
throw new \RuntimeException(

Check notice on line 279 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
sprintf(
'%s : Please define a `package` attribute or a `namespace` attribute for schema `%s`',
$bundle ? $bundle->getName() : 'App',
Expand Down Expand Up @@ -320,13 +316,13 @@
}
}

/**

Check notice on line 319 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

PHPDoc comment signature is not complete

PHPDoc comment signature is not complete
* Return a list of final schema files that will be processed.
*
* @param \Symfony\Component\HttpKernel\KernelInterface $kernel
*
* @return array
*/

Check notice on line 325 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

PHPDoc comment signature is not complete

PHPDoc comment signature is not complete
protected function getFinalSchemas(KernelInterface $kernel, BundleInterface $bundle = null)
{
if (null !== $bundle) {
Expand All @@ -337,10 +333,10 @@
}

/**
* @param \SplFileInfo $file

Check notice on line 336 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
* @return string
*/
protected function getRelativeFileName(\SplFileInfo $file)

Check notice on line 339 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
{
return substr(str_replace(realpath($this->getContainer()->getParameter('kernel.project_dir')), '', $file), 1);
}
Expand All @@ -351,7 +347,7 @@
* @param KernelInterface $kernel The application kernel.
* @param string $file Should be 'build.properties'.
*/
protected function createBuildPropertiesFile(KernelInterface $kernel, $file)

Check notice on line 350 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$filesystem = new Filesystem();
$buildPropertiesFile = $kernel->getProjectDir().'/app/config/propel.ini';
Expand All @@ -368,12 +364,12 @@
*
* @param string $file Should be 'buildtime-conf.xml'.
*/
protected function createBuildTimeFile($file)

Check notice on line 367 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$container = $this->getContainer();

if (!$container->has('propel.configuration')) {
throw new \InvalidArgumentException('Could not find Propel configuration.');

Check notice on line 372 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
}

$xml = strtr(<<<EOT
Expand All @@ -383,7 +379,7 @@
<datasources default="%default_connection%">

EOT
, array('%default_connection%' => $container->getParameter('propel.dbal.default_connection')));
, ['%default_connection%' => $container->getParameter('propel.dbal.default_connection')]);

$propelConfiguration = $container->get('propel.configuration');
foreach ($propelConfiguration['datasources'] as $name => $datasource) {
Expand All @@ -403,14 +399,14 @@
</datasource>

EOT
, array(
, [
'%name%' => $name,
'%adapter%' => $datasource['adapter'],
'%classname%'=> $datasource['connection']['classname'],
'%dsn%' => $datasource['connection']['dsn'],
'%username%' => $datasource['connection']['user'],
'%password%' => isset($datasource['connection']['password']) ? $datasource['connection']['password'] : '',
));
'%password%' => $datasource['connection']['password'] ?? '',
]);
}

$xml .= <<<EOT
Expand All @@ -422,24 +418,24 @@
file_put_contents($file, $xml);
}

/**

Check notice on line 421 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing @throws tag(s)

PHPDoc comment doesn't contain all the necessary @throws tags
* Returns an array of properties as key/value pairs from an input file.
*
* @param string $file A file properties.
* @return array An array of properties as key/value pairs.
*/

Check notice on line 426 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing @throws tag(s)

PHPDoc comment doesn't contain all the necessary @throws tags
protected function getProperties($file)

Check notice on line 427 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$properties = array();
$properties = [];

if (false === $lines = @file($file)) {
throw new \Exception(sprintf('Unable to parse contents of "%s".', $file));

Check notice on line 432 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
}

foreach ($lines as $line) {
$line = trim($line);

if ('' == $line || in_array($line[0], array('#', ';'))) {
if ('' == $line || in_array($line[0], ['#', ';'])) {
continue;
}

Expand Down Expand Up @@ -487,11 +483,11 @@
}

/**
* @return \Symfony\Component\Config\FileLocatorInterface

Check notice on line 486 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
*/
protected function getFileLocator()

Check notice on line 488 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
return $this->getContainer()->get('propel.file_locator');

Check warning on line 490 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Incompatible return type

Return value type is not compatible with declared
}

/**
Expand All @@ -515,7 +511,7 @@
* @throw \InvalidArgumentException If the connection does not exist.
* @return array
*/
protected function getConnection(InputInterface $input, OutputInterface $output)

Check notice on line 514 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
$propelConfiguration = $this->getContainer()->get('propel.configuration');
$name = $input->getOption('connection') ?: $this->getContainer()->getParameter('propel.dbal.default_connection');
Expand All @@ -523,7 +519,7 @@
if (isset($propelConfiguration['datasources'][$name])) {
$defaultConfig = $propelConfiguration['datasources'][$name];
} else {
throw new \InvalidArgumentException(sprintf('Connection named %s doesn\'t exist', $name));

Check notice on line 522 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
}

if (false === $this->alreadyWroteConnection) {
Expand All @@ -538,7 +534,7 @@
$defaultConfig['connection']['password'] = null;
}

return array($name, $defaultConfig);
return [$name, $defaultConfig];
}

/**
Expand All @@ -547,27 +543,23 @@
* @param string $dsn A DSN
* @return string The database name extracted from the given DSN
*/
protected function parseDbName($dsn)

Check notice on line 546 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
preg_match('#dbname=([a-zA-Z0-9\_]+)#', $dsn, $matches);

if (isset($matches[1])) {
return $matches[1];
}

// e.g. SQLite
return null;
return $matches[1] ?? null;
}

/**
* Check the PropelConfiguration object.
*/
protected function checkConfiguration()

Check notice on line 557 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
$parameters = $this->getContainer()->get('propel.configuration')->getParameters();

if (!isset($parameters['datasources']) || 0 === count($parameters['datasources'])) {
throw new \RuntimeException('Propel should be configured (no database configuration found).');

Check notice on line 562 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
}
}

Expand All @@ -577,10 +569,10 @@
* @param OutputInterface $output The output object.
* @param string $taskname A task name
*/
protected function writeSummary(OutputInterface $output, $taskname)

Check notice on line 572 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
foreach (explode("\n", $this->buffer) as $line) {
if (false !== strpos($line, '[' . $taskname . ']')) {
if (str_contains($line, '[' . $taskname . ']')) {
$arr = preg_split('#\[' . $taskname . '\] #', $line);
$info = $arr[1];

Expand All @@ -601,13 +593,13 @@
* @param string $text A text message.
* @param string $style A style to apply on the section.
*/
protected function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white')

Check notice on line 596 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 596 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$output->writeln(array(
$output->writeln([
'',
$this->getHelperSet()->get('formatter')->formatBlock($text, $style, true),
'',
));
]);
}

/**
Expand All @@ -617,22 +609,22 @@
* @param string $taskName A task name.
* @param Boolean $more Whether to add a 'more details' message or not.
*/
protected function writeTaskError($output, $taskName, $more = true)

Check notice on line 612 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 612 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 612 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$moreText = $more ? ' To get more details, run the command with the "--verbose" option.' : '';

return $this->writeSection($output, array(
return $this->writeSection($output, [
'[Propel] Error',
'',
'An error has occured during the "' . $taskName . '" task process.' . $moreText
), 'fg=white;bg=red');
], 'fg=white;bg=red');
}

/**
* @param OutputInterface $output The output.
* @param string $filename The filename.
*/
protected function writeNewFile(OutputInterface $output, $filename)

Check notice on line 627 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$output->writeln('>> <info>File+</info> ' . $filename);
}
Expand All @@ -641,7 +633,7 @@
* @param OutputInterface $output The output.
* @param string $directory The directory.
*/
protected function writeNewDirectory(OutputInterface $output, $directory)

Check notice on line 636 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
$output->writeln('>> <info>Dir+</info> ' . $directory);
}
Expand All @@ -653,17 +645,17 @@
* @param string $question A given question.
* @param string $default A default response.
*/
protected function askConfirmation(OutputInterface $output, $question, $default = null)

Check notice on line 648 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration

Check notice on line 648 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing parameter's type declaration

Missing parameter's type declaration
{
return $this->getHelper('question')->ask($this->input, $output, new ConfirmationQuestion($question, $default));
}

/**
* @param \SplFileInfo $schema

Check notice on line 654 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import
* @param BundleInterface $bundle
* @return string
*/
protected function transformToLogicalName(\SplFileInfo $schema, BundleInterface $bundle)

Check notice on line 658 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Fully qualified name usage

Qualifier can be replaced with an import

Check notice on line 658 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
$schemaPath = str_replace(
$bundle->getPath(). DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR,
Expand All @@ -678,12 +670,12 @@
* Compiles arguments/properties for the Phing process.
* @return array
*/
private function getPhingArguments(KernelInterface $kernel, $workingDirectory, $properties)

Check notice on line 673 in Command/AbstractCommand.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Missing return type declaration

Missing function's return type declaration
{
$args = array();
$args = [];

// Default properties
$properties = array_merge(array(
$properties = array_merge([
'propel.database' => 'mysql',
'project.dir' => $workingDirectory,
'propel.output.dir' => $kernel->getProjectDir().'/app/propel',
Expand All @@ -696,7 +688,7 @@
'propel.addClassLevelComment' => false,
'propel.defaultTimeStampFormat' => '',
'propel.builder.pluralizer.class' => 'builder.util.StandardEnglishPluralizer',
), $properties);
], $properties);

// Adding user defined properties from the configuration
$properties = array_merge(
Expand Down
Loading
Loading