Files
php-curl-class/tests/display_errors.inc.sh
T
Zach Borboa 58962a054e Fix PHPStan static analysis errors (#929)
* Increase PHPStan memory limit on local development

* Add emjois to test warnings and test errors

* Fix PHPStan static analysis errors

Error messages:
 ------ ------------------------------------------------------------------------------------------------------
  Line   src/Curl/Curl.php
 ------ ------------------------------------------------------------------------------------------------------
  123    Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  124    Cannot unset property Curl\Curl::$curlErrorCodeConstants because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  125    Cannot unset property Curl\Curl::$curlOptionCodeConstants because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  126    Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  127    Cannot unset property Curl\Curl::$rfc2616 because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  128    Cannot unset property Curl\Curl::$rfc6265 because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  129    Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  564    Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  565    Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  566    Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
 ------ ------------------------------------------------------------------------------------------------------
2025-03-08 08:34:45 -05:00

12 lines
299 B
Bash

error_count="${#errors[@]}"
if [[ "${error_count}" -ge 1 ]]; then
echo -e "\nErrors found: ${error_count}"
iter=0
for value in "${errors[@]}"; do
((iter++))
echo -e "\nError ${iter} of ${error_count}:"
echo "${value}" | perl -pe 's/^(.*)$/\t\1/'
done
fi