diff --git a/plugins/baser-core/composer.json b/plugins/baser-core/composer.json index a66c26c544..1bff3973d0 100644 --- a/plugins/baser-core/composer.json +++ b/plugins/baser-core/composer.json @@ -30,7 +30,9 @@ "baserproject/bc-uploader": "^5.1", "baserproject/bc-widget-area": "^5.1", "imo-tikuwa/cakephp-soft-delete": "^2.0", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-zip": "*", + "ext-gd": "*" }, "require-dev": { "cakephp/bake": "^2.6", diff --git a/plugins/baser-core/src/BcPlugin.php b/plugins/baser-core/src/BcPlugin.php index 148ba09b98..5cc02b6d3c 100644 --- a/plugins/baser-core/src/BcPlugin.php +++ b/plugins/baser-core/src/BcPlugin.php @@ -72,9 +72,11 @@ public function initialize(): void /** * bootstrap * - * @param PluginApplicationInterface $application + * @param PluginApplicationInterface $app + * @checked + * @noTodo */ - public function bootstrap(PluginApplicationInterface $application): void + public function bootstrap(PluginApplicationInterface $app): void { $pluginPath = BcUtil::getPluginPath($this->name); if (file_exists($pluginPath . 'config' . DS . 'setting.php')) { @@ -86,7 +88,7 @@ public function bootstrap(PluginApplicationInterface $application): void } // 親の bootstrap は、setting の読み込みの後でなければならない // bootstrap 内で、setting の値を参照する場合があるため - parent::bootstrap($application); + parent::bootstrap($app); } /** @@ -149,6 +151,8 @@ public function install($options = []): bool * マイグレーションを実行する * * @param array $options + * @checked + * @noTodo */ public function migrate($options = []) { @@ -163,6 +167,8 @@ public function migrate($options = []) /** * アップデートプログラムを実行する + * @checked + * @noTodo */ public function execUpdater() { @@ -437,6 +443,8 @@ public function routes(RouteBuilder $routes): void * @param RouteBuilder $routes * @param string $plugin * @return RouteBuilder + * @checked + * @noTodo */ public function contentsRoutingForReverse(RouteBuilder $routes, string $plugin) { @@ -463,6 +471,8 @@ function(RouteBuilder $routes) { * @param RouteBuilder $routes * @param string $plugin * @return RouteBuilder + * @checked + * @noTodo */ public function frontPageRouting(RouteBuilder $routes, string $plugin) { @@ -488,6 +498,8 @@ function(RouteBuilder $routes) { * @param RouteBuilder $routes * @param string $plugin * @return RouteBuilder + * @checked + * @noTodo */ public function prefixRouting(RouteBuilder $routes, string $plugin) { @@ -535,6 +547,8 @@ function(RouteBuilder $routes) use($isApi) { * @param RouteBuilder $routes * @param string $plugin * @return RouteBuilder + * @checked + * @noTodo */ public function siteRouting(RouteBuilder $routes, string $plugin) { diff --git a/plugins/baser-core/src/Plugin.php b/plugins/baser-core/src/Plugin.php index 89aac26e6e..53bd386361 100644 --- a/plugins/baser-core/src/Plugin.php +++ b/plugins/baser-core/src/Plugin.php @@ -39,7 +39,6 @@ use Cake\Core\Exception\MissingPluginException; use Cake\Core\PluginApplicationInterface; use Cake\Event\EventManager; -use Cake\Http\Exception\ForbiddenException; use Cake\Http\Middleware\CsrfProtectionMiddleware; use Cake\Http\MiddlewareQueue; use Cake\Http\ServerRequestFactory; @@ -67,13 +66,13 @@ class Plugin extends BcPlugin implements AuthenticationServiceProviderInterface /** * bootstrap * - * @param PluginApplicationInterface $application + * @param PluginApplicationInterface $app * * @checked * @unitTest * @noTodo */ - public function bootstrap(PluginApplicationInterface $application): void + public function bootstrap(PluginApplicationInterface $app): void { /** * composer インストール対応 @@ -116,14 +115,14 @@ public function bootstrap(PluginApplicationInterface $application): void if (BcUtil::isInstalled()) { BcUtil::checkTmpFolders(); } else { - $application->addPlugin('BcInstaller'); + $app->addPlugin('BcInstaller'); Configure::load('BcInstaller.setting'); } /** * プラグインごとの設定ファイル読み込み */ - parent::bootstrap($application); + parent::bootstrap($app); /** * 文字コードの検出順を指定 @@ -150,11 +149,11 @@ public function bootstrap(PluginApplicationInterface $application): void /** * プラグインロード */ - if (BcUtil::isTest()) $application->addPlugin('CakephpFixtureFactories'); - $application->addPlugin('Authentication'); - $application->addPlugin('Migrations'); + if (BcUtil::isTest()) $app->addPlugin('CakephpFixtureFactories'); + $app->addPlugin('Authentication'); + $app->addPlugin('Migrations'); - $this->addTheme($application); + $this->addTheme($app); if (!filter_var(env('USE_DEBUG_KIT', true), FILTER_VALIDATE_BOOLEAN)) { // 明示的に指定がない場合、DebugKitは重すぎるのでデバッグモードでも利用しない @@ -164,7 +163,7 @@ public function bootstrap(PluginApplicationInterface $application): void if ($plugins) { foreach($plugins as $plugin) { if (BcUtil::includePluginClass($plugin->name)) { - $this->loadPlugin($application, $plugin->name, $plugin->priority); + $this->loadPlugin($app, $plugin->name, $plugin->priority); } } } @@ -386,6 +385,8 @@ public function getAuthenticationService(ServerRequestInterface $request): Authe * * @param array $authSetting * @return bool + * @checked + * @noTodo */ public function isRequiredAuthentication(array $authSetting) { @@ -401,6 +402,8 @@ public function isRequiredAuthentication(array $authSetting) * @param AuthenticationService $service * @param array $authSetting * @return AuthenticationService + * @checked + * @noTodo */ public function setupSessionAuth(AuthenticationService $service, array $authSetting) { @@ -438,6 +441,8 @@ public function setupSessionAuth(AuthenticationService $service, array $authSett * @param AuthenticationService $service * @param array $authSetting * @return AuthenticationService + * @checked + * @noTodo */ public function setupJwtAuth(AuthenticationService $service, array $authSetting, string $prefix) { @@ -608,6 +613,8 @@ public function services(ContainerInterface $container): void * * @param CommandCollection $commands * @return CommandCollection + * @checked + * @checked */ public function console(CommandCollection $commands): CommandCollection { diff --git a/plugins/baser-core/src/Utility/BcUtil.php b/plugins/baser-core/src/Utility/BcUtil.php index 3d5d56841e..6fbc4f2033 100644 --- a/plugins/baser-core/src/Utility/BcUtil.php +++ b/plugins/baser-core/src/Utility/BcUtil.php @@ -437,6 +437,8 @@ public static function getEnablePlugins($force = false) * 現在のDB接続の設定を取得する * * @return array + * @checked + * @noTodo */ public static function getCurrentDbConfig() { @@ -447,6 +449,8 @@ public static function getCurrentDbConfig() * 現在のDB接続を取得する * * @return \Cake\Database\Connection + * @checked + * @noTodo */ public static function getCurrentDb() { @@ -687,6 +691,9 @@ public static function serialize($value) * * @param mixed $value 対象文字列 * @return mixed + * @checked + * @noTodo + * @unitTest */ public static function unserialize($value) { @@ -742,6 +749,8 @@ public static function isConsole() * ユニットテストかどうか * * @return bool + * @checked + * @noTodo */ public static function isTest() { @@ -1226,6 +1235,8 @@ public static function getRootTheme() * 現在の管理画面のテーマ名を取得する * キャメルケースが前提 * @return mixed|string + * @checked + * @noTodo */ public static function getCurrentAdminTheme() { @@ -1242,6 +1253,8 @@ public static function getCurrentAdminTheme() * @param string $str * @param string $suffix * @return string + * @checked + * @noTodo */ public static function mbBasename($str, $suffix = null) { @@ -1308,7 +1321,10 @@ public static function getExtension($fileName) * * index.phpは含まない * - * @return string + * @return string + * @checked + * @noTodo + * @unitTest */ public static function siteUrl() { @@ -1330,6 +1346,9 @@ public static function siteUrl() * ※ プログラムフォルダ内の画像やCSSの読み込み時もbootstrap.php で呼び出されるのでサーバーキャッシュは利用しない * * @return string ベースURL + * @checked + * @noTodo + * @unitTest */ public static function baseUrl() { @@ -1363,7 +1382,10 @@ public static function baseUrl() * サブドメインの場合など、$_SERVER['DOCUMENT_ROOT'] が正常に取得できない場合に利用する * UserDir に対応 * - * @return string ドキュメントルートの絶対パス + * @return string ドキュメントルートの絶対パス + * @checked + * @noTodo + * @unitTest */ public static function docRoot() { @@ -1392,6 +1414,9 @@ public static function docRoot() * 実行環境のOSがWindowsであるかどうかを返す * * @return bool + * @checked + * @noTodo + * @unitTest */ public static function isWindows() { @@ -1498,11 +1523,11 @@ public static function emptyFolder($path) /** * ファイルポインタから行を取得し、CSVフィールドを処理する * - * @param stream handle - * @param int length - * @param string delimiter - * @param string enclosure - * @return mixed ファイルの終端に達した場合を含み、エラー時にFALSEを返します。 + * @param resource $handle + * @param int $length + * @param string $d delimiter + * @param string $e enclosure + * @return mixed ファイルの終端に達した場合を含み、エラー時にFALSEを返します。 * @checked * @noTodo * @unitTest @@ -1655,6 +1680,9 @@ public static function createRequest($url = '/', $data = [], $method = 'GET', $c /** * 必要な一時フォルダが存在するかチェックし、 * なければ生成する + * @checked + * @noTodo + * @unitTest */ public static function checkTmpFolders() { @@ -1693,7 +1721,10 @@ public static function changePluginNameSpace($newPlugin) * httpからのフルURLを取得する * * @param mixed $url - * @return string + * @return string + * @checked + * @noTodo + * @unitTest */ public static function fullUrl($url) { @@ -1780,6 +1811,8 @@ public static function getExistsTemplateDir(string $theme, string $plugin, strin * @param string $path * @param string $type * @return false|string + * @checked + * @noTodo */ public static function getExistsWebrootDir(string $theme, string $plugin, string $path, string $type = '') { @@ -1835,6 +1868,8 @@ public static function getExistsWebrootDir(string $theme, string $plugin, string * `array('a'=>'b')` * * @return array Associative array + * @checked + * @noTodo */ public static function pairToAssoc() { @@ -1863,6 +1898,8 @@ public static function pairToAssoc() * @param int $interval 試行の間隔(ミリ秒) * @return mixed * @throws Exception + * @checked + * @noTodo */ public static function retry($times, callable $callback, $interval = 0) { @@ -1944,6 +1981,8 @@ public static function getRequestPrefix(ServerRequestInterface $request) * デバッグモードかどうか * * @return bool + * @checked + * @noTodo */ public static function isDebug(): bool { @@ -1957,8 +1996,9 @@ public static function isDebug(): bool * @param $min * @param $sec * @return bool + * @checked + * @noTodo */ - public static function checkTime($hour, $min, $sec = null): bool { $hour = (int)$hour; @@ -1983,6 +2023,8 @@ public static function checkTime($hour, $min, $sec = null): bool * * @param string $val 対象文字列 * @return string + * @checked + * @noTodo */ public static function base64UrlSafeDecode($val): string { @@ -2001,8 +2043,10 @@ public static function base64UrlSafeDecode($val): string * * @param string $val 対象文字列 * @return string + * @checked + * @noTodo */ - public static function base64UrlsafeEncode($val): string + public static function base64UrlSafeEncode($val): string { $val = base64_encode($val); return str_replace(['+', '/', '='], ['_', '-', '.'], $val); diff --git a/plugins/baser-core/src/Utility/BcZip.php b/plugins/baser-core/src/Utility/BcZip.php index 924f1a1429..3d2e763551 100644 --- a/plugins/baser-core/src/Utility/BcZip.php +++ b/plugins/baser-core/src/Utility/BcZip.php @@ -13,6 +13,9 @@ use Cake\Filesystem\Folder; use ZipArchive; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; +use BaserCore\Annotation\UnitTest; /** * Class BcZip @@ -25,6 +28,7 @@ class BcZip * @var bool|ZipArchive */ public $Zip = false; + /** * error * @@ -41,6 +45,8 @@ class BcZip /** * BcZip constructor. + * @checked + * @noTodo */ public function __construct() { @@ -55,6 +61,8 @@ public function __construct() * @param $source * @param $target * @return bool + * @checked + * @noTodo */ public function extract($source, $target) { @@ -82,6 +90,8 @@ public function extract($source, $target) * @param $source * @param $target * @return bool + * @checked + * @noTodo */ protected function _extractByPhpLib($source, $target) { @@ -101,6 +111,8 @@ protected function _extractByPhpLib($source, $target) * @param $source * @param $target * @return bool + * @checked + * @noTodo */ protected function _extractByCommand($source, $target) { @@ -130,6 +142,8 @@ protected function _extractByCommand($source, $target) * * @param $path * @return string + * @checked + * @noTodo */ protected function _escapePath($path) { @@ -146,6 +160,8 @@ protected function _escapePath($path) * @param string $sorce 元データ * @param string $dist 出力先 * @return void + * @checked + * @noTodo */ public function create($sorce, $dist) { @@ -162,11 +178,13 @@ public function create($sorce, $dist) * @param string $path * @param string $parentPath * @return void + * @checked + * @noTodo */ private function zipSub($za, $path, $parentPath = '') { $dh = opendir($path); - while (($entry = readdir($dh)) !== false) { + while(($entry = readdir($dh)) !== false) { if ($entry == '.' || $entry == '..') { } else { $localPath = $parentPath . $entry; diff --git a/plugins/baser-core/src/Vendor/CKEditorStyleParser.php b/plugins/baser-core/src/Vendor/CKEditorStyleParser.php index edda819f1e..e59848fafa 100644 --- a/plugins/baser-core/src/Vendor/CKEditorStyleParser.php +++ b/plugins/baser-core/src/Vendor/CKEditorStyleParser.php @@ -11,6 +11,10 @@ namespace BaserCore\Vendor; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; +use BaserCore\Annotation\UnitTest; + /** * CSSを解析してCKEditorのスタイルセット用のデータ構造に変換する * @@ -31,10 +35,16 @@ * ] * ] */ - class CKEditorStyleParser { + /** + * Parse + * @param $css + * @return array + * @checked + * @noTodo + */ public static function parse($css) { $css = preg_replace('/\/\*.*?\*\//s', '', $css); @@ -68,6 +78,13 @@ public static function parse($css) } + /** + * Parse Code + * @param $code + * @return array + * @checked + * @noTodo + */ private static function parseCode($code) { $size = strlen($code); @@ -95,6 +112,16 @@ private static function parseCode($code) return $data; } + /** + * Read String + * @param $target + * @param $body + * @param $size + * @param $i + * @return string + * @checked + * @noTodo + */ private static function readString($target, $body, $size, &$i) { $data = ''; diff --git a/plugins/baser-core/src/Vendor/Imageresizer.php b/plugins/baser-core/src/Vendor/Imageresizer.php index 6896392dac..7d321e2b72 100644 --- a/plugins/baser-core/src/Vendor/Imageresizer.php +++ b/plugins/baser-core/src/Vendor/Imageresizer.php @@ -11,20 +11,30 @@ namespace BaserCore\Vendor; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; +use BaserCore\Annotation\UnitTest; + +/** + * Imagereizer + */ class Imageresizer { + /** * 画像をリサイズする - * @param string ソースファイルのパス - * @param string 保存先のパス - * @param int 幅 - * @param int 高さ - * @param array 圧縮レベル (JPEG: 100 (0-100), PNG: 6 (0-9)) - * @return boolean + * @param string $imgPath ソースファイルのパス + * @param string $savePath 保存先のパス + * @param int $newWidth 幅 + * @param int $newHeight 高さ + * @param bool $trimming トリミングするかどうか + * @param array $quality 圧縮レベル (JPEG: 100 (0-100), PNG: 6 (0-9)) + * @return boolean + * @checked + * @noTodo */ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, $trimming = false, $quality = []) { - // 画像種類別の圧縮レベルのデフォルト値 $quality = $quality + [ IMAGETYPE_JPEG => 100, // 0 - 100 @@ -61,23 +71,18 @@ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, // 新しい画像のサイズを取得 if (!$newWidth) { - if ($srcHeight < $newHeight) { $rate = 1; } else { $rate = $srcHeight / $newHeight; } - } elseif (!$newHeight) { - if ($srcWidth < $newWidth) { $rate = 1; } else { $rate = $srcWidth / $newWidth; } - } else { - $w = $srcWidth / $newWidth; $h = $srcHeight / $newHeight; if ($w < 1 && $h < 1) { @@ -87,7 +92,6 @@ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, } else { $rate = $h; } - } if (!$trimming) { @@ -98,7 +102,7 @@ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, // 新しい画像のベースを作成 switch($image_type) { case IMAGETYPE_GIF: - $newImage = imagecreatetruecolor((int) $newWidth, (int) $newHeight); + $newImage = imagecreatetruecolor((int)$newWidth, (int)$newHeight); $alpha = imagecolorallocatealpha($newImage, 255, 255, 255, 0); imagefill($newImage, 0, 0, $alpha); imagecolortransparent($newImage, $alpha); @@ -133,11 +137,9 @@ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, imagegif($newImage); } break; - case IMAGETYPE_JPEG: imagejpeg($newImage, $savePath, $quality[IMAGETYPE_JPEG]); break; - case IMAGETYPE_PNG: if ($savePath) { imagepng($newImage, $savePath, $quality[IMAGETYPE_PNG]); @@ -145,34 +147,32 @@ function resize($imgPath, $savePath = null, $newWidth = null, $newHeight = null, imagepng($newImage); } break; - default: return false; } imagedestroy($newImage); - if ($savePath) { chmod($savePath, 0666); } - return true; - } /** * ファイルをコピーし、リサイズする - * @param Image ソースイメージオブジェクト - * @param Image リサイズイメージ格納用のイメージオブジェクト - * @param int 元の幅 - * @param int 元の高さ - * @param int 新しい幅 - * @param int 新しい高さ - * @return Image 新しいイメージオブジェクト + * @param \GdImage|resource $srcImage ソースイメージオブジェクト + * @param \GdImage|resource $newImage リサイズイメージ格納用のイメージオブジェクト + * @param int $srcWidth 元の幅 + * @param int $srcHeight 元の高さ + * @param int $newWidth 新しい幅 + * @param int $newHeight 新しい高さ + * @param bool $trimming トリミングするかどうか + * @return \GdImage|resource 新しいイメージオブジェクト + * @checked + * @noTodo */ function _copyAndResize($srcImage, $newImage, $srcWidth, $srcHeight, $newWidth, $newHeight, $trimming = false) { - if ($trimming) { if ($srcWidth > $srcHeight) { $x = ($srcWidth - $srcHeight) / 2; @@ -190,28 +190,8 @@ function _copyAndResize($srcImage, $newImage, $srcWidth, $srcHeight, $newWidth, $x = 0; $y = 0; } - imagecopyresampled($newImage, $srcImage, 0, 0, (int) $x, (int) $y, (int) $newWidth, (int) $newHeight, (int) $srcWidth, (int) $srcHeight); + imagecopyresampled($newImage, $srcImage, 0, 0, (int)$x, (int)$y, (int)$newWidth, (int)$newHeight, (int)$srcWidth, (int)$srcHeight); return $newImage; - - } - - /** - * ベース画像を作成する - * @param int 幅 - * @param int 高さ - * @return Image イメージオブジェクト - */ - function _createBaseImange($width, $height) - { - - //新しい画像を生成 - $image = imagecreatetruecolor($width, $height); - $color = imagecolorallocatealpha($image, 255, 255, 255, 0); - imagealphablending($image, true); - imagesavealpha($image, true); - imagefill($image, 0, 0, $color); - return $image; - } } diff --git a/plugins/baser-core/src/View/AppView.php b/plugins/baser-core/src/View/AppView.php index cf7c8efa9d..4580048256 100644 --- a/plugins/baser-core/src/View/AppView.php +++ b/plugins/baser-core/src/View/AppView.php @@ -67,6 +67,8 @@ public function initialize(): void * * @param string $templateFile Filename of the template. * @return string Rendered output + * @checked + * @noTodo */ public function evaluate(string $templateFile): string { @@ -80,6 +82,8 @@ public function evaluate(string $templateFile): string /** * 拡張子を取得する * @return string + * @checked + * @noTodo */ public function getExt(): string { diff --git a/plugins/baser-core/src/View/BcFrontAppView.php b/plugins/baser-core/src/View/BcFrontAppView.php index bdd2cab2e6..7dc5c3977f 100644 --- a/plugins/baser-core/src/View/BcFrontAppView.php +++ b/plugins/baser-core/src/View/BcFrontAppView.php @@ -53,6 +53,8 @@ public function initialize(): void * テーマ用のヘルパーをセットする * * @return void + * @checked + * @noTodo */ protected function setThemeHelpers(): void { diff --git a/plugins/baser-core/src/View/Helper/BaserCoreBaserHelper.php b/plugins/baser-core/src/View/Helper/BaserCoreBaserHelper.php index 042dd04409..0aaf23d090 100644 --- a/plugins/baser-core/src/View/Helper/BaserCoreBaserHelper.php +++ b/plugins/baser-core/src/View/Helper/BaserCoreBaserHelper.php @@ -12,6 +12,9 @@ namespace BaserCore\View\Helper; use Cake\View\Helper; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; +use BaserCore\Annotation\UnitTest; /** * BaserCoreBaserHelper @@ -35,6 +38,12 @@ class BaserCoreBaserHelper extends Helper implements BcPluginBaserHelperInterfac 'Text' ]; + /** + * BcBaserHelper のメソッドと、外部ヘルパーの関連付けを返却する + * @return array[] + * @checked + * @noTodo + */ public function methods(): array { return [ diff --git a/plugins/baser-core/src/View/Helper/BcAdminHelper.php b/plugins/baser-core/src/View/Helper/BcAdminHelper.php index 01c3ec9b77..7be7c0e7d4 100755 --- a/plugins/baser-core/src/View/Helper/BcAdminHelper.php +++ b/plugins/baser-core/src/View/Helper/BcAdminHelper.php @@ -91,8 +91,9 @@ private function getAdminMenuGroups() /** * 管理画面のメニューに変更を加える - * @todo 整理する必要あり * @return array + * @checked + * @noTodo */ private function convertAdminMenuGroups($adminMenuGroups) { @@ -509,6 +510,8 @@ public function publishLink(): void /** * 初回アクセス時のメッセージ表示 * @return void + * @checked + * @noTodo */ public function firstAccess() { @@ -519,6 +522,8 @@ public function firstAccess() /** * 管理画面において現在のサイトを取得する * @return false|Site + * @checked + * @noTodo */ public function getCurrentSite() { diff --git a/plugins/baser-core/src/View/Helper/BcArrayHelper.php b/plugins/baser-core/src/View/Helper/BcArrayHelper.php index 85342f040d..09259ce824 100755 --- a/plugins/baser-core/src/View/Helper/BcArrayHelper.php +++ b/plugins/baser-core/src/View/Helper/BcArrayHelper.php @@ -13,6 +13,9 @@ use BaserCore\Event\BcEventDispatcherTrait; use Cake\View\Helper; +use BaserCore\Annotation\UnitTest; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; /** * BcArrayHelper @@ -32,6 +35,8 @@ class BcArrayHelper extends Helper * @param array $array 配列 * @param mixed $key 現在のキー * @return boolean + * @checked + * @noTodo */ public function first($array, $key) { @@ -50,6 +55,8 @@ public function first($array, $key) * @param array $array 配列 * @param mixed $key 現在のキー * @return boolean + * @checked + * @noTodo */ public function last($array, $key) { @@ -68,8 +75,9 @@ public function last($array, $key) * @param array $array * @param string $prefix * @param string $suffix - * @return array - * @access public + * @return array + * @checked + * @noTodo */ public function addText($array, $prefix = '', $suffix = '') { @@ -85,7 +93,8 @@ public function addText($array, $prefix = '', $suffix = '') * @param string $value * @param string $key * @param string $add - * @access private + * @checked + * @noTodo */ private function __addText(&$value, $key, $add) { diff --git a/plugins/bc-custom-content/src/Plugin.php b/plugins/bc-custom-content/src/Plugin.php index fc652facf7..4bc89f766f 100644 --- a/plugins/bc-custom-content/src/Plugin.php +++ b/plugins/bc-custom-content/src/Plugin.php @@ -75,11 +75,11 @@ public function services(ContainerInterface $container): void /** * Bootstrap * - * @param PluginApplicationInterface $application + * @param PluginApplicationInterface $app */ - public function bootstrap(PluginApplicationInterface $application): void + public function bootstrap(PluginApplicationInterface $app): void { - parent::bootstrap($application); + parent::bootstrap($app); $this->loadPlugin(); } diff --git a/plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php b/plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php index 47e297e8c0..e24ee4f883 100644 --- a/plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php +++ b/plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php @@ -317,7 +317,7 @@ public function testGetNew() $this->assertEquals('hehe', $result->test2[0]); $mailMessage = [ - 'field1' => BcUtil::base64UrlsafeEncode('https://book.cakephp.org'), + 'field1' => BcUtil::base64UrlSafeEncode('https://book.cakephp.org'), ]; $result = $MailMessagesService->getNew(1, $mailMessage); $this->assertEquals('https://book.cakephp.org', $result->field1);