Plugin Directory

Changeset 2952051


Ignore:
Timestamp:
08/11/2023 08:10:47 AM (3 years ago)
Author:
prokerala
Message:

Update to version 1.1.3 from GitHub

Location:
astrology
Files:
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • astrology/tags/1.1.3/astrology.php

    r2830560 r2952051  
    1212 * Plugin URI:  https://api.prokerala.com
    1313 * Description: Integrate astrology calculators powered by Prokerala's Astrology API
    14  * Version:     1.1.2
     14 * Version:     1.1.3
    1515 * Author:      Prokerala
    1616 * Author URI:  https://www.prokerala.com
     
    4646use Prokerala\WP\Astrology\Plugin;
    4747
    48 const PK_ASTROLOGY_VERSION          = '1.1.2';
     48const PK_ASTROLOGY_VERSION          = '1.1.3';
    4949const PK_ASTROLOGY_PHP_MINIMUM      = '7.2.0';
    5050const PK_ASTROLOGY_PLUGIN_MAIN_FILE = __FILE__;
  • astrology/tags/1.1.3/dependencies/vendor/autoload.php

    r2830560 r2952051  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e::getLoader();
     25return ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5::getLoader();
  • astrology/tags/1.1.3/dependencies/vendor/composer/ClassLoader.php

    r2819586 r2952051  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • astrology/tags/1.1.3/dependencies/vendor/composer/autoload_real.php

    r2830560 r2952051  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e
     5class ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e::getInitializer($loader));
     30        call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit2f574f619eebf4624df2a3e5276554b5::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • astrology/tags/1.1.3/dependencies/vendor/composer/autoload_static.php

    r2830560 r2952051  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e
     7class ComposerStaticInit2f574f619eebf4624df2a3e5276554b5
    88{
    99    public static $classMap = array (
     
    504504    {
    505505        return \Closure::bind(function () use ($loader) {
    506             $loader->classMap = ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e::$classMap;
     506            $loader->classMap = ComposerStaticInit2f574f619eebf4624df2a3e5276554b5::$classMap;
    507507
    508508        }, null, ClassLoader::class);
  • astrology/tags/1.1.3/dependencies/vendor/prokerala/astrology-sdk/src/Common/Api/Authentication/Oauth2.php

    r2819586 r2952051  
    8989    public function handleError(\stdClass $response, int $code) : void
    9090    {
    91         ($cache = $this->cache) ? $cache->delete(self::CACHE_KEY) : null;
     91        ($nullsafeVariable1 = $this->cache) ? $nullsafeVariable1->delete(self::CACHE_KEY) : null;
    9292        if (isset($response->errors[0]) && '643' === $response->errors[0]->code) {
    9393            throw new TokenExpiredException($response->errors[0]->detail);
  • astrology/tags/1.1.3/dependencies/vendor/symfony/cache/Adapter/AbstractAdapter.php

    r2819586 r2952051  
    4343            $item->value = $v = $value;
    4444            $item->isHit = $isHit;
     45            // Detect wrapped values that encode for their expiry and creation duration
     46            // For compactness, these values are packed in the key of an array using
     47            // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
    4548            reset($v);
    4649            // Detect wrapped values that encode for their expiry and creation duration
  • astrology/tags/1.1.3/dependencies/vendor/symfony/cache/Adapter/ProxyAdapter.php

    r2819586 r2952051  
    4949            $item->innerItem = $innerItem;
    5050            $item->poolHash = $poolHash;
     51            // Detect wrapped values that encode for their expiry and creation duration
     52            // For compactness, these values are packed in the key of an array using
     53            // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
    5154            reset($v);
    5255            // Detect wrapped values that encode for their expiry and creation duration
  • astrology/tags/1.1.3/dependencies/vendor/symfony/cache/Traits/ApcuTrait.php

    r2819586 r2952051  
    103103        } catch (\Throwable $e) {
    104104            if (1 === \count($values)) {
     105                // Workaround https://github.com/krakjoe/apcu/issues/170
    105106                reset($values);
    106107                // Workaround https://github.com/krakjoe/apcu/issues/170
  • astrology/tags/1.1.3/readme.txt

    r2830560 r2952051  
    33Tags: astrology, prokerala
    44Requires at least: 5.6
    5 Tested up to: 6.1.1
    6 Stable tag: 1.1.2
    7 Requires PHP: 7.2.0
     5Tested up to: 6.3
     6Stable tag: 1.1.3
     7Requires PHP: 7.2.0+
    88License: GPLV2+
    99
     
    2222== Available Services ==
    2323
     24* Daily Horoscope Predictions
     25* Numerology Calculators
    2426* Daily Panchang Calculators
    2527 * Panchang
     
    8587- `Numerology`
    8688- `Panchang`
     89- `Papasamyam`
    8790- `PapasamyamCheck`
    88 - `Papasamyam`
    8991- `PlanetPosition`
    9092- `Porutham`
     
    98100   The `display_charts` option allows showing _Rasi_ / _Navamsa_ chart in Kundli result. This will cost two additional API calls. The value of the attribute must be `lagna,navamsa`.
    99101
    100    `[astrology report="Kundli" display_charts="lagna,rasi"]`
     102        [astrology report="Kundli" display_charts="lagna,rasi"]
    101103
    102104- `result_type`
     
    104106   In calculators that support `basic` and `advanced` results, the result type can be forced using the `result_type` attribute. Settings this attribute will remove the corresponding input fields from the form.
    105107
    106    `[astrology report="Kundli" result_type="advanced"]`
     108        [astrology report="Kundli" result_type="advanced"]
    107109
    108110- `chart_style`
     
    110112   You can set the `chart_style` attribute to one of `north-indian`, `south-indian` or `east-indian` to force the result chart style. Setting this attribute will remove the corresponding input fields from the form.
    111113
    112    `[astrology report="Kundli" chart_style="south-indian"]`
     114        [astrology report="Kundli" chart_style="south-indian"]
    113115
    114116- `sign`
     
    131133
    132134== Changelog ==
     135
     136= 1.1.3 =
     137* Fix error message when saving shortcode without ayanamsa attribute
     138* Fix interchanged default value for chart_type and chart_style
    133139
    134140= 1.1.2 =
  • astrology/tags/1.1.3/src/Front/Controller/ReportControllerTrait.php

    r2819586 r2952051  
    128128     */
    129129    protected function get_input_ayanamsa() {
    130         return isset( $_POST['ayanamsa'] ) ? (int) $_POST['ayanamsa'] : '';
     130        if ( ! isset( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
     131            return '';
     132        }
     133
     134        return isset( $_POST['ayanamsa'] ) ? (int) $_POST['ayanamsa'] : 1;
    131135    }
    132136
  • astrology/tags/1.1.3/src/Front/Report/ChartController.php

    r2819586 r2952051  
    6969                'datetime'    => new \DateTimeImmutable( 'now', $this->get_timezone() ),
    7070                'chart_type'  => 'rasi',
    71                 'chart_style' => 'south-indian',
     71                'chart_style' => 'north-indian',
    7272                'chart_types' => [
    7373                    'rasi',
     
    138138    public function get_attribute_defaults() {
    139139        return $this->getCommonAttributeDefaults() + [
    140             'chart_style' => 'rasi',
    141             'chart_type' => 'north-indian',
     140            'chart_type' => 'rasi',
     141            'chart_style' => 'north-indian',
    142142        ];
    143143    }
  • astrology/tags/1.1.3/src/vendor/autoload.php

    r2830560 r2952051  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7::getLoader();
     25return ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13::getLoader();
  • astrology/tags/1.1.3/src/vendor/composer/ClassLoader.php

    r2819586 r2952051  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • astrology/tags/1.1.3/src/vendor/composer/autoload_real.php

    r2830560 r2952051  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7
     5class ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit0c3a1662369a018c256975583ada52b7::getInitializer($loader));
     30        call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • astrology/tags/1.1.3/src/vendor/composer/autoload_static.php

    r2830560 r2952051  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit0c3a1662369a018c256975583ada52b7
     7class ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13
    88{
    99    public static $classMap = array (
     
    4444    {
    4545        return \Closure::bind(function () use ($loader) {
    46             $loader->classMap = ComposerStaticInit0c3a1662369a018c256975583ada52b7::$classMap;
     46            $loader->classMap = ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13::$classMap;
    4747
    4848        }, null, ClassLoader::class);
  • astrology/trunk/astrology.php

    r2830560 r2952051  
    1212 * Plugin URI:  https://api.prokerala.com
    1313 * Description: Integrate astrology calculators powered by Prokerala's Astrology API
    14  * Version:     1.1.2
     14 * Version:     1.1.3
    1515 * Author:      Prokerala
    1616 * Author URI:  https://www.prokerala.com
     
    4646use Prokerala\WP\Astrology\Plugin;
    4747
    48 const PK_ASTROLOGY_VERSION          = '1.1.2';
     48const PK_ASTROLOGY_VERSION          = '1.1.3';
    4949const PK_ASTROLOGY_PHP_MINIMUM      = '7.2.0';
    5050const PK_ASTROLOGY_PLUGIN_MAIN_FILE = __FILE__;
  • astrology/trunk/dependencies/vendor/autoload.php

    r2830560 r2952051  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e::getLoader();
     25return ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5::getLoader();
  • astrology/trunk/dependencies/vendor/composer/ClassLoader.php

    r2819586 r2952051  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • astrology/trunk/dependencies/vendor/composer/autoload_real.php

    r2830560 r2952051  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e
     5class ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitb68ffd5d71617cdaee40683a48ad5f9e', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit2f574f619eebf4624df2a3e5276554b5', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e::getInitializer($loader));
     30        call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit2f574f619eebf4624df2a3e5276554b5::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • astrology/trunk/dependencies/vendor/composer/autoload_static.php

    r2830560 r2952051  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e
     7class ComposerStaticInit2f574f619eebf4624df2a3e5276554b5
    88{
    99    public static $classMap = array (
     
    504504    {
    505505        return \Closure::bind(function () use ($loader) {
    506             $loader->classMap = ComposerStaticInitb68ffd5d71617cdaee40683a48ad5f9e::$classMap;
     506            $loader->classMap = ComposerStaticInit2f574f619eebf4624df2a3e5276554b5::$classMap;
    507507
    508508        }, null, ClassLoader::class);
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Common/Api/Authentication/Oauth2.php

    r2819586 r2952051  
    8989    public function handleError(\stdClass $response, int $code) : void
    9090    {
    91         ($cache = $this->cache) ? $cache->delete(self::CACHE_KEY) : null;
     91        ($nullsafeVariable1 = $this->cache) ? $nullsafeVariable1->delete(self::CACHE_KEY) : null;
    9292        if (isset($response->errors[0]) && '643' === $response->errors[0]->code) {
    9393            throw new TokenExpiredException($response->errors[0]->detail);
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/AbstractAdapter.php

    r2819586 r2952051  
    4343            $item->value = $v = $value;
    4444            $item->isHit = $isHit;
     45            // Detect wrapped values that encode for their expiry and creation duration
     46            // For compactness, these values are packed in the key of an array using
     47            // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
    4548            reset($v);
    4649            // Detect wrapped values that encode for their expiry and creation duration
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/ProxyAdapter.php

    r2819586 r2952051  
    4949            $item->innerItem = $innerItem;
    5050            $item->poolHash = $poolHash;
     51            // Detect wrapped values that encode for their expiry and creation duration
     52            // For compactness, these values are packed in the key of an array using
     53            // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
    5154            reset($v);
    5255            // Detect wrapped values that encode for their expiry and creation duration
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/ApcuTrait.php

    r2819586 r2952051  
    103103        } catch (\Throwable $e) {
    104104            if (1 === \count($values)) {
     105                // Workaround https://github.com/krakjoe/apcu/issues/170
    105106                reset($values);
    106107                // Workaround https://github.com/krakjoe/apcu/issues/170
  • astrology/trunk/readme.txt

    r2830560 r2952051  
    33Tags: astrology, prokerala
    44Requires at least: 5.6
    5 Tested up to: 6.1.1
    6 Stable tag: 1.1.2
    7 Requires PHP: 7.2.0
     5Tested up to: 6.3
     6Stable tag: 1.1.3
     7Requires PHP: 7.2.0+
    88License: GPLV2+
    99
     
    2222== Available Services ==
    2323
     24* Daily Horoscope Predictions
     25* Numerology Calculators
    2426* Daily Panchang Calculators
    2527 * Panchang
     
    8587- `Numerology`
    8688- `Panchang`
     89- `Papasamyam`
    8790- `PapasamyamCheck`
    88 - `Papasamyam`
    8991- `PlanetPosition`
    9092- `Porutham`
     
    98100   The `display_charts` option allows showing _Rasi_ / _Navamsa_ chart in Kundli result. This will cost two additional API calls. The value of the attribute must be `lagna,navamsa`.
    99101
    100    `[astrology report="Kundli" display_charts="lagna,rasi"]`
     102        [astrology report="Kundli" display_charts="lagna,rasi"]
    101103
    102104- `result_type`
     
    104106   In calculators that support `basic` and `advanced` results, the result type can be forced using the `result_type` attribute. Settings this attribute will remove the corresponding input fields from the form.
    105107
    106    `[astrology report="Kundli" result_type="advanced"]`
     108        [astrology report="Kundli" result_type="advanced"]
    107109
    108110- `chart_style`
     
    110112   You can set the `chart_style` attribute to one of `north-indian`, `south-indian` or `east-indian` to force the result chart style. Setting this attribute will remove the corresponding input fields from the form.
    111113
    112    `[astrology report="Kundli" chart_style="south-indian"]`
     114        [astrology report="Kundli" chart_style="south-indian"]
    113115
    114116- `sign`
     
    131133
    132134== Changelog ==
     135
     136= 1.1.3 =
     137* Fix error message when saving shortcode without ayanamsa attribute
     138* Fix interchanged default value for chart_type and chart_style
    133139
    134140= 1.1.2 =
  • astrology/trunk/src/Front/Controller/ReportControllerTrait.php

    r2819586 r2952051  
    128128     */
    129129    protected function get_input_ayanamsa() {
    130         return isset( $_POST['ayanamsa'] ) ? (int) $_POST['ayanamsa'] : '';
     130        if ( ! isset( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
     131            return '';
     132        }
     133
     134        return isset( $_POST['ayanamsa'] ) ? (int) $_POST['ayanamsa'] : 1;
    131135    }
    132136
  • astrology/trunk/src/Front/Report/ChartController.php

    r2819586 r2952051  
    6969                'datetime'    => new \DateTimeImmutable( 'now', $this->get_timezone() ),
    7070                'chart_type'  => 'rasi',
    71                 'chart_style' => 'south-indian',
     71                'chart_style' => 'north-indian',
    7272                'chart_types' => [
    7373                    'rasi',
     
    138138    public function get_attribute_defaults() {
    139139        return $this->getCommonAttributeDefaults() + [
    140             'chart_style' => 'rasi',
    141             'chart_type' => 'north-indian',
     140            'chart_type' => 'rasi',
     141            'chart_style' => 'north-indian',
    142142        ];
    143143    }
  • astrology/trunk/src/vendor/autoload.php

    r2830560 r2952051  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7::getLoader();
     25return ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13::getLoader();
  • astrology/trunk/src/vendor/composer/ClassLoader.php

    r2819586 r2952051  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • astrology/trunk/src/vendor/composer/autoload_real.php

    r2830560 r2952051  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7
     5class ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit0c3a1662369a018c256975583ada52b7', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitdb96f25851238fcdd1f6ef2ae6ce1d13', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit0c3a1662369a018c256975583ada52b7::getInitializer($loader));
     30        call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • astrology/trunk/src/vendor/composer/autoload_static.php

    r2830560 r2952051  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit0c3a1662369a018c256975583ada52b7
     7class ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13
    88{
    99    public static $classMap = array (
     
    4444    {
    4545        return \Closure::bind(function () use ($loader) {
    46             $loader->classMap = ComposerStaticInit0c3a1662369a018c256975583ada52b7::$classMap;
     46            $loader->classMap = ComposerStaticInitdb96f25851238fcdd1f6ef2ae6ce1d13::$classMap;
    4747
    4848        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.