1010
1111trait CheckQueryReturnTrait
1212{
13- private ?bool $ currentDBDebug = null ;
13+ protected ?bool $ currentDBDebug = null ;
1414
1515 /**
1616 * @param bool|int|string $return insert() returns insert ID.
1717 */
18- private function checkQueryReturn ($ return ): void
18+ protected function checkQueryReturn ($ return ): void
1919 {
2020 $ this ->restoreDBDebug ();
2121
@@ -30,7 +30,7 @@ private function checkQueryReturn($return): void
3030 }
3131 }
3232
33- private function checkValidationError (): void
33+ protected function checkValidationError (): void
3434 {
3535 $ validationErrors = $ this ->getValidationErrors ();
3636
@@ -50,14 +50,14 @@ private function checkValidationError(): void
5050 *
5151 * @return string[]
5252 */
53- private function getValidationErrors (): array
53+ protected function getValidationErrors (): array
5454 {
5555 // @TODO When CI v4.3 is released, you don't need this hack.
5656 // See https://github.com/codeigniter4/CodeIgniter4/pull/6384
5757 return $ this ->getValidationPropertyErrors ();
5858 }
5959
60- private function getValidationPropertyErrors (): array
60+ protected function getValidationPropertyErrors (): array
6161 {
6262 $ refClass = new ReflectionObject ($ this ->validation );
6363 $ refProperty = $ refClass ->getProperty ('errors ' );
@@ -66,7 +66,7 @@ private function getValidationPropertyErrors(): array
6666 return $ refProperty ->getValue ($ this ->validation );
6767 }
6868
69- private function disableDBDebug (): void
69+ protected function disableDBDebug (): void
7070 {
7171 if (! $ this ->db ->DBDebug ) {
7272 // `DBDebug` is false. Do nothing.
@@ -79,7 +79,7 @@ private function disableDBDebug(): void
7979 $ propertyDBDebug ->setValue ($ this ->db , false );
8080 }
8181
82- private function restoreDBDebug (): void
82+ protected function restoreDBDebug (): void
8383 {
8484 if ($ this ->currentDBDebug === null ) {
8585 // `DBDebug` has not been changed. Do nothing.
@@ -92,7 +92,7 @@ private function restoreDBDebug(): void
9292 $ this ->currentDBDebug = null ;
9393 }
9494
95- private function getPropertyDBDebug (): ReflectionProperty
95+ protected function getPropertyDBDebug (): ReflectionProperty
9696 {
9797 $ refClass = new ReflectionObject ($ this ->db );
9898 $ refProperty = $ refClass ->getProperty ('DBDebug ' );
0 commit comments