Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"packaged/ui": "~1.0",
"packaged/docblock": "~1.1",
"packaged/i18n": "~1.2",
"symfony/console": "~4.2||~5.0",
"symfony/console": "~4.2||~5.0||~6.0||~7.0",
"psr/log": "~1.1||^2.0||^3.0"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" verbose="true" timeoutForSmallTests="5" timeoutForMediumTests="10" timeoutForLargeTests="15" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src</directory>
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Commands/BuiltInWebServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|mixed|null
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if(empty($this->host))
{
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Console extends Application implements ContextAware
* @return integer 0 if everything went fine, or an error code
* @throws \Throwable
*/
public function doRun(InputInterface $input, OutputInterface $output)
public function doRun(InputInterface $input, OutputInterface $output): int
{
$this->configure($this->getContext()->config());
return parent::doRun($input, $output);
Expand Down Expand Up @@ -145,7 +145,7 @@ protected function _prepareCommand(Command $command): Command
* @return Command
* @throws \Throwable
*/
public function find($name)
public function find($name): Command
{
try
{
Expand Down
6 changes: 3 additions & 3 deletions src/Console/ConsoleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ protected function initialize(InputInterface $input, OutputInterface $output)
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|mixed|null
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->_input = $input;
$this->_output = $output;
Expand All @@ -241,7 +241,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
return $this->_execute($input, $output) ?? 0;
}

protected function _execute(InputInterface $input, OutputInterface $output)
protected function _execute(InputInterface $input, OutputInterface $output): int
{
throw new \RuntimeException(
"Your command must contain one of the following methods:\n"
Expand Down
2 changes: 1 addition & 1 deletion src/I18n/TranslationUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TranslationUpdater implements CubexAware
protected $_file;
protected $_lang;

public function __construct(Cubex $cubex, MessageCatalog $catalog, $file, $lang, TranslationLogger $translationLogger = null)
public function __construct(Cubex $cubex, MessageCatalog $catalog, $file, $lang, ?TranslationLogger $translationLogger = null)
{
$this->_catalog = $catalog;
$this->_file = $file;
Expand Down
2 changes: 1 addition & 1 deletion src/ViewModel/ArrayModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function set(array $data = [])
return $this;
}

public function addItem($value, string $key = null)
public function addItem($value, ?string $key = null)
{
if($key === null)
{
Expand Down
5 changes: 3 additions & 2 deletions tests/Supporting/Console/TestExecuteConsoleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ class TestExecuteConsoleCommand extends ConsoleCommand
* @param InputInterface $input
* @param OutputInterface $output
*
* @return void
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
return 0;
}
}
Loading