FriendsOfSymfony1 / symfony1

[DEPRECATED -- Use Symfony instead] Fork of symfony 1.4 with DIC, form enhancements, latest Swiftmailer, better performance, composer compatible and PHP 8 support
https://symfony.com/legacy
MIT License
337 stars 175 forks source link

[QA] fix "return statement missing" errors #348

Open connorhu opened 3 months ago

connorhu commented 3 months ago

Errors like: "Function|Method ... should return ... but return statement is missing"

We should create PR by components:

Detailed report ``` 'message' => '#^Method sfAPCCache\\:\\:clean\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfAPCCache.class.php', -- 'message' => '#^Method sfAPCCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfAPCCache.class.php', -- 'message' => '#^Method sfAPCuCache\\:\\:clean\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfAPCuCache.class.php', -- 'message' => '#^Method sfAPCuCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfAPCuCache.class.php', -- 'message' => '#^Method sfEAcceleratorCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfEAcceleratorCache.class.php', -- 'message' => '#^Method sfFileCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfFileCache.class.php', -- 'message' => '#^Method sfMemcacheCache\\:\\:clean\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfMemcacheCache.class.php', -- 'message' => '#^Method sfMemcacheCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfMemcacheCache.class.php', -- 'message' => '#^Method sfXCacheCache\\:\\:removePattern\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/cache/sfXCacheCache.class.php', -- 'message' => '#^Method sfApplicationConfiguration\\:\\:getDecoratorDir\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/config/sfApplicationConfiguration.class.php', -- 'message' => '#^Method sfWebDebugPanel\\:\\:getTitleUrl\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanel.class.php', -- 'message' => '#^Method sfWebDebugPanelCache\\:\\:getPanelContent\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelCache.class.php', -- 'message' => '#^Method sfWebDebugPanelMailer\\:\\:getTitle\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelMailer.class.php', -- 'message' => '#^Method sfWebDebugPanelMemory\\:\\:getPanelContent\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelMemory.class.php', -- 'message' => '#^Method sfWebDebugPanelMemory\\:\\:getPanelTitle\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelMemory.class.php', -- 'message' => '#^Method sfWebDebugPanelSymfonyVersion\\:\\:getPanelContent\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelSymfonyVersion.class.php', -- 'message' => '#^Method sfWebDebugPanelSymfonyVersion\\:\\:getPanelTitle\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelSymfonyVersion.class.php', -- 'message' => '#^Method sfWebDebugPanelTimer\\:\\:getPanelContent\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelTimer.class.php', -- 'message' => '#^Method sfWebDebugPanelView\\:\\:getTitle\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/debug/sfWebDebugPanelView.class.php', -- 'message' => '#^Method sfException\\:\\:fileExcerpt\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/exception/sfException.class.php', -- 'message' => '#^Method sfExecutionFilter\\:\\:executeView\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/filter/sfExecutionFilter.class.php', -- 'message' => '#^Function include_http_metas\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/helper/AssetHelper.php', -- 'message' => '#^Function include_metas\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/helper/AssetHelper.php', -- 'message' => '#^Function include_title\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/helper/AssetHelper.php', -- 'message' => '#^Function get_component\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/helper/PartialHelper.php', -- 'message' => '#^Function get_component_slot\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/helper/PartialHelper.php', -- 'message' => '#^Method sfCultureInfo\\:\\:getCultures\\(\\) should return array but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/i18n/sfCultureInfo.class.php', -- 'message' => '#^Method sfNumberFormat\\:\\:setPattern\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/i18n/sfNumberFormat.class.php', -- 'message' => '#^Method sfDoctrineCli\\:\\:notify\\(\\) should return false but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/cli/sfDoctrineCli.class.php', -- 'message' => '#^Method sfWebDebugPanelDoctrine\\:\\:getTitle\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php', -- 'message' => '#^Method sfDoctrineFormFilterGenerator\\:\\:generate\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineFormFilterGenerator.class.php', -- 'message' => '#^Method sfDoctrineFormGenerator\\:\\:generate\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineFormGenerator.class.php', -- 'message' => '#^Method Swift_DoctrineSpool\\:\\:queueMessage\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php', -- 'message' => '#^Method sfDoctrineBuildDbTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildDbTask.class.php', -- 'message' => '#^Method sfDoctrineBuildFiltersTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildFiltersTask.class.php', -- 'message' => '#^Method sfDoctrineBuildFormsTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildFormsTask.class.php', -- 'message' => '#^Method sfDoctrineBuildModelTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php', -- 'message' => '#^Method sfDoctrineBuildSchemaTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildSchemaTask.class.php', -- 'message' => '#^Method sfDoctrineBuildSqlTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildSqlTask.class.php', -- 'message' => '#^Method sfDoctrineBuildTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php', -- 'message' => '#^Method sfDoctrineCleanModelFilesTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineCleanModelFilesTask.class.php', -- 'message' => '#^Method sfDoctrineCompileTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineCompileTask.class.php', -- 'message' => '#^Method sfDoctrineConfigureDatabaseTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineConfigureDatabaseTask.class.php', -- 'message' => '#^Method sfDoctrineCreateModelTables\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineCreateModelTablesTask.class.php', -- 'message' => '#^Method sfDoctrineDataDumpTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDataDumpTask.class.php', -- 'message' => '#^Method sfDoctrineDataLoadTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDataLoadTask.class.php', -- 'message' => '#^Method sfDoctrineDeleteModelFilesTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDeleteModelFilesTask.class.php', -- 'message' => '#^Method sfDoctrineDeleteModelFilesTask\\:\\:valuesToRegex\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDeleteModelFilesTask.class.php', -- 'message' => '#^Method sfDoctrineDqlTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDqlTask.class.php', -- 'message' => '#^Method sfDoctrineDropDbTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDropDbTask.class.php', -- 'message' => '#^Method sfDoctrineGenerateMigrationTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationTask.class.php', -- 'message' => '#^Method sfDoctrineGenerateMigrationsDbTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationsDbTask.class.php', -- 'message' => '#^Method sfDoctrineGenerateMigrationsDiffTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationsDiffTask.class.php', -- 'message' => '#^Method sfDoctrineGenerateMigrationsModelsTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationsModelsTask.class.php', -- 'message' => '#^Method sfDoctrineGenerateModuleTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateModuleTask.class.php', -- 'message' => '#^Method sfDoctrineInsertSqlTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineInsertSqlTask.class.php', -- 'message' => '#^Method sfDoctrineMigrateTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php', -- 'message' => '#^Method sfPatternRouting\\:\\:connect\\(\\) should return array but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/routing/sfPatternRouting.class.php', -- 'message' => '#^Method sfPatternRouting\\:\\:setRoutes\\(\\) should return array but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/routing/sfPatternRouting.class.php', -- 'message' => '#^Method sfServiceContainerDumperPhp\\:\\:addServiceShared\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/service/sfServiceContainerDumperPhp.class.php', -- 'message' => '#^Method sfAppRoutesTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/app/sfAppRoutesTask.class.php', -- 'message' => '#^Method sfCacheClearTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/cache/sfCacheClearTask.class.php', -- 'message' => '#^Method sfConfigureAuthorTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/configure/sfConfigureAuthorTask.class.php', -- 'message' => '#^Method sfGenerateAppTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/generator/sfGenerateAppTask.class.php', -- 'message' => '#^Method sfGenerateModuleTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/generator/sfGenerateModuleTask.class.php', -- 'message' => '#^Method sfGenerateProjectTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/generator/sfGenerateProjectTask.class.php', -- 'message' => '#^Method sfGenerateTaskTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/generator/sfGenerateTaskTask.class.php', -- 'message' => '#^Method sfHelpTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/help/sfHelpTask.class.php', -- 'message' => '#^Method sfListTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/help/sfListTask.class.php', -- 'message' => '#^Method sfI18nExtractTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/i18n/sfI18nExtractTask.class.php', -- 'message' => '#^Method sfI18nFindTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/i18n/sfI18nFindTask.class.php', -- 'message' => '#^Method sfLogClearTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/log/sfLogClearTask.class.php', -- 'message' => '#^Method sfLogRotateTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/log/sfLogRotateTask.class.php', -- 'message' => '#^Method sfPluginAddChannelTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginAddChannelTask.class.php', -- 'message' => '#^Method sfPluginInstallTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginInstallTask.class.php', -- 'message' => '#^Method sfPluginListTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginListTask.class.php', -- 'message' => '#^Method sfPluginPublishAssetsTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginPublishAssetsTask.class.php', -- 'message' => '#^Method sfPluginUninstallTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginUninstallTask.class.php', -- 'message' => '#^Method sfPluginUpgradeTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/plugin/sfPluginUpgradeTask.class.php', -- 'message' => '#^Method sfProjectClearControllersTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectClearControllersTask.class.php', -- 'message' => '#^Method sfProjectDeployTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectDeployTask.class.php', -- 'message' => '#^Method sfProjectDisableTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectDisableTask.class.php', -- 'message' => '#^Method sfProjectEnableTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectEnableTask.class.php', -- 'message' => '#^Method sfProjectOptimizeTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectOptimizeTask.class.php', -- 'message' => '#^Method sfProjectPermissionsTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectPermissionsTask.class.php', -- 'message' => '#^Method sfProjectSendEmailsTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectSendEmailsTask.class.php', -- 'message' => '#^Method sfValidateTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/project/sfProjectValidateTask.class.php', -- 'message' => '#^Method sfBaseTask\\:\\:checkAppExists\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/sfBaseTask.class.php', -- 'message' => '#^Method sfBaseTask\\:\\:checkModuleExists\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/sfBaseTask.class.php', -- 'message' => '#^Method sfBaseTask\\:\\:checkProjectExists\\(\\) should return true but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/sfBaseTask.class.php', -- 'message' => '#^Method sfTestCoverageTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/test/sfTestCoverageTask.class.php', -- 'message' => '#^Method sfTestFunctionalTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/test/sfTestFunctionalTask.class.php', -- 'message' => '#^Method sfTestPluginTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/test/sfTestPluginTask.class.php', -- 'message' => '#^Method sfTestUnitTask\\:\\:execute\\(\\) should return int but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/task/test/sfTestUnitTask.class.php', -- 'message' => '#^Method sfContext\\:\\:getActionName\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/util/sfContext.class.php', -- 'message' => '#^Method sfContext\\:\\:getModuleDirectory\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/util/sfContext.class.php', -- 'message' => '#^Method sfContext\\:\\:getModuleName\\(\\) should return string but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/util/sfContext.class.php', -- 'message' => '#^Method sfValidatorDecorator\\:\\:setMessage\\(\\) should return sfValidatorBase but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/validator/sfValidatorDecorator.class.php', -- 'message' => '#^Method sfValidatorDecorator\\:\\:setOption\\(\\) should return sfValidatorBase but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/validator/sfValidatorDecorator.class.php', -- 'message' => '#^Method sfValidatorDecorator\\:\\:setOptions\\(\\) should return sfValidatorBase but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/validator/sfValidatorDecorator.class.php', -- 'message' => '#^Method sfViewCacheManager\\:\\:remove\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/view/sfViewCacheManager.class.php', -- 'message' => '#^Method sfViewParameterHolder\\:\\:initialize\\(\\) should return bool but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/view/sfViewParameterHolder.class.php', -- 'message' => '#^Method sfWidgetFormChoice\\:\\:setIdFormat\\(\\) should return sfWidget but return statement is missing\\.$#', 'path' => __DIR__ . '/lib/widget/sfWidgetFormChoice.class.php', ```