Plugin Directory

Changeset 2659372


Ignore:
Timestamp:
01/18/2022 01:19:00 PM (4 years ago)
Author:
prokerala
Message:

Update to version 1.0.6 from GitHub

Location:
astrology
Files:
2 added
2 deleted
140 edited
1 copied

Legend:

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

    r2612561 r2659372  
    1212 * Plugin URI:  https://api.prokerala.com
    1313 * Description: Integrate astrology calculators powered by Prokerala's Astrology API
    14  * Version:     1.0.5
     14 * Version:     1.0.6
    1515 * Author:      Prokerala
    1616 * Author URI:  https://www.prokerala.com
  • astrology/tags/1.0.6/dependencies/vendor/autoload.php

    r2612561 r2659372  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983::getLoader();
     7return ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::getLoader();
  • astrology/tags/1.0.6/dependencies/vendor/composer/autoload_classmap.php

    r2612549 r2659372  
    4242    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php',
    4343    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\AdvancedMatch' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/AdvancedMatch.php',
    44     'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Match' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Match.php',
     44    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\BasicMatch' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/BasicMatch.php',
    4545    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Profile' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Profile.php',
    4646    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\ProfileInfo' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ProfileInfo.php',
  • astrology/tags/1.0.6/dependencies/vendor/composer/autoload_real.php

    r2612561 r2659372  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983
     5class ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit64b03242fe32186abafab7033e7ee983::getInitializer($loader));
     33            call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::getInitializer($loader));
    3434        } else {
    3535            $classMap = require __DIR__ . '/autoload_classmap.php';
  • astrology/tags/1.0.6/dependencies/vendor/composer/autoload_static.php

    r2612561 r2659372  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit64b03242fe32186abafab7033e7ee983
     7class ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3
    88{
    99    public static $classMap = array (
     
    4343        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php',
    4444        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\AdvancedMatch' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/AdvancedMatch.php',
    45         'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Match' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Match.php',
     45        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\BasicMatch' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/BasicMatch.php',
    4646        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Profile' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Profile.php',
    4747        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\ProfileInfo' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ProfileInfo.php',
     
    345345    {
    346346        return \Closure::bind(function () use ($loader) {
    347             $loader->classMap = ComposerStaticInit64b03242fe32186abafab7033e7ee983::$classMap;
     347            $loader->classMap = ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::$classMap;
    348348
    349349        }, null, ClassLoader::class);
  • astrology/tags/1.0.6/dependencies/vendor/kriswallsmith/buzz/lib/Client/AbstractClient.php

    r2513947 r2659372  
    1212{
    1313    /**
    14      * @var OptionsResolver
     14     * @var OptionsResolver|null
    1515     */
    1616    private $optionsResolver;
  • astrology/tags/1.0.6/dependencies/vendor/kriswallsmith/buzz/lib/Client/MultiCurl.php

    r2513947 r2659372  
    4848    {
    4949        parent::__construct($responseFactory, $options);
    50         if (\PHP_VERSION_ID < 70215 || \PHP_VERSION_ID === 70300 || \PHP_VERSION_ID === 70301 || !(\CURL_VERSION_HTTP2 & \curl_version()['features'])) {
     50        if (\PHP_VERSION_ID < 70215 || \PHP_VERSION_ID === 70300 || \PHP_VERSION_ID === 70301 || \PHP_VERSION_ID >= 80000 || !(\CURL_VERSION_HTTP2 & \curl_version()['features'])) {
    5151            // Dont use HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/76675
    5252            $this->serverPushSupported = \false;
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/auspicious-period.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * AuspiciousPeriod.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/birth-details.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/chart.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * InauspiciousPeriod.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/choghadiya.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Choghadiya.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/inauspicious-period.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * InauspiciousPeriod.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/kaal-sarp-dosha.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/kundli-matching.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Nakshatra Porutham.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/kundli.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Kaal Sarp Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/mangal-dosha.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Mangal Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/nakshatra-porutham.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Nakshatra Porutham.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/panchang.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Panchang.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/papa-samyam-check.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Nakshatra Porutham.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/papasamyam.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/planet-position.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/porutham.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Porutham.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/sade-sati.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Sade Sati.
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/Horoscope/BirthDetails.php

    r2513947 r2659372  
    3737    private $zodiac;
    3838    /**
    39      * @var Nakshatra\NakshatraInfo
     39     * @var \Prokerala\Api\Astrology\Result\Horoscope\Nakshatra\NakshatraInfo
    4040     */
    4141    private $additionalInfo;
    42     /**
    43      * BirthDetails constructor.
    44      *
    45      * @param Nakshatra\NakshatraInfo $additionalInfo
    46      */
    4742    public function __construct(\Prokerala\Api\Astrology\Result\Element\Nakshatra $nakshatra, \Prokerala\Api\Astrology\Result\Element\Rasi $chandraRasi, \Prokerala\Api\Astrology\Result\Element\Rasi $sooryaRasi, \Prokerala\Api\Astrology\Result\Element\Zodiac $zodiac, \Prokerala\Api\Astrology\Result\Horoscope\Nakshatra\NakshatraInfo $additionalInfo)
    4843    {
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/NakshatraPorutham.php

    r2513947 r2659372  
    2929    private $message;
    3030    /**
    31      * @var Porutham\Match[]
     31     * @var Porutham\BasicMatch[]
    3232     */
    3333    private $matches;
     
    3535     * @param float            $maximumPoints
    3636     * @param float            $obtainedPoints
    37      * @param Porutham\Match[] $matches
     37     * @param Porutham\BasicMatch[] $matches
    3838     */
    3939    public function __construct($maximumPoints, $obtainedPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    6666    }
    6767    /**
    68      * @return Porutham\Match[]
     68     * @return Porutham\BasicMatch[]
    6969     */
    7070    public function getMatches()
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php

    r2513947 r2659372  
    3838    private $message;
    3939    /**
    40      * @var Porutham\Match[]
     40     * @var Porutham\BasicMatch[]
    4141     */
    4242    private $matches;
     
    4646     * @param float            $maximumPoints
    4747     * @param float            $totalPoints
    48      * @param Porutham\Match[] $matches
     48     * @param Porutham\BasicMatch[] $matches
    4949     */
    5050    public function __construct(\Prokerala\Api\Astrology\Result\HoroscopeMatching\Porutham\Profile $girlInfo, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Porutham\Profile $boyInfo, $maximumPoints, $totalPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    9393    }
    9494    /**
    95      * @return Porutham\Match[]
     95     * @return Porutham\BasicMatch[]
    9696     */
    9797    public function getMatches()
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ThirumanaPorutham.php

    r2513947 r2659372  
    2525    private $obtainedPoints;
    2626    /**
    27      * @var Porutham\Match[]
     27     * @var Porutham\BasicMatch[]
    2828     */
    2929    private $matches;
     
    3737     * @param float            $maximumPoints
    3838     * @param float            $obtainedPoints
    39      * @param Porutham\Match[] $matches
     39     * @param Porutham\BasicMatch[] $matches
    4040     */
    4141    public function __construct($maximumPoints, $obtainedPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    6868    }
    6969    /**
    70      * @return Porutham\Match[]
     70     * @return Porutham\BasicMatch[]
    7171     */
    7272    public function getMatches()
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/Panchang/Panchang.php

    r2513947 r2659372  
    7272    }
    7373    /**
    74      * @return mixed
     74     * @return string
    7575     */
    7676    public function getVaara()
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Traits/Service/TimeZoneAwareTrait.php

    r2513947 r2659372  
    4141    {
    4242        $transformer->setParamConverter('string', \DateTimeInterface::class, function ($data) {
    43             return new \DateTimeImmutable($data, $this->getTimeZone());
     43            return (new \DateTimeImmutable($data))->setTimezone($this->getTimeZone());
    4444        });
    4545    }
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Transformer.php

    r2612549 r2659372  
    6969    }
    7070    /**
    71      * @param string    $class
     71     * @param string    $className
    7272     * @param \stdClass $data
    7373     *
     
    127127    }
    128128    /**
    129      * @param ReflectionMethod $docComment
    130129     * @param string           $namespace
    131130     *
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/src/Common/Api/Client.php

    r2513947 r2659372  
    4444     * @param array  $input request parameters
    4545     *
    46      * @return array
     46     * @return \stdClass
    4747     */
    4848    public function process($path, $input)
  • astrology/tags/1.0.6/dependencies/vendor/prokerala/astrology-sdk/thirumana-porutham.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Thirumana Porutham.
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache-contracts/CacheTrait.php

    r2513947 r2659372  
    2525    /**
    2626     * {@inheritdoc}
     27     *
     28     * @return mixed
    2729     */
    2830    public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache-contracts/ItemInterface.php

    r2513947 r2659372  
    2424     * References the Unix timestamp stating when the item will expire.
    2525     */
    26     const METADATA_EXPIRY = 'expiry';
     26    public const METADATA_EXPIRY = 'expiry';
    2727    /**
    2828     * References the time the item took to be created, in milliseconds.
    2929     */
    30     const METADATA_CTIME = 'ctime';
     30    public const METADATA_CTIME = 'ctime';
    3131    /**
    3232     * References the list of tags that were assigned to the item, as string[].
    3333     */
    34     const METADATA_TAGS = 'tags';
     34    public const METADATA_TAGS = 'tags';
    3535    /**
    3636     * Reserved characters that cannot be used in a key or tag.
    3737     */
    38     const RESERVED_CHARACTERS = '{}()/\\@:';
     38    public const RESERVED_CHARACTERS = '{}()/\\@:';
    3939    /**
    4040     * Adds a tag to a cache item.
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Adapter/AbstractAdapter.php

    r2612549 r2659372  
    6363                if (null === $item->expiry) {
    6464                    $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0;
    65                 } elseif (0 === $item->expiry) {
     65                } elseif (!$item->expiry) {
    6666                    $ttl = 0;
    6767                } elseif (0 >= ($ttl = (int) (0.1 + $item->expiry - $now))) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php

    r2612549 r2659372  
    7070                if (null === $item->expiry) {
    7171                    $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0;
    72                 } elseif (0 === $item->expiry) {
     72                } elseif (!$item->expiry) {
    7373                    $ttl = 0;
    7474                } elseif (0 >= ($ttl = (int) (0.1 + $item->expiry - $now))) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Adapter/ArrayAdapter.php

    r2612549 r2659372  
    105105        $value = $item["\x00*\x00value"];
    106106        $expiry = $item["\x00*\x00expiry"];
    107         if (0 === $expiry) {
    108             $expiry = \PHP_INT_MAX;
    109         }
    110         if (null !== $expiry && $expiry <= \microtime(\true)) {
    111             $this->deleteItem($key);
    112             return \true;
     107        if (null !== $expiry) {
     108            if (!$expiry) {
     109                $expiry = \PHP_INT_MAX;
     110            } elseif ($expiry <= \microtime(\true)) {
     111                $this->deleteItem($key);
     112                return \true;
     113            }
    113114        }
    114115        if ($this->storeSerialized && null === ($value = $this->freeze($value, $key))) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Adapter/ProxyAdapter.php

    r2612549 r2659372  
    7777                }
    7878                $innerItem->set($item["\x00*\x00value"]);
    79                 $innerItem->expiresAt(null !== $item["\x00*\x00expiry"] ? \DateTime::createFromFormat('U.u', \sprintf('%.6F', 0 === $item["\x00*\x00expiry"] ? \PHP_INT_MAX : $item["\x00*\x00expiry"])) : null);
     79                $innerItem->expiresAt(null !== $item["\x00*\x00expiry"] ? \DateTime::createFromFormat('U.u', \sprintf('%.6F', $item["\x00*\x00expiry"])) : null);
    8080            },
    8181            null,
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Adapter/TagAwareAdapter.php

    r2612549 r2659372  
    126126    public function hasItem($key)
    127127    {
    128         if ($this->deferred) {
     128        if (\is_string($key) && isset($this->deferred[$key])) {
    129129            $this->commit();
    130130        }
     
    161161    public function getItems(array $keys = [])
    162162    {
    163         if ($this->deferred) {
    164             $this->commit();
    165         }
    166163        $tagKeys = [];
     164        $commit = \false;
    167165        foreach ($keys as $key) {
    168166            if ('' !== $key && \is_string($key)) {
     167                $commit = $commit || isset($this->deferred[$key]);
    169168                $key = static::TAGS_PREFIX . $key;
    170169                $tagKeys[$key] = $key;
    171170            }
     171        }
     172        if ($commit) {
     173            $this->commit();
    172174        }
    173175        try {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/LockRegistry.php

    r2612549 r2659372  
    5656        }
    5757        $key = self::$files ? \abs(\crc32($item->getKey())) % \count(self::$files) : -1;
    58         if ($key < 0 || (self::$lockedFiles[$key] ?? \false) || !($lock = self::open($key))) {
     58        if ($key < 0 || self::$lockedFiles || !($lock = self::open($key))) {
    5959            return $callback($item, $save);
    6060        }
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/AbstractAdapterTrait.php

    r2612549 r2659372  
    3535    public function getItem($key)
    3636    {
    37         if ($this->deferred) {
     37        $id = $this->getId($key);
     38        if (isset($this->deferred[$key])) {
    3839            $this->commit();
    3940        }
    40         $id = $this->getId($key);
    4141        $f = $this->createCacheItem;
    4242        $isHit = \false;
     
    5757    public function getItems(array $keys = [])
    5858    {
    59         if ($this->deferred) {
    60             $this->commit();
    61         }
    6259        $ids = [];
     60        $commit = \false;
    6361        foreach ($keys as $key) {
    6462            $ids[] = $this->getId($key);
     63            $commit = $commit || isset($this->deferred[$key]);
     64        }
     65        if ($commit) {
     66            $this->commit();
    6567        }
    6668        try {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/AbstractTrait.php

    r2513947 r2659372  
    251251        \Prokerala\Astrology\Vendor\Symfony\Component\Cache\CacheItem::validateKey($key);
    252252        $this->ids[$key] = $key;
     253        if (\count($this->ids) > 1000) {
     254            \array_splice($this->ids, 0, 500);
     255            // stop memory leak if there are many keys
     256        }
    253257        if (null === $this->maxIdLength) {
    254258            return $this->namespace . $this->namespaceVersion . $key;
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/ApcuTrait.php

    r2612549 r2659372  
    4949        try {
    5050            $values = [];
    51             foreach (\apcu_fetch($ids, $ok) ?: [] as $k => $v) {
     51            $ids = \array_flip($ids);
     52            foreach (\apcu_fetch(\array_keys($ids), $ok) ?: [] as $k => $v) {
     53                if (!isset($ids[$k])) {
     54                    // work around https://github.com/krakjoe/apcu/issues/247
     55                    $k = \key($ids);
     56                }
     57                unset($ids[$k]);
    5258                if (null !== $v || $ok) {
    5359                    $values[$k] = $v;
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/ContractsTrait.php

    r2513947 r2659372  
    2929        doGet as private contractsGet;
    3030    }
    31     private $callbackWrapper = [\Prokerala\Astrology\Vendor\Symfony\Component\Cache\LockRegistry::class, 'compute'];
     31    private $callbackWrapper;
    3232    private $computing = [];
    3333    /**
     
    3838    public function setCallbackWrapper(?callable $callbackWrapper) : callable
    3939    {
     40        if (!isset($this->callbackWrapper)) {
     41            $this->callbackWrapper = \Closure::fromCallable([\Prokerala\Astrology\Vendor\Symfony\Component\Cache\LockRegistry::class, 'compute']);
     42            if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], \true)) {
     43                $this->setCallbackWrapper(null);
     44            }
     45        }
    4046        $previousWrapper = $this->callbackWrapper;
    41         $this->callbackWrapper = $callbackWrapper ?? function (callable $callback, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\ItemInterface $item, bool &$save, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\CacheInterface $pool, \Closure $setMetadata, ?\Psr\Log\LoggerInterface $logger) {
     47        $this->callbackWrapper = $callbackWrapper ?? static function (callable $callback, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\ItemInterface $item, bool &$save, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\CacheInterface $pool, \Closure $setMetadata, ?\Psr\Log\LoggerInterface $logger) {
    4248            return $callback($item, $save);
    4349        };
     
    6773            $this->computing[$key] = $key;
    6874            $startTime = \microtime(\true);
     75            if (!isset($this->callbackWrapper)) {
     76                $this->setCallbackWrapper($this->setCallbackWrapper(null));
     77            }
    6978            try {
    7079                $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (\Prokerala\Astrology\Vendor\Symfony\Component\Cache\CacheItem $item) use($setMetadata, $startTime, &$metadata) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/MemcachedTrait.php

    r2612549 r2659372  
    224224    {
    225225        try {
    226             $encodedIds = \array_map('self::encodeKey', $ids);
     226            $encodedIds = \array_map([__CLASS__, 'encodeKey'], $ids);
    227227            $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds));
    228228            $result = [];
     
    248248    {
    249249        $ok = \true;
    250         $encodedIds = \array_map('self::encodeKey', $ids);
     250        $encodedIds = \array_map([__CLASS__, 'encodeKey'], $ids);
    251251        foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) {
    252252            if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/PdoTrait.php

    r2612549 r2659372  
    131131                throw new \DomainException(\sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
    132132        }
    133         if (\method_exists($conn, 'executeStatement')) {
     133        if ($conn instanceof \Prokerala\Astrology\Vendor\Doctrine\DBAL\Connection && \method_exists($conn, 'executeStatement')) {
    134134            $conn->executeStatement($sql);
    135135        } else {
     
    243243        }
    244244        try {
    245             if (\method_exists($conn, 'executeStatement')) {
     245            if ($conn instanceof \Prokerala\Astrology\Vendor\Doctrine\DBAL\Connection && \method_exists($conn, 'executeStatement')) {
    246246                $conn->executeStatement($sql);
    247247            } else {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/cache/Traits/RedisTrait.php

    r2612549 r2659372  
    118118        }
    119119        if (isset($params['host']) || isset($params['path'])) {
    120             if (!isset($params['dbindex']) && isset($params['path']) && \preg_match('#/(\\d+)$#', $params['path'], $m)) {
    121                 $params['dbindex'] = $m[1];
    122                 $params['path'] = \substr($params['path'], 0, -\strlen($m[0]));
     120            if (!isset($params['dbindex']) && isset($params['path'])) {
     121                if (\preg_match('#/(\\d+)$#', $params['path'], $m)) {
     122                    $params['dbindex'] = $m[1];
     123                    $params['path'] = \substr($params['path'], 0, -\strlen($m[0]));
     124                } elseif (isset($params['host'])) {
     125                    throw new \Prokerala\Astrology\Vendor\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Invalid Redis DSN: "%s", the "dbindex" parameter must be a number.', $dsn));
     126                }
    123127            }
    124128            if (isset($params['host'])) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php

    r2612549 r2659372  
    1111 * file that was distributed with this source code.
    1212 */
    13 class JsonException extends \Exception
    14 {
     13if (\PHP_VERSION_ID < 70300) {
     14    class JsonException extends \Exception
     15    {
     16    }
    1517}
  • astrology/tags/1.0.6/dependencies/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php

    r2513947 r2659372  
    33namespace Prokerala\Astrology\Vendor;
    44
    5 class UnhandledMatchError extends \Error
    6 {
     5if (\PHP_VERSION_ID < 80000) {
     6    class UnhandledMatchError extends \Error
     7    {
     8    }
    79}
  • astrology/tags/1.0.6/dependencies/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php

    r2513947 r2659372  
    33namespace Prokerala\Astrology\Vendor;
    44
    5 class ValueError extends \Error
    6 {
     5if (\PHP_VERSION_ID < 80000) {
     6    class ValueError extends \Error
     7    {
     8    }
    79}
  • astrology/tags/1.0.6/dependencies/vendor/symfony/service-contracts/ServiceLocatorTrait.php

    r2513947 r2659372  
    4545    /**
    4646     * {@inheritdoc}
     47     *
     48     * @return mixed
    4749     */
    4850    public function get($id)
  • astrology/tags/1.0.6/dependencies/vendor/symfony/service-contracts/ServiceSubscriberInterface.php

    r2513947 r2659372  
    4747     *  * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
    4848     *
    49      * @return array The required service types, optionally keyed by service names
     49     * @return string[] The required service types, optionally keyed by service names
    5050     */
    5151    public static function getSubscribedServices();
  • astrology/tags/1.0.6/dependencies/vendor/symfony/service-contracts/ServiceSubscriberTrait.php

    r2513947 r2659372  
    2222    /** @var ContainerInterface */
    2323    protected $container;
     24    /**
     25     * {@inheritdoc}
     26     */
    2427    public static function getSubscribedServices() : array
    2528    {
     
    3336                continue;
    3437            }
    35             if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
    36                 $services[self::class . '::' . $method->name] = '?' . ($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type);
     38            if (self::class !== $method->getDeclaringClass()->name) {
     39                continue;
    3740            }
     41            if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) {
     42                continue;
     43            }
     44            if ($returnType->isBuiltin()) {
     45                continue;
     46            }
     47            $services[self::class . '::' . $method->name] = '?' . $returnType->getName();
    3848        }
    3949        return $services;
     
    4151    /**
    4252     * @required
     53     *
     54     * @return ContainerInterface|null
    4355     */
    4456    public function setContainer(\Psr\Container\ContainerInterface $container)
  • astrology/tags/1.0.6/dependencies/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php

    r2513947 r2659372  
    1616abstract class ServiceLocatorTest extends \Prokerala\Astrology\Vendor\PHPUnit\Framework\TestCase
    1717{
     18    /**
     19     * @return ContainerInterface
     20     */
    1821    protected function getServiceLocator(array $factories)
    1922    {
     
    6063    {
    6164        if (!$this->getExpectedException()) {
    62             $this->expectException('Psr\\Container\\NotFoundExceptionInterface');
     65            $this->expectException(\Psr\Container\NotFoundExceptionInterface::class);
    6366            $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
    6467        }
     
    7073    public function testThrowsOnCircularReference()
    7174    {
    72         $this->expectException('Psr\\Container\\ContainerExceptionInterface');
     75        $this->expectException(\Psr\Container\ContainerExceptionInterface::class);
    7376        $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
    7477        $locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
  • astrology/tags/1.0.6/dependencies/vendor/symfony/var-exporter/Internal/Exporter.php

    r2612549 r2659372  
    8383            $properties = [];
    8484            $sleep = null;
    85             $arrayValue = (array) $value;
    8685            $proto = \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$prototypes[$class];
    8786            if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) {
    8887                // ArrayIterator and ArrayObject need special care because their "flags"
    8988                // option changes the behavior of the (array) casting operator.
    90                 $properties = self::getArrayObjectProperties($value, $arrayValue, $proto);
     89                [$arrayValue, $properties] = self::getArrayObjectProperties($value, $proto);
    9190                // populates Registry::$prototypes[$class] with a new instance
    9291                \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::getClassReflector($class, \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$instantiableWithoutConstructor[$class], \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$cloneable[$class]);
     
    9998                }
    10099                $properties = ['SplObjectStorage' => ["\x00" => $properties]];
     100                $arrayValue = (array) $value;
    101101            } elseif ($value instanceof \Serializable || $value instanceof \__PHP_Incomplete_Class) {
    102102                ++$objectsCount;
     
    104104                $value = new \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Reference($id);
    105105                goto handle_value;
    106             }
    107             if (\method_exists($class, '__sleep')) {
    108                 if (!\is_array($sleep = $value->__sleep())) {
    109                     \trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE);
    110                     $value = null;
    111                     goto handle_value;
    112                 }
    113                 foreach ($sleep as $name) {
    114                     if (\property_exists($value, $name) && !$reflector->hasProperty($name)) {
    115                         $arrayValue[$name] = $value->{$name};
     106            } else {
     107                if (\method_exists($class, '__sleep')) {
     108                    if (!\is_array($sleep = $value->__sleep())) {
     109                        \trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE);
     110                        $value = null;
     111                        goto handle_value;
    116112                    }
    117                 }
    118                 $sleep = \array_flip($sleep);
     113                    $sleep = \array_flip($sleep);
     114                }
     115                $arrayValue = (array) $value;
    119116            }
    120117            $proto = (array) $proto;
     
    200197        if (\is_string($value)) {
    201198            $code = \sprintf("'%s'", \addcslashes($value, "'\\"));
    202             $code = \preg_replace_callback('/([\\0\\r\\n]++)(.)/', function ($m) use($subIndent) {
    203                 $m[1] = \sprintf('\'."%s".\'', \str_replace(["\x00", "\r", "\n", '\\n\\'], ['\\0', '\\r', '\\n', '\\n"' . "\n" . $subIndent . '."\\'], $m[1]));
     199            $code = \preg_replace_callback("/((?:[\\0\\r\\n]|‪|‫|‭|‮|⁦|⁧|⁨|‬|⁩)++)(.)/", function ($m) use($subIndent) {
     200                $m[1] = \sprintf('\'."%s".\'', \str_replace(["\x00", "\r", "\n", "‪", "‫", "‭", "‮", "⁦", "⁧", "⁨", "‬", "⁩", '\\n\\'], ['\\0', '\\r', '\\n', '\\u{202A}', '\\u{202B}', '\\u{202D}', '\\u{202E}', '\\u{2066}', '\\u{2067}', '\\u{2068}', '\\u{202C}', '\\u{2069}', '\\n"' . "\n" . $subIndent . '."\\'], $m[1]));
    204201                if ("'" === $m[2]) {
    205202                    return \substr($m[1], 0, -2);
     
    254251        $r = '\\' . \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::class;
    255252        $j = -1;
    256         foreach ($value as $k => $class) {
     253        foreach ($value->classes as $k => $class) {
    257254            if (':' === ($class[1] ?? null)) {
    258255                $serializables[$k] = $class;
     
    324321     * @param \ArrayIterator|\ArrayObject $proto
    325322     */
    326     private static function getArrayObjectProperties($value, array &$arrayValue, $proto) : array
     323    private static function getArrayObjectProperties($value, $proto) : array
    327324    {
    328325        $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject';
    329326        $reflector = \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$reflectors[$reflector] ?? \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::getClassReflector($reflector);
    330         $properties = [$arrayValue, $reflector->getMethod('getFlags')->invoke($value), $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator'];
     327        $properties = [$arrayValue = (array) $value, $reflector->getMethod('getFlags')->invoke($value), $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator'];
    331328        $reflector = $reflector->getMethod('setFlags');
    332329        $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST);
     
    347344            $properties = [$reflector->class => ["\x00" => $properties]];
    348345        }
    349         return $properties;
     346        return [$arrayValue, $properties];
    350347    }
    351348}
  • astrology/tags/1.0.6/dependencies/vendor/symfony/var-exporter/Internal/Registry.php

    r2513947 r2659372  
    2525    public static $cloneable = [];
    2626    public static $instantiableWithoutConstructor = [];
     27    public $classes = [];
    2728    public function __construct(array $classes)
    2829    {
    29         foreach ($classes as $i => $class) {
    30             $this->{$i} = $class;
    31         }
     30        $this->classes = $classes;
    3231    }
    3332    public static function unserialize($objects, $serializables)
  • astrology/tags/1.0.6/readme.txt

    r2612549 r2659372  
    33Tags: astrology, prokerala
    44Requires at least: 5.5
    5 Tested up to: 5.8.1
    6 Stable tag: 1.0.5
     5Tested up to: 5.8.3
     6Stable tag: 1.0.6
    77Requires PHP: 7.2.0
    88License: GPLV2+
     
    117117== Changelog ==
    118118
     119= 1.0.6 =
     120* Fix datetimes reverting to UTC
     121
    119122= 1.0.5 =
    120123* Location parameters where not being passed correctly
  • astrology/tags/1.0.6/src/Admin/SettingsPage.php

    r2612549 r2659372  
    236236     */
    237237    public function render_timezone() { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
     238
     239        $regions = $this->get_timezone_list();
     240        $current = $this->config->get_option( 'timezone' );
     241
     242        echo '<select id="astrology_plugin_setting_timezone" name="astrology_plugin_options[timezone]">';
     243        foreach ( $regions as $region => $zones ) {
     244            echo "<optgroup label='{$region}'>";
     245            foreach ( $zones as $zone => $label ) {
     246                echo "<option value='{$zone}'" . ( $current === $zone ? ' selected' : '' ) . ">{$label}</option>";
     247            }
     248            echo '</optgroup>';
     249        }
     250        echo '</select>';
     251    }
     252
     253    /**
     254     * Generate list of timezones
     255     *
     256     * @since 1.0.6
     257     *
     258     * @return array
     259     */
     260    private function get_timezone_list() {
     261
    238262        $tz_list = \DateTimeZone::listIdentifiers( \DateTimeZone::ALL );
    239263        $now     = new \DateTimeImmutable();
     
    256280        );
    257281
    258         $current = $this->config->get_option( 'timezone' );
    259 
    260         echo '<select id="astrology_plugin_setting_timezone" name="astrology_plugin_options[timezone]">';
    261         foreach ( $regions as $region => $zones ) {
    262             echo "<optgroup label='{$region}'>";
    263             foreach ( $zones as $zone => $label ) {
    264                 echo "<option value='{$zone}'" . ( $current === $zone ? ' selected' : '' ) . ">{$label}</option>";
    265             }
    266             echo '</optgroup>';
    267         }
    268         echo '</select>';
     282        return $regions;
    269283    }
    270284
  • astrology/tags/1.0.6/src/Front/Report/AuspiciousPeriodController.php

    r2513947 r2659372  
    8989        $method   = new AuspiciousPeriod( $client );
    9090        $method->setAyanamsa( $this->get_input_ayanamsa() );
     91        $method->setTimeZone( $tz );
    9192        $result = $method->process( $location, $datetime );
    9293
  • astrology/tags/1.0.6/src/Front/Report/ChoghadiyaController.php

    r2513947 r2659372  
    8989        $method   = new Choghadiya( $client );
    9090        $method->setAyanamsa( $this->get_input_ayanamsa() );
     91        $method->setTimeZone( $tz );
    9192        $result = $method->process( $location, $datetime );
    9293
  • astrology/tags/1.0.6/src/Front/Report/InauspiciousPeriodController.php

    r2513947 r2659372  
    9090        $method   = new InauspiciousPeriod( $client );
    9191        $method->setAyanamsa( $this->get_input_ayanamsa() );
     92        $method->setTimeZone( $tz );
    9293        $result = $method->process( $location, $datetime );
    9394
  • astrology/tags/1.0.6/src/Front/Report/KundliMatchingController.php

    r2513947 r2659372  
    105105        $result = $method->process( $girl_profile, $boy_profile, $advanced );
    106106
    107         $girl_info = $result->getGirlInfo();
    108         $boy_info  = $result->getBoyInfo();
    109         $boy_koot  = $boy_info->getKoot();
    110         $girl_koot = $girl_info->getKoot();
    111 
    112         $girl_nakshatra      = $girl_info->getNakshatra();
    113         $boy_nakshatra       = $boy_info->getNakshatra();
    114         $girl_nakshatra_lord = $girl_nakshatra->getLord();
    115         $boy_nakshatra_lord  = $boy_nakshatra->getLord();
    116 
    117         $girl_rasi      = $girl_info->getRasi();
    118         $boy_rasi       = $boy_info->getRasi();
    119         $girl_rasi_lord = $girl_rasi->getLord();
    120         $boy_rasi_lord  = $boy_rasi->getLord();
    121 
    122         $compatibility_result['boyInfo']['koot']  = $boy_koot->getKoot();
    123         $compatibility_result['girlInfo']['koot'] = $girl_koot->getKoot();
    124 
    125         $compatibility_result['girlInfo']['nakshatra'] = [
    126             'id'   => $girl_nakshatra->getId(),
    127             'name' => $girl_nakshatra->getName(),
    128             'pada' => $girl_nakshatra->getPada(),
    129             'lord' => [
    130                 'id'        => $girl_nakshatra_lord->getId(),
    131                 'name'      => $girl_nakshatra_lord->getName(),
    132                 'vedicName' => $girl_nakshatra_lord->getVedicName(),
    133             ],
    134         ];
    135 
    136         $compatibility_result['boyInfo']['nakshatra'] = [
    137             'id'   => $boy_nakshatra->getId(),
    138             'name' => $boy_nakshatra->getName(),
    139             'pada' => $boy_nakshatra->getPada(),
    140             'lord' => [
    141                 'id'        => $boy_nakshatra_lord->getId(),
    142                 'name'      => $boy_nakshatra_lord->getName(),
    143                 'vedicName' => $boy_nakshatra_lord->getVedicName(),
    144             ],
    145         ];
    146 
    147         $compatibility_result['girlInfo']['rasi'] = [
    148             'id'   => $girl_rasi->getId(),
    149             'name' => $girl_rasi->getName(),
    150             'lord' => [
    151                 'id'        => $girl_rasi_lord->getId(),
    152                 'name'      => $girl_rasi_lord->getName(),
    153                 'vedicName' => $girl_rasi_lord->getVedicName(),
    154             ],
    155         ];
    156 
    157         $compatibility_result['boyInfo']['rasi'] = [
    158             'id'   => $boy_rasi->getId(),
    159             'name' => $boy_rasi->getName(),
    160             'lord' => [
    161                 'id'        => $boy_rasi_lord->getId(),
    162                 'name'      => $boy_rasi_lord->getName(),
    163                 'vedicName' => $boy_rasi_lord->getVedicName(),
    164             ],
    165         ];
    166 
    167         $message                         = $result->getMessage();
    168         $compatibility_result['message'] = [
    169             'type'        => $message->getType(),
    170             'description' => $message->getDescription(),
    171         ];
    172 
    173         $guna_milan                        = $result->getGunaMilan();
    174         $compatibility_result['gunaMilan'] = [
    175             'totalPoints'   => $guna_milan->getTotalPoints(),
    176             'maximumPoints' => $guna_milan->getMaximumPoints(),
    177         ];
    178 
    179         if ( $advanced ) {
    180             $ar_guna = $guna_milan->getGuna();
    181 
    182             foreach ( $ar_guna as $guna ) {
    183                 $compatibility_result['gunaMilan']['guna'][] = [
    184                     'id'             => $guna->getId(),
    185                     'name'           => $guna->getName(),
    186                     'girlKoot'       => $guna->getGirlKoot(),
    187                     'boyKoot'        => $guna->getBoyKoot(),
    188                     'maximumPoints'  => $guna->getMaximumPoints(),
    189                     'obtainedPoints' => $guna->getObtainedPoints(),
    190                     'description'    => $guna->getDescription(),
    191                 ];
    192             }
    193             $compatibility_result['exceptions'] = $result->getExceptions();
    194 
    195             $girl_mangal_dosha_details = $result->getGirlMangalDoshaDetails();
    196             $boy_mangal_dosha_details  = $result->getBoyMangalDoshaDetails();
    197 
    198             $compatibility_result['girlMangalDoshaDetails'] = [
    199                 'hasMangalDosha'  => $girl_mangal_dosha_details->hasDosha(),
    200                 'hasException'    => $girl_mangal_dosha_details->hasException(),
    201                 'mangalDoshaType' => $girl_mangal_dosha_details->getDoshaType(),
    202                 'description'     => $girl_mangal_dosha_details->getDescription(),
    203             ];
    204 
    205             $compatibility_result['boyMangalDoshaDetails'] = [
    206                 'hasMangalDosha'  => $boy_mangal_dosha_details->hasDosha(),
    207                 'hasException'    => $boy_mangal_dosha_details->hasException(),
    208                 'mangalDoshaType' => $boy_mangal_dosha_details->getDoshaType(),
    209                 'description'     => $boy_mangal_dosha_details->getDescription(),
    210             ];
    211         }
     107        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
    212108
    213109        return $this->render(
     
    222118        );
    223119    }
     120
     121    /**
     122     * Get compatability result
     123     *
     124     * @param object $result API Result.
     125     * @param int    $advanced Advanced Result.
     126     * @return array
     127     */
     128    private function get_compatibility_result( $result, $advanced ) {
     129        $compatibility_result = [];
     130        $girl_info            = $result->getGirlInfo();
     131        $girl_nakshatra       = $girl_info->getNakshatra();
     132        $girl_nakshatra_lord  = $girl_nakshatra->getLord();
     133        $girl_rasi            = $girl_info->getRasi();
     134        $girl_rasi_lord       = $girl_rasi->getLord();
     135        $girl_koot            = $girl_info->getKoot();
     136
     137        $compatibility_result['girlInfo']['koot']      = $girl_koot->getKoot();
     138        $compatibility_result['girlInfo']['nakshatra'] = [
     139            'id'   => $girl_nakshatra->getId(),
     140            'name' => $girl_nakshatra->getName(),
     141            'pada' => $girl_nakshatra->getPada(),
     142            'lord' => [
     143                'id'        => $girl_nakshatra_lord->getId(),
     144                'name'      => $girl_nakshatra_lord->getName(),
     145                'vedicName' => $girl_nakshatra_lord->getVedicName(),
     146            ],
     147        ];
     148
     149        $compatibility_result['girlInfo']['rasi'] = [
     150            'id'   => $girl_rasi->getId(),
     151            'name' => $girl_rasi->getName(),
     152            'lord' => [
     153                'id'        => $girl_rasi_lord->getId(),
     154                'name'      => $girl_rasi_lord->getName(),
     155                'vedicName' => $girl_rasi_lord->getVedicName(),
     156            ],
     157        ];
     158
     159        $boy_info           = $result->getBoyInfo();
     160        $boy_nakshatra      = $boy_info->getNakshatra();
     161        $boy_nakshatra_lord = $boy_nakshatra->getLord();
     162        $boy_rasi           = $boy_info->getRasi();
     163        $boy_rasi_lord      = $boy_rasi->getLord();
     164
     165        $boy_koot                                     = $boy_info->getKoot();
     166        $compatibility_result['boyInfo']['koot']      = $boy_koot->getKoot();
     167        $compatibility_result['boyInfo']['nakshatra'] = [
     168            'id'   => $boy_nakshatra->getId(),
     169            'name' => $boy_nakshatra->getName(),
     170            'pada' => $boy_nakshatra->getPada(),
     171            'lord' => [
     172                'id'        => $boy_nakshatra_lord->getId(),
     173                'name'      => $boy_nakshatra_lord->getName(),
     174                'vedicName' => $boy_nakshatra_lord->getVedicName(),
     175            ],
     176        ];
     177        $compatibility_result['boyInfo']['rasi']      = [
     178            'id'   => $boy_rasi->getId(),
     179            'name' => $boy_rasi->getName(),
     180            'lord' => [
     181                'id'        => $boy_rasi_lord->getId(),
     182                'name'      => $boy_rasi_lord->getName(),
     183                'vedicName' => $boy_rasi_lord->getVedicName(),
     184            ],
     185        ];
     186
     187        $message                         = $result->getMessage();
     188        $compatibility_result['message'] = [
     189            'type'        => $message->getType(),
     190            'description' => $message->getDescription(),
     191        ];
     192
     193        $guna_milan                        = $result->getGunaMilan();
     194        $compatibility_result['gunaMilan'] = [
     195            'totalPoints'   => $guna_milan->getTotalPoints(),
     196            'maximumPoints' => $guna_milan->getMaximumPoints(),
     197        ];
     198
     199        if ( ! $advanced ) {
     200            return $compatibility_result;
     201        }
     202
     203        $ar_guna = $guna_milan->getGuna();
     204
     205        foreach ( $ar_guna as $guna ) {
     206             $compatibility_result['gunaMilan']['guna'][] = [
     207                 'id'             => $guna->getId(),
     208                 'name'           => $guna->getName(),
     209                 'girlKoot'       => $guna->getGirlKoot(),
     210                 'boyKoot'        => $guna->getBoyKoot(),
     211                 'maximumPoints'  => $guna->getMaximumPoints(),
     212                 'obtainedPoints' => $guna->getObtainedPoints(),
     213                 'description'    => $guna->getDescription(),
     214             ];
     215        }
     216        $compatibility_result['exceptions'] = $result->getExceptions();
     217
     218        $girl_mangal_dosha_details = $result->getGirlMangalDoshaDetails();
     219        $boy_mangal_dosha_details  = $result->getBoyMangalDoshaDetails();
     220
     221        $compatibility_result['girlMangalDoshaDetails'] = [
     222            'hasMangalDosha'  => $girl_mangal_dosha_details->hasDosha(),
     223            'hasException'    => $girl_mangal_dosha_details->hasException(),
     224            'mangalDoshaType' => $girl_mangal_dosha_details->getDoshaType(),
     225            'description'     => $girl_mangal_dosha_details->getDescription(),
     226        ];
     227
     228        $compatibility_result['boyMangalDoshaDetails'] = [
     229            'hasMangalDosha'  => $boy_mangal_dosha_details->hasDosha(),
     230            'hasException'    => $boy_mangal_dosha_details->hasException(),
     231            'mangalDoshaType' => $boy_mangal_dosha_details->getDoshaType(),
     232            'description'     => $boy_mangal_dosha_details->getDescription(),
     233        ];
     234
     235         return $compatibility_result;
     236    }
    224237}
  • astrology/tags/1.0.6/src/Front/Report/NakshatraPoruthamController.php

    r2513947 r2659372  
    114114     * @return string
    115115     */
    116     public function process( $options = [] ) {
     116    public function process( $options = [] ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
    117117        $client = $this->get_api_client();
    118118
     
    131131        $method = new NakshatraPorutham( $client );
    132132        $result = $method->process( $girl_profile, $boy_profile, $advanced );
     133
     134        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     135
     136        return $this->render(
     137            'result/nakshatra-porutham',
     138            [
     139                'result'      => $compatibility_result,
     140                'result_type' => $result_type,
     141                'options'     => $this->get_options(),
     142            ]
     143        );
     144    }
     145
     146    /**
     147     * Get compatability result
     148     *
     149     * @param object $result API Result.
     150     * @param int    $advanced Advanced Result.
     151     * @return array
     152     */
     153    private function get_compatibility_result( $result, $advanced ) {
    133154
    134155        $compatibility_result = [];
     
    156177        }
    157178
    158         return $this->render(
    159             'result/nakshatra-porutham',
    160             [
    161                 'result'      => $compatibility_result,
    162                 'result_type' => $result_type,
    163                 'options'     => $this->get_options(),
    164             ]
    165         );
     179        return $compatibility_result;
    166180    }
    167181}
  • astrology/tags/1.0.6/src/Front/Report/PanchangController.php

    r2513947 r2659372  
    9393        $method   = new Panchang( $client );
    9494        $method->setAyanamsa( $this->get_input_ayanamsa() );
     95        $method->setTimeZone( $tz );
    9596        $result = $method->process( $location, $datetime, $advanced );
    9697
  • astrology/tags/1.0.6/src/Front/Report/PoruthamController.php

    r2513947 r2659372  
    105105        $result = $method->process( $girl_profile, $boy_profile, $system, $advanced );
    106106
     107        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     108
     109        return $this->render(
     110            'result/porutham',
     111            [
     112                'result'      => $compatibility_result,
     113                'result_type' => $result_type,
     114                'girl_dob'    => $girl_dob,
     115                'boy_dob'     => $boy_dob,
     116                'options'     => $this->get_options(),
     117            ]
     118        );
     119    }
     120
     121    /**
     122     * Get compatability result
     123     *
     124     * @param object $result API Result.
     125     * @param int    $advanced Advanced Result.
     126     * @return array
     127     */
     128    private function get_compatibility_result( $result, $advanced ) {
    107129        $compatibility_result = [];
    108         $girl_info            = $result->getGirlInfo();
    109         $girl_nakshatra       = $girl_info->getNakshatra();
    110         $girl_rasi            = $girl_info->getRasi();
    111 
    112         $boy_info      = $result->getBoyInfo();
    113         $boy_nakshatra = $boy_info->getNakshatra();
    114         $boy_rasi      = $boy_info->getRasi();
    115 
     130
     131        $girl_info           = $result->getGirlInfo();
     132        $girl_nakshatra      = $girl_info->getNakshatra();
     133        $girl_rasi           = $girl_info->getRasi();
    116134        $girl_nakshatra_lord = $girl_nakshatra->getLord();
    117         $boy_nakshatra_lord  = $boy_nakshatra->getLord();
    118 
    119         $girl_rasi_lord = $girl_rasi->getLord();
    120         $boy_rasi_lord  = $boy_rasi->getLord();
     135        $girl_rasi_lord      = $girl_rasi->getLord();
    121136
    122137        $compatibility_result['girlInfo'] = [
     
    142157        ];
    143158
    144         $compatibility_result['boyInfo']       = [
     159        $boy_info           = $result->getBoyInfo();
     160        $boy_nakshatra      = $boy_info->getNakshatra();
     161        $boy_rasi           = $boy_info->getRasi();
     162        $boy_nakshatra_lord = $boy_nakshatra->getLord();
     163        $boy_rasi_lord      = $boy_rasi->getLord();
     164
     165        $compatibility_result['boyInfo'] = [
    145166            'nakshatra' => [
    146167                'id'   => $boy_nakshatra->getId(),
     
    163184            ],
    164185        ];
     186
    165187        $compatibility_result['maximumPoints'] = $result->getMaximumPoints();
    166188        $compatibility_result['totalPoints']   = $result->getTotalPoints();
     
    187209        }
    188210
    189         return $this->render(
    190             'result/porutham',
    191             [
    192                 'result'      => $compatibility_result,
    193                 'result_type' => $result_type,
    194                 'girl_dob'    => $girl_dob,
    195                 'boy_dob'     => $boy_dob,
    196                 'options'     => $this->get_options(),
    197             ]
    198         );
     211        return $compatibility_result;
    199212    }
    200213}
  • astrology/tags/1.0.6/src/Front/Report/SadeSatiController.php

    r2513947 r2659372  
    9393        $method   = new SadeSati( $client );
    9494        $method->setAyanamsa( $this->get_input_ayanamsa() );
     95        $method->setTimeZone( $tz );
    9596        $result = $method->process( $location, $datetime, $advanced );
    9697
  • astrology/tags/1.0.6/src/Front/Report/ThirumanaPoruthamController.php

    r2513947 r2659372  
    115115     * @return string
    116116     */
    117     public function process( $options = [] ) {
     117    public function process( $options = [] ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
    118118        $client = $this->get_api_client();
    119119
     
    132132        $method = new ThirumanaPorutham( $client );
    133133        $result = $method->process( $girl_profile, $boy_profile, $advanced );
     134
     135        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     136
     137        return $this->render(
     138            'result/thirumana-porutham',
     139            [
     140                'result'      => $compatibility_result,
     141                'result_type' => $result_type,
     142                'options'     => $this->get_options(),
     143            ]
     144        );
     145    }
     146
     147
     148    /**
     149     * Get compatability result
     150     *
     151     * @param object $result API Result.
     152     * @param int    $advanced Advanced Result.
     153     * @return array
     154     */
     155    private function get_compatibility_result( $result, $advanced ) {
    134156
    135157        $compatibility_result                  = [];
     
    155177        }
    156178
    157         return $this->render(
    158             'result/thirumana-porutham',
    159             [
    160                 'result'      => $compatibility_result,
    161                 'result_type' => $result_type,
    162                 'options'     => $this->get_options(),
    163             ]
    164         );
     179        return $compatibility_result;
    165180    }
    166181}
  • astrology/tags/1.0.6/src/vendor/autoload.php

    r2612561 r2659372  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa::getLoader();
     7return ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d::getLoader();
  • astrology/tags/1.0.6/src/vendor/composer/autoload_real.php

    r2612561 r2659372  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa
     5class ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa::getInitializer($loader));
     33            call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d::getInitializer($loader));
    3434        } else {
    3535            $classMap = require __DIR__ . '/autoload_classmap.php';
  • astrology/tags/1.0.6/src/vendor/composer/autoload_static.php

    r2612561 r2659372  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa
     7class ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d
    88{
    99    public static $classMap = array (
     
    4141    {
    4242        return \Closure::bind(function () use ($loader) {
    43             $loader->classMap = ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa::$classMap;
     43            $loader->classMap = ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d::$classMap;
    4444
    4545        }, null, ClassLoader::class);
  • astrology/trunk/astrology.php

    r2612561 r2659372  
    1212 * Plugin URI:  https://api.prokerala.com
    1313 * Description: Integrate astrology calculators powered by Prokerala's Astrology API
    14  * Version:     1.0.5
     14 * Version:     1.0.6
    1515 * Author:      Prokerala
    1616 * Author URI:  https://www.prokerala.com
  • astrology/trunk/dependencies/vendor/autoload.php

    r2612561 r2659372  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983::getLoader();
     7return ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::getLoader();
  • astrology/trunk/dependencies/vendor/composer/autoload_classmap.php

    r2612549 r2659372  
    4242    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php',
    4343    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\AdvancedMatch' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/AdvancedMatch.php',
    44     'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Match' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Match.php',
     44    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\BasicMatch' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/BasicMatch.php',
    4545    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Profile' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Profile.php',
    4646    'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\ProfileInfo' => $vendorDir . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ProfileInfo.php',
  • astrology/trunk/dependencies/vendor/composer/autoload_real.php

    r2612561 r2659372  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983
     5class ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit64b03242fe32186abafab7033e7ee983', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitd01d759ab9e60f8b7ca4bcb4fc4e62a3', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit64b03242fe32186abafab7033e7ee983::getInitializer($loader));
     33            call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::getInitializer($loader));
    3434        } else {
    3535            $classMap = require __DIR__ . '/autoload_classmap.php';
  • astrology/trunk/dependencies/vendor/composer/autoload_static.php

    r2612561 r2659372  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit64b03242fe32186abafab7033e7ee983
     7class ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3
    88{
    99    public static $classMap = array (
     
    4343        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php',
    4444        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\AdvancedMatch' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/AdvancedMatch.php',
    45         'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Match' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Match.php',
     45        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\BasicMatch' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/BasicMatch.php',
    4646        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\Porutham\\Profile' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham/Profile.php',
    4747        'Prokerala\\Api\\Astrology\\Result\\HoroscopeMatching\\ProfileInfo' => __DIR__ . '/..' . '/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ProfileInfo.php',
     
    345345    {
    346346        return \Closure::bind(function () use ($loader) {
    347             $loader->classMap = ComposerStaticInit64b03242fe32186abafab7033e7ee983::$classMap;
     347            $loader->classMap = ComposerStaticInitd01d759ab9e60f8b7ca4bcb4fc4e62a3::$classMap;
    348348
    349349        }, null, ClassLoader::class);
  • astrology/trunk/dependencies/vendor/kriswallsmith/buzz/lib/Client/AbstractClient.php

    r2513947 r2659372  
    1212{
    1313    /**
    14      * @var OptionsResolver
     14     * @var OptionsResolver|null
    1515     */
    1616    private $optionsResolver;
  • astrology/trunk/dependencies/vendor/kriswallsmith/buzz/lib/Client/MultiCurl.php

    r2513947 r2659372  
    4848    {
    4949        parent::__construct($responseFactory, $options);
    50         if (\PHP_VERSION_ID < 70215 || \PHP_VERSION_ID === 70300 || \PHP_VERSION_ID === 70301 || !(\CURL_VERSION_HTTP2 & \curl_version()['features'])) {
     50        if (\PHP_VERSION_ID < 70215 || \PHP_VERSION_ID === 70300 || \PHP_VERSION_ID === 70301 || \PHP_VERSION_ID >= 80000 || !(\CURL_VERSION_HTTP2 & \curl_version()['features'])) {
    5151            // Dont use HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/76675
    5252            $this->serverPushSupported = \false;
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/auspicious-period.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * AuspiciousPeriod.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/birth-details.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/chart.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * InauspiciousPeriod.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/choghadiya.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Choghadiya.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/inauspicious-period.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * InauspiciousPeriod.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/kaal-sarp-dosha.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/kundli-matching.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Nakshatra Porutham.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/kundli.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Kaal Sarp Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/mangal-dosha.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Mangal Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/nakshatra-porutham.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Nakshatra Porutham.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/panchang.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Panchang.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/papa-samyam-check.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Nakshatra Porutham.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/papasamyam.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/planet-position.php

    r2513947 r2659372  
    1515use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1616include 'prepend.inc.php';
     17/** @var \Prokerala\Common\Api\Client $client */
    1718/**
    1819 * Kaal Sarp Dosha.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/porutham.php

    r2513947 r2659372  
    1717use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1818include 'prepend.inc.php';
     19/** @var \Prokerala\Common\Api\Client $client */
    1920/**
    2021 * Porutham.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/sade-sati.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Sade Sati.
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/Horoscope/BirthDetails.php

    r2513947 r2659372  
    3737    private $zodiac;
    3838    /**
    39      * @var Nakshatra\NakshatraInfo
     39     * @var \Prokerala\Api\Astrology\Result\Horoscope\Nakshatra\NakshatraInfo
    4040     */
    4141    private $additionalInfo;
    42     /**
    43      * BirthDetails constructor.
    44      *
    45      * @param Nakshatra\NakshatraInfo $additionalInfo
    46      */
    4742    public function __construct(\Prokerala\Api\Astrology\Result\Element\Nakshatra $nakshatra, \Prokerala\Api\Astrology\Result\Element\Rasi $chandraRasi, \Prokerala\Api\Astrology\Result\Element\Rasi $sooryaRasi, \Prokerala\Api\Astrology\Result\Element\Zodiac $zodiac, \Prokerala\Api\Astrology\Result\Horoscope\Nakshatra\NakshatraInfo $additionalInfo)
    4843    {
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/NakshatraPorutham.php

    r2513947 r2659372  
    2929    private $message;
    3030    /**
    31      * @var Porutham\Match[]
     31     * @var Porutham\BasicMatch[]
    3232     */
    3333    private $matches;
     
    3535     * @param float            $maximumPoints
    3636     * @param float            $obtainedPoints
    37      * @param Porutham\Match[] $matches
     37     * @param Porutham\BasicMatch[] $matches
    3838     */
    3939    public function __construct($maximumPoints, $obtainedPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    6666    }
    6767    /**
    68      * @return Porutham\Match[]
     68     * @return Porutham\BasicMatch[]
    6969     */
    7070    public function getMatches()
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/Porutham.php

    r2513947 r2659372  
    3838    private $message;
    3939    /**
    40      * @var Porutham\Match[]
     40     * @var Porutham\BasicMatch[]
    4141     */
    4242    private $matches;
     
    4646     * @param float            $maximumPoints
    4747     * @param float            $totalPoints
    48      * @param Porutham\Match[] $matches
     48     * @param Porutham\BasicMatch[] $matches
    4949     */
    5050    public function __construct(\Prokerala\Api\Astrology\Result\HoroscopeMatching\Porutham\Profile $girlInfo, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Porutham\Profile $boyInfo, $maximumPoints, $totalPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    9393    }
    9494    /**
    95      * @return Porutham\Match[]
     95     * @return Porutham\BasicMatch[]
    9696     */
    9797    public function getMatches()
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/HoroscopeMatching/ThirumanaPorutham.php

    r2513947 r2659372  
    2525    private $obtainedPoints;
    2626    /**
    27      * @var Porutham\Match[]
     27     * @var Porutham\BasicMatch[]
    2828     */
    2929    private $matches;
     
    3737     * @param float            $maximumPoints
    3838     * @param float            $obtainedPoints
    39      * @param Porutham\Match[] $matches
     39     * @param Porutham\BasicMatch[] $matches
    4040     */
    4141    public function __construct($maximumPoints, $obtainedPoints, \Prokerala\Api\Astrology\Result\HoroscopeMatching\Message $message, array $matches)
     
    6868    }
    6969    /**
    70      * @return Porutham\Match[]
     70     * @return Porutham\BasicMatch[]
    7171     */
    7272    public function getMatches()
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/Panchang/Panchang.php

    r2513947 r2659372  
    7272    }
    7373    /**
    74      * @return mixed
     74     * @return string
    7575     */
    7676    public function getVaara()
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Traits/Service/TimeZoneAwareTrait.php

    r2513947 r2659372  
    4141    {
    4242        $transformer->setParamConverter('string', \DateTimeInterface::class, function ($data) {
    43             return new \DateTimeImmutable($data, $this->getTimeZone());
     43            return (new \DateTimeImmutable($data))->setTimezone($this->getTimeZone());
    4444        });
    4545    }
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Transformer.php

    r2612549 r2659372  
    6969    }
    7070    /**
    71      * @param string    $class
     71     * @param string    $className
    7272     * @param \stdClass $data
    7373     *
     
    127127    }
    128128    /**
    129      * @param ReflectionMethod $docComment
    130129     * @param string           $namespace
    131130     *
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/src/Common/Api/Client.php

    r2513947 r2659372  
    4444     * @param array  $input request parameters
    4545     *
    46      * @return array
     46     * @return \stdClass
    4747     */
    4848    public function process($path, $input)
  • astrology/trunk/dependencies/vendor/prokerala/astrology-sdk/thirumana-porutham.php

    r2513947 r2659372  
    1616use Prokerala\Common\Api\Exception\RateLimitExceededException;
    1717include 'prepend.inc.php';
     18/** @var \Prokerala\Common\Api\Client $client */
    1819/**
    1920 * Thirumana Porutham.
  • astrology/trunk/dependencies/vendor/symfony/cache-contracts/CacheTrait.php

    r2513947 r2659372  
    2525    /**
    2626     * {@inheritdoc}
     27     *
     28     * @return mixed
    2729     */
    2830    public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
  • astrology/trunk/dependencies/vendor/symfony/cache-contracts/ItemInterface.php

    r2513947 r2659372  
    2424     * References the Unix timestamp stating when the item will expire.
    2525     */
    26     const METADATA_EXPIRY = 'expiry';
     26    public const METADATA_EXPIRY = 'expiry';
    2727    /**
    2828     * References the time the item took to be created, in milliseconds.
    2929     */
    30     const METADATA_CTIME = 'ctime';
     30    public const METADATA_CTIME = 'ctime';
    3131    /**
    3232     * References the list of tags that were assigned to the item, as string[].
    3333     */
    34     const METADATA_TAGS = 'tags';
     34    public const METADATA_TAGS = 'tags';
    3535    /**
    3636     * Reserved characters that cannot be used in a key or tag.
    3737     */
    38     const RESERVED_CHARACTERS = '{}()/\\@:';
     38    public const RESERVED_CHARACTERS = '{}()/\\@:';
    3939    /**
    4040     * Adds a tag to a cache item.
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/AbstractAdapter.php

    r2612549 r2659372  
    6363                if (null === $item->expiry) {
    6464                    $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0;
    65                 } elseif (0 === $item->expiry) {
     65                } elseif (!$item->expiry) {
    6666                    $ttl = 0;
    6767                } elseif (0 >= ($ttl = (int) (0.1 + $item->expiry - $now))) {
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php

    r2612549 r2659372  
    7070                if (null === $item->expiry) {
    7171                    $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0;
    72                 } elseif (0 === $item->expiry) {
     72                } elseif (!$item->expiry) {
    7373                    $ttl = 0;
    7474                } elseif (0 >= ($ttl = (int) (0.1 + $item->expiry - $now))) {
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/ArrayAdapter.php

    r2612549 r2659372  
    105105        $value = $item["\x00*\x00value"];
    106106        $expiry = $item["\x00*\x00expiry"];
    107         if (0 === $expiry) {
    108             $expiry = \PHP_INT_MAX;
    109         }
    110         if (null !== $expiry && $expiry <= \microtime(\true)) {
    111             $this->deleteItem($key);
    112             return \true;
     107        if (null !== $expiry) {
     108            if (!$expiry) {
     109                $expiry = \PHP_INT_MAX;
     110            } elseif ($expiry <= \microtime(\true)) {
     111                $this->deleteItem($key);
     112                return \true;
     113            }
    113114        }
    114115        if ($this->storeSerialized && null === ($value = $this->freeze($value, $key))) {
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/ProxyAdapter.php

    r2612549 r2659372  
    7777                }
    7878                $innerItem->set($item["\x00*\x00value"]);
    79                 $innerItem->expiresAt(null !== $item["\x00*\x00expiry"] ? \DateTime::createFromFormat('U.u', \sprintf('%.6F', 0 === $item["\x00*\x00expiry"] ? \PHP_INT_MAX : $item["\x00*\x00expiry"])) : null);
     79                $innerItem->expiresAt(null !== $item["\x00*\x00expiry"] ? \DateTime::createFromFormat('U.u', \sprintf('%.6F', $item["\x00*\x00expiry"])) : null);
    8080            },
    8181            null,
  • astrology/trunk/dependencies/vendor/symfony/cache/Adapter/TagAwareAdapter.php

    r2612549 r2659372  
    126126    public function hasItem($key)
    127127    {
    128         if ($this->deferred) {
     128        if (\is_string($key) && isset($this->deferred[$key])) {
    129129            $this->commit();
    130130        }
     
    161161    public function getItems(array $keys = [])
    162162    {
    163         if ($this->deferred) {
    164             $this->commit();
    165         }
    166163        $tagKeys = [];
     164        $commit = \false;
    167165        foreach ($keys as $key) {
    168166            if ('' !== $key && \is_string($key)) {
     167                $commit = $commit || isset($this->deferred[$key]);
    169168                $key = static::TAGS_PREFIX . $key;
    170169                $tagKeys[$key] = $key;
    171170            }
     171        }
     172        if ($commit) {
     173            $this->commit();
    172174        }
    173175        try {
  • astrology/trunk/dependencies/vendor/symfony/cache/LockRegistry.php

    r2612549 r2659372  
    5656        }
    5757        $key = self::$files ? \abs(\crc32($item->getKey())) % \count(self::$files) : -1;
    58         if ($key < 0 || (self::$lockedFiles[$key] ?? \false) || !($lock = self::open($key))) {
     58        if ($key < 0 || self::$lockedFiles || !($lock = self::open($key))) {
    5959            return $callback($item, $save);
    6060        }
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/AbstractAdapterTrait.php

    r2612549 r2659372  
    3535    public function getItem($key)
    3636    {
    37         if ($this->deferred) {
     37        $id = $this->getId($key);
     38        if (isset($this->deferred[$key])) {
    3839            $this->commit();
    3940        }
    40         $id = $this->getId($key);
    4141        $f = $this->createCacheItem;
    4242        $isHit = \false;
     
    5757    public function getItems(array $keys = [])
    5858    {
    59         if ($this->deferred) {
    60             $this->commit();
    61         }
    6259        $ids = [];
     60        $commit = \false;
    6361        foreach ($keys as $key) {
    6462            $ids[] = $this->getId($key);
     63            $commit = $commit || isset($this->deferred[$key]);
     64        }
     65        if ($commit) {
     66            $this->commit();
    6567        }
    6668        try {
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/AbstractTrait.php

    r2513947 r2659372  
    251251        \Prokerala\Astrology\Vendor\Symfony\Component\Cache\CacheItem::validateKey($key);
    252252        $this->ids[$key] = $key;
     253        if (\count($this->ids) > 1000) {
     254            \array_splice($this->ids, 0, 500);
     255            // stop memory leak if there are many keys
     256        }
    253257        if (null === $this->maxIdLength) {
    254258            return $this->namespace . $this->namespaceVersion . $key;
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/ApcuTrait.php

    r2612549 r2659372  
    4949        try {
    5050            $values = [];
    51             foreach (\apcu_fetch($ids, $ok) ?: [] as $k => $v) {
     51            $ids = \array_flip($ids);
     52            foreach (\apcu_fetch(\array_keys($ids), $ok) ?: [] as $k => $v) {
     53                if (!isset($ids[$k])) {
     54                    // work around https://github.com/krakjoe/apcu/issues/247
     55                    $k = \key($ids);
     56                }
     57                unset($ids[$k]);
    5258                if (null !== $v || $ok) {
    5359                    $values[$k] = $v;
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/ContractsTrait.php

    r2513947 r2659372  
    2929        doGet as private contractsGet;
    3030    }
    31     private $callbackWrapper = [\Prokerala\Astrology\Vendor\Symfony\Component\Cache\LockRegistry::class, 'compute'];
     31    private $callbackWrapper;
    3232    private $computing = [];
    3333    /**
     
    3838    public function setCallbackWrapper(?callable $callbackWrapper) : callable
    3939    {
     40        if (!isset($this->callbackWrapper)) {
     41            $this->callbackWrapper = \Closure::fromCallable([\Prokerala\Astrology\Vendor\Symfony\Component\Cache\LockRegistry::class, 'compute']);
     42            if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], \true)) {
     43                $this->setCallbackWrapper(null);
     44            }
     45        }
    4046        $previousWrapper = $this->callbackWrapper;
    41         $this->callbackWrapper = $callbackWrapper ?? function (callable $callback, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\ItemInterface $item, bool &$save, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\CacheInterface $pool, \Closure $setMetadata, ?\Psr\Log\LoggerInterface $logger) {
     47        $this->callbackWrapper = $callbackWrapper ?? static function (callable $callback, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\ItemInterface $item, bool &$save, \Prokerala\Astrology\Vendor\Symfony\Contracts\Cache\CacheInterface $pool, \Closure $setMetadata, ?\Psr\Log\LoggerInterface $logger) {
    4248            return $callback($item, $save);
    4349        };
     
    6773            $this->computing[$key] = $key;
    6874            $startTime = \microtime(\true);
     75            if (!isset($this->callbackWrapper)) {
     76                $this->setCallbackWrapper($this->setCallbackWrapper(null));
     77            }
    6978            try {
    7079                $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (\Prokerala\Astrology\Vendor\Symfony\Component\Cache\CacheItem $item) use($setMetadata, $startTime, &$metadata) {
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/MemcachedTrait.php

    r2612549 r2659372  
    224224    {
    225225        try {
    226             $encodedIds = \array_map('self::encodeKey', $ids);
     226            $encodedIds = \array_map([__CLASS__, 'encodeKey'], $ids);
    227227            $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds));
    228228            $result = [];
     
    248248    {
    249249        $ok = \true;
    250         $encodedIds = \array_map('self::encodeKey', $ids);
     250        $encodedIds = \array_map([__CLASS__, 'encodeKey'], $ids);
    251251        foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) {
    252252            if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) {
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/PdoTrait.php

    r2612549 r2659372  
    131131                throw new \DomainException(\sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
    132132        }
    133         if (\method_exists($conn, 'executeStatement')) {
     133        if ($conn instanceof \Prokerala\Astrology\Vendor\Doctrine\DBAL\Connection && \method_exists($conn, 'executeStatement')) {
    134134            $conn->executeStatement($sql);
    135135        } else {
     
    243243        }
    244244        try {
    245             if (\method_exists($conn, 'executeStatement')) {
     245            if ($conn instanceof \Prokerala\Astrology\Vendor\Doctrine\DBAL\Connection && \method_exists($conn, 'executeStatement')) {
    246246                $conn->executeStatement($sql);
    247247            } else {
  • astrology/trunk/dependencies/vendor/symfony/cache/Traits/RedisTrait.php

    r2612549 r2659372  
    118118        }
    119119        if (isset($params['host']) || isset($params['path'])) {
    120             if (!isset($params['dbindex']) && isset($params['path']) && \preg_match('#/(\\d+)$#', $params['path'], $m)) {
    121                 $params['dbindex'] = $m[1];
    122                 $params['path'] = \substr($params['path'], 0, -\strlen($m[0]));
     120            if (!isset($params['dbindex']) && isset($params['path'])) {
     121                if (\preg_match('#/(\\d+)$#', $params['path'], $m)) {
     122                    $params['dbindex'] = $m[1];
     123                    $params['path'] = \substr($params['path'], 0, -\strlen($m[0]));
     124                } elseif (isset($params['host'])) {
     125                    throw new \Prokerala\Astrology\Vendor\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Invalid Redis DSN: "%s", the "dbindex" parameter must be a number.', $dsn));
     126                }
    123127            }
    124128            if (isset($params['host'])) {
  • astrology/trunk/dependencies/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php

    r2612549 r2659372  
    1111 * file that was distributed with this source code.
    1212 */
    13 class JsonException extends \Exception
    14 {
     13if (\PHP_VERSION_ID < 70300) {
     14    class JsonException extends \Exception
     15    {
     16    }
    1517}
  • astrology/trunk/dependencies/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php

    r2513947 r2659372  
    33namespace Prokerala\Astrology\Vendor;
    44
    5 class UnhandledMatchError extends \Error
    6 {
     5if (\PHP_VERSION_ID < 80000) {
     6    class UnhandledMatchError extends \Error
     7    {
     8    }
    79}
  • astrology/trunk/dependencies/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php

    r2513947 r2659372  
    33namespace Prokerala\Astrology\Vendor;
    44
    5 class ValueError extends \Error
    6 {
     5if (\PHP_VERSION_ID < 80000) {
     6    class ValueError extends \Error
     7    {
     8    }
    79}
  • astrology/trunk/dependencies/vendor/symfony/service-contracts/ServiceLocatorTrait.php

    r2513947 r2659372  
    4545    /**
    4646     * {@inheritdoc}
     47     *
     48     * @return mixed
    4749     */
    4850    public function get($id)
  • astrology/trunk/dependencies/vendor/symfony/service-contracts/ServiceSubscriberInterface.php

    r2513947 r2659372  
    4747     *  * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
    4848     *
    49      * @return array The required service types, optionally keyed by service names
     49     * @return string[] The required service types, optionally keyed by service names
    5050     */
    5151    public static function getSubscribedServices();
  • astrology/trunk/dependencies/vendor/symfony/service-contracts/ServiceSubscriberTrait.php

    r2513947 r2659372  
    2222    /** @var ContainerInterface */
    2323    protected $container;
     24    /**
     25     * {@inheritdoc}
     26     */
    2427    public static function getSubscribedServices() : array
    2528    {
     
    3336                continue;
    3437            }
    35             if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
    36                 $services[self::class . '::' . $method->name] = '?' . ($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type);
     38            if (self::class !== $method->getDeclaringClass()->name) {
     39                continue;
    3740            }
     41            if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) {
     42                continue;
     43            }
     44            if ($returnType->isBuiltin()) {
     45                continue;
     46            }
     47            $services[self::class . '::' . $method->name] = '?' . $returnType->getName();
    3848        }
    3949        return $services;
     
    4151    /**
    4252     * @required
     53     *
     54     * @return ContainerInterface|null
    4355     */
    4456    public function setContainer(\Psr\Container\ContainerInterface $container)
  • astrology/trunk/dependencies/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php

    r2513947 r2659372  
    1616abstract class ServiceLocatorTest extends \Prokerala\Astrology\Vendor\PHPUnit\Framework\TestCase
    1717{
     18    /**
     19     * @return ContainerInterface
     20     */
    1821    protected function getServiceLocator(array $factories)
    1922    {
     
    6063    {
    6164        if (!$this->getExpectedException()) {
    62             $this->expectException('Psr\\Container\\NotFoundExceptionInterface');
     65            $this->expectException(\Psr\Container\NotFoundExceptionInterface::class);
    6366            $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
    6467        }
     
    7073    public function testThrowsOnCircularReference()
    7174    {
    72         $this->expectException('Psr\\Container\\ContainerExceptionInterface');
     75        $this->expectException(\Psr\Container\ContainerExceptionInterface::class);
    7376        $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
    7477        $locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
  • astrology/trunk/dependencies/vendor/symfony/var-exporter/Internal/Exporter.php

    r2612549 r2659372  
    8383            $properties = [];
    8484            $sleep = null;
    85             $arrayValue = (array) $value;
    8685            $proto = \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$prototypes[$class];
    8786            if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) {
    8887                // ArrayIterator and ArrayObject need special care because their "flags"
    8988                // option changes the behavior of the (array) casting operator.
    90                 $properties = self::getArrayObjectProperties($value, $arrayValue, $proto);
     89                [$arrayValue, $properties] = self::getArrayObjectProperties($value, $proto);
    9190                // populates Registry::$prototypes[$class] with a new instance
    9291                \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::getClassReflector($class, \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$instantiableWithoutConstructor[$class], \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$cloneable[$class]);
     
    9998                }
    10099                $properties = ['SplObjectStorage' => ["\x00" => $properties]];
     100                $arrayValue = (array) $value;
    101101            } elseif ($value instanceof \Serializable || $value instanceof \__PHP_Incomplete_Class) {
    102102                ++$objectsCount;
     
    104104                $value = new \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Reference($id);
    105105                goto handle_value;
    106             }
    107             if (\method_exists($class, '__sleep')) {
    108                 if (!\is_array($sleep = $value->__sleep())) {
    109                     \trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE);
    110                     $value = null;
    111                     goto handle_value;
    112                 }
    113                 foreach ($sleep as $name) {
    114                     if (\property_exists($value, $name) && !$reflector->hasProperty($name)) {
    115                         $arrayValue[$name] = $value->{$name};
     106            } else {
     107                if (\method_exists($class, '__sleep')) {
     108                    if (!\is_array($sleep = $value->__sleep())) {
     109                        \trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE);
     110                        $value = null;
     111                        goto handle_value;
    116112                    }
    117                 }
    118                 $sleep = \array_flip($sleep);
     113                    $sleep = \array_flip($sleep);
     114                }
     115                $arrayValue = (array) $value;
    119116            }
    120117            $proto = (array) $proto;
     
    200197        if (\is_string($value)) {
    201198            $code = \sprintf("'%s'", \addcslashes($value, "'\\"));
    202             $code = \preg_replace_callback('/([\\0\\r\\n]++)(.)/', function ($m) use($subIndent) {
    203                 $m[1] = \sprintf('\'."%s".\'', \str_replace(["\x00", "\r", "\n", '\\n\\'], ['\\0', '\\r', '\\n', '\\n"' . "\n" . $subIndent . '."\\'], $m[1]));
     199            $code = \preg_replace_callback("/((?:[\\0\\r\\n]|‪|‫|‭|‮|⁦|⁧|⁨|‬|⁩)++)(.)/", function ($m) use($subIndent) {
     200                $m[1] = \sprintf('\'."%s".\'', \str_replace(["\x00", "\r", "\n", "‪", "‫", "‭", "‮", "⁦", "⁧", "⁨", "‬", "⁩", '\\n\\'], ['\\0', '\\r', '\\n', '\\u{202A}', '\\u{202B}', '\\u{202D}', '\\u{202E}', '\\u{2066}', '\\u{2067}', '\\u{2068}', '\\u{202C}', '\\u{2069}', '\\n"' . "\n" . $subIndent . '."\\'], $m[1]));
    204201                if ("'" === $m[2]) {
    205202                    return \substr($m[1], 0, -2);
     
    254251        $r = '\\' . \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::class;
    255252        $j = -1;
    256         foreach ($value as $k => $class) {
     253        foreach ($value->classes as $k => $class) {
    257254            if (':' === ($class[1] ?? null)) {
    258255                $serializables[$k] = $class;
     
    324321     * @param \ArrayIterator|\ArrayObject $proto
    325322     */
    326     private static function getArrayObjectProperties($value, array &$arrayValue, $proto) : array
     323    private static function getArrayObjectProperties($value, $proto) : array
    327324    {
    328325        $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject';
    329326        $reflector = \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::$reflectors[$reflector] ?? \Prokerala\Astrology\Vendor\Symfony\Component\VarExporter\Internal\Registry::getClassReflector($reflector);
    330         $properties = [$arrayValue, $reflector->getMethod('getFlags')->invoke($value), $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator'];
     327        $properties = [$arrayValue = (array) $value, $reflector->getMethod('getFlags')->invoke($value), $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator'];
    331328        $reflector = $reflector->getMethod('setFlags');
    332329        $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST);
     
    347344            $properties = [$reflector->class => ["\x00" => $properties]];
    348345        }
    349         return $properties;
     346        return [$arrayValue, $properties];
    350347    }
    351348}
  • astrology/trunk/dependencies/vendor/symfony/var-exporter/Internal/Registry.php

    r2513947 r2659372  
    2525    public static $cloneable = [];
    2626    public static $instantiableWithoutConstructor = [];
     27    public $classes = [];
    2728    public function __construct(array $classes)
    2829    {
    29         foreach ($classes as $i => $class) {
    30             $this->{$i} = $class;
    31         }
     30        $this->classes = $classes;
    3231    }
    3332    public static function unserialize($objects, $serializables)
  • astrology/trunk/readme.txt

    r2612549 r2659372  
    33Tags: astrology, prokerala
    44Requires at least: 5.5
    5 Tested up to: 5.8.1
    6 Stable tag: 1.0.5
     5Tested up to: 5.8.3
     6Stable tag: 1.0.6
    77Requires PHP: 7.2.0
    88License: GPLV2+
     
    117117== Changelog ==
    118118
     119= 1.0.6 =
     120* Fix datetimes reverting to UTC
     121
    119122= 1.0.5 =
    120123* Location parameters where not being passed correctly
  • astrology/trunk/src/Admin/SettingsPage.php

    r2612549 r2659372  
    236236     */
    237237    public function render_timezone() { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
     238
     239        $regions = $this->get_timezone_list();
     240        $current = $this->config->get_option( 'timezone' );
     241
     242        echo '<select id="astrology_plugin_setting_timezone" name="astrology_plugin_options[timezone]">';
     243        foreach ( $regions as $region => $zones ) {
     244            echo "<optgroup label='{$region}'>";
     245            foreach ( $zones as $zone => $label ) {
     246                echo "<option value='{$zone}'" . ( $current === $zone ? ' selected' : '' ) . ">{$label}</option>";
     247            }
     248            echo '</optgroup>';
     249        }
     250        echo '</select>';
     251    }
     252
     253    /**
     254     * Generate list of timezones
     255     *
     256     * @since 1.0.6
     257     *
     258     * @return array
     259     */
     260    private function get_timezone_list() {
     261
    238262        $tz_list = \DateTimeZone::listIdentifiers( \DateTimeZone::ALL );
    239263        $now     = new \DateTimeImmutable();
     
    256280        );
    257281
    258         $current = $this->config->get_option( 'timezone' );
    259 
    260         echo '<select id="astrology_plugin_setting_timezone" name="astrology_plugin_options[timezone]">';
    261         foreach ( $regions as $region => $zones ) {
    262             echo "<optgroup label='{$region}'>";
    263             foreach ( $zones as $zone => $label ) {
    264                 echo "<option value='{$zone}'" . ( $current === $zone ? ' selected' : '' ) . ">{$label}</option>";
    265             }
    266             echo '</optgroup>';
    267         }
    268         echo '</select>';
     282        return $regions;
    269283    }
    270284
  • astrology/trunk/src/Front/Report/AuspiciousPeriodController.php

    r2513947 r2659372  
    8989        $method   = new AuspiciousPeriod( $client );
    9090        $method->setAyanamsa( $this->get_input_ayanamsa() );
     91        $method->setTimeZone( $tz );
    9192        $result = $method->process( $location, $datetime );
    9293
  • astrology/trunk/src/Front/Report/ChoghadiyaController.php

    r2513947 r2659372  
    8989        $method   = new Choghadiya( $client );
    9090        $method->setAyanamsa( $this->get_input_ayanamsa() );
     91        $method->setTimeZone( $tz );
    9192        $result = $method->process( $location, $datetime );
    9293
  • astrology/trunk/src/Front/Report/InauspiciousPeriodController.php

    r2513947 r2659372  
    9090        $method   = new InauspiciousPeriod( $client );
    9191        $method->setAyanamsa( $this->get_input_ayanamsa() );
     92        $method->setTimeZone( $tz );
    9293        $result = $method->process( $location, $datetime );
    9394
  • astrology/trunk/src/Front/Report/KundliMatchingController.php

    r2513947 r2659372  
    105105        $result = $method->process( $girl_profile, $boy_profile, $advanced );
    106106
    107         $girl_info = $result->getGirlInfo();
    108         $boy_info  = $result->getBoyInfo();
    109         $boy_koot  = $boy_info->getKoot();
    110         $girl_koot = $girl_info->getKoot();
    111 
    112         $girl_nakshatra      = $girl_info->getNakshatra();
    113         $boy_nakshatra       = $boy_info->getNakshatra();
    114         $girl_nakshatra_lord = $girl_nakshatra->getLord();
    115         $boy_nakshatra_lord  = $boy_nakshatra->getLord();
    116 
    117         $girl_rasi      = $girl_info->getRasi();
    118         $boy_rasi       = $boy_info->getRasi();
    119         $girl_rasi_lord = $girl_rasi->getLord();
    120         $boy_rasi_lord  = $boy_rasi->getLord();
    121 
    122         $compatibility_result['boyInfo']['koot']  = $boy_koot->getKoot();
    123         $compatibility_result['girlInfo']['koot'] = $girl_koot->getKoot();
    124 
    125         $compatibility_result['girlInfo']['nakshatra'] = [
    126             'id'   => $girl_nakshatra->getId(),
    127             'name' => $girl_nakshatra->getName(),
    128             'pada' => $girl_nakshatra->getPada(),
    129             'lord' => [
    130                 'id'        => $girl_nakshatra_lord->getId(),
    131                 'name'      => $girl_nakshatra_lord->getName(),
    132                 'vedicName' => $girl_nakshatra_lord->getVedicName(),
    133             ],
    134         ];
    135 
    136         $compatibility_result['boyInfo']['nakshatra'] = [
    137             'id'   => $boy_nakshatra->getId(),
    138             'name' => $boy_nakshatra->getName(),
    139             'pada' => $boy_nakshatra->getPada(),
    140             'lord' => [
    141                 'id'        => $boy_nakshatra_lord->getId(),
    142                 'name'      => $boy_nakshatra_lord->getName(),
    143                 'vedicName' => $boy_nakshatra_lord->getVedicName(),
    144             ],
    145         ];
    146 
    147         $compatibility_result['girlInfo']['rasi'] = [
    148             'id'   => $girl_rasi->getId(),
    149             'name' => $girl_rasi->getName(),
    150             'lord' => [
    151                 'id'        => $girl_rasi_lord->getId(),
    152                 'name'      => $girl_rasi_lord->getName(),
    153                 'vedicName' => $girl_rasi_lord->getVedicName(),
    154             ],
    155         ];
    156 
    157         $compatibility_result['boyInfo']['rasi'] = [
    158             'id'   => $boy_rasi->getId(),
    159             'name' => $boy_rasi->getName(),
    160             'lord' => [
    161                 'id'        => $boy_rasi_lord->getId(),
    162                 'name'      => $boy_rasi_lord->getName(),
    163                 'vedicName' => $boy_rasi_lord->getVedicName(),
    164             ],
    165         ];
    166 
    167         $message                         = $result->getMessage();
    168         $compatibility_result['message'] = [
    169             'type'        => $message->getType(),
    170             'description' => $message->getDescription(),
    171         ];
    172 
    173         $guna_milan                        = $result->getGunaMilan();
    174         $compatibility_result['gunaMilan'] = [
    175             'totalPoints'   => $guna_milan->getTotalPoints(),
    176             'maximumPoints' => $guna_milan->getMaximumPoints(),
    177         ];
    178 
    179         if ( $advanced ) {
    180             $ar_guna = $guna_milan->getGuna();
    181 
    182             foreach ( $ar_guna as $guna ) {
    183                 $compatibility_result['gunaMilan']['guna'][] = [
    184                     'id'             => $guna->getId(),
    185                     'name'           => $guna->getName(),
    186                     'girlKoot'       => $guna->getGirlKoot(),
    187                     'boyKoot'        => $guna->getBoyKoot(),
    188                     'maximumPoints'  => $guna->getMaximumPoints(),
    189                     'obtainedPoints' => $guna->getObtainedPoints(),
    190                     'description'    => $guna->getDescription(),
    191                 ];
    192             }
    193             $compatibility_result['exceptions'] = $result->getExceptions();
    194 
    195             $girl_mangal_dosha_details = $result->getGirlMangalDoshaDetails();
    196             $boy_mangal_dosha_details  = $result->getBoyMangalDoshaDetails();
    197 
    198             $compatibility_result['girlMangalDoshaDetails'] = [
    199                 'hasMangalDosha'  => $girl_mangal_dosha_details->hasDosha(),
    200                 'hasException'    => $girl_mangal_dosha_details->hasException(),
    201                 'mangalDoshaType' => $girl_mangal_dosha_details->getDoshaType(),
    202                 'description'     => $girl_mangal_dosha_details->getDescription(),
    203             ];
    204 
    205             $compatibility_result['boyMangalDoshaDetails'] = [
    206                 'hasMangalDosha'  => $boy_mangal_dosha_details->hasDosha(),
    207                 'hasException'    => $boy_mangal_dosha_details->hasException(),
    208                 'mangalDoshaType' => $boy_mangal_dosha_details->getDoshaType(),
    209                 'description'     => $boy_mangal_dosha_details->getDescription(),
    210             ];
    211         }
     107        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
    212108
    213109        return $this->render(
     
    222118        );
    223119    }
     120
     121    /**
     122     * Get compatability result
     123     *
     124     * @param object $result API Result.
     125     * @param int    $advanced Advanced Result.
     126     * @return array
     127     */
     128    private function get_compatibility_result( $result, $advanced ) {
     129        $compatibility_result = [];
     130        $girl_info            = $result->getGirlInfo();
     131        $girl_nakshatra       = $girl_info->getNakshatra();
     132        $girl_nakshatra_lord  = $girl_nakshatra->getLord();
     133        $girl_rasi            = $girl_info->getRasi();
     134        $girl_rasi_lord       = $girl_rasi->getLord();
     135        $girl_koot            = $girl_info->getKoot();
     136
     137        $compatibility_result['girlInfo']['koot']      = $girl_koot->getKoot();
     138        $compatibility_result['girlInfo']['nakshatra'] = [
     139            'id'   => $girl_nakshatra->getId(),
     140            'name' => $girl_nakshatra->getName(),
     141            'pada' => $girl_nakshatra->getPada(),
     142            'lord' => [
     143                'id'        => $girl_nakshatra_lord->getId(),
     144                'name'      => $girl_nakshatra_lord->getName(),
     145                'vedicName' => $girl_nakshatra_lord->getVedicName(),
     146            ],
     147        ];
     148
     149        $compatibility_result['girlInfo']['rasi'] = [
     150            'id'   => $girl_rasi->getId(),
     151            'name' => $girl_rasi->getName(),
     152            'lord' => [
     153                'id'        => $girl_rasi_lord->getId(),
     154                'name'      => $girl_rasi_lord->getName(),
     155                'vedicName' => $girl_rasi_lord->getVedicName(),
     156            ],
     157        ];
     158
     159        $boy_info           = $result->getBoyInfo();
     160        $boy_nakshatra      = $boy_info->getNakshatra();
     161        $boy_nakshatra_lord = $boy_nakshatra->getLord();
     162        $boy_rasi           = $boy_info->getRasi();
     163        $boy_rasi_lord      = $boy_rasi->getLord();
     164
     165        $boy_koot                                     = $boy_info->getKoot();
     166        $compatibility_result['boyInfo']['koot']      = $boy_koot->getKoot();
     167        $compatibility_result['boyInfo']['nakshatra'] = [
     168            'id'   => $boy_nakshatra->getId(),
     169            'name' => $boy_nakshatra->getName(),
     170            'pada' => $boy_nakshatra->getPada(),
     171            'lord' => [
     172                'id'        => $boy_nakshatra_lord->getId(),
     173                'name'      => $boy_nakshatra_lord->getName(),
     174                'vedicName' => $boy_nakshatra_lord->getVedicName(),
     175            ],
     176        ];
     177        $compatibility_result['boyInfo']['rasi']      = [
     178            'id'   => $boy_rasi->getId(),
     179            'name' => $boy_rasi->getName(),
     180            'lord' => [
     181                'id'        => $boy_rasi_lord->getId(),
     182                'name'      => $boy_rasi_lord->getName(),
     183                'vedicName' => $boy_rasi_lord->getVedicName(),
     184            ],
     185        ];
     186
     187        $message                         = $result->getMessage();
     188        $compatibility_result['message'] = [
     189            'type'        => $message->getType(),
     190            'description' => $message->getDescription(),
     191        ];
     192
     193        $guna_milan                        = $result->getGunaMilan();
     194        $compatibility_result['gunaMilan'] = [
     195            'totalPoints'   => $guna_milan->getTotalPoints(),
     196            'maximumPoints' => $guna_milan->getMaximumPoints(),
     197        ];
     198
     199        if ( ! $advanced ) {
     200            return $compatibility_result;
     201        }
     202
     203        $ar_guna = $guna_milan->getGuna();
     204
     205        foreach ( $ar_guna as $guna ) {
     206             $compatibility_result['gunaMilan']['guna'][] = [
     207                 'id'             => $guna->getId(),
     208                 'name'           => $guna->getName(),
     209                 'girlKoot'       => $guna->getGirlKoot(),
     210                 'boyKoot'        => $guna->getBoyKoot(),
     211                 'maximumPoints'  => $guna->getMaximumPoints(),
     212                 'obtainedPoints' => $guna->getObtainedPoints(),
     213                 'description'    => $guna->getDescription(),
     214             ];
     215        }
     216        $compatibility_result['exceptions'] = $result->getExceptions();
     217
     218        $girl_mangal_dosha_details = $result->getGirlMangalDoshaDetails();
     219        $boy_mangal_dosha_details  = $result->getBoyMangalDoshaDetails();
     220
     221        $compatibility_result['girlMangalDoshaDetails'] = [
     222            'hasMangalDosha'  => $girl_mangal_dosha_details->hasDosha(),
     223            'hasException'    => $girl_mangal_dosha_details->hasException(),
     224            'mangalDoshaType' => $girl_mangal_dosha_details->getDoshaType(),
     225            'description'     => $girl_mangal_dosha_details->getDescription(),
     226        ];
     227
     228        $compatibility_result['boyMangalDoshaDetails'] = [
     229            'hasMangalDosha'  => $boy_mangal_dosha_details->hasDosha(),
     230            'hasException'    => $boy_mangal_dosha_details->hasException(),
     231            'mangalDoshaType' => $boy_mangal_dosha_details->getDoshaType(),
     232            'description'     => $boy_mangal_dosha_details->getDescription(),
     233        ];
     234
     235         return $compatibility_result;
     236    }
    224237}
  • astrology/trunk/src/Front/Report/NakshatraPoruthamController.php

    r2513947 r2659372  
    114114     * @return string
    115115     */
    116     public function process( $options = [] ) {
     116    public function process( $options = [] ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
    117117        $client = $this->get_api_client();
    118118
     
    131131        $method = new NakshatraPorutham( $client );
    132132        $result = $method->process( $girl_profile, $boy_profile, $advanced );
     133
     134        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     135
     136        return $this->render(
     137            'result/nakshatra-porutham',
     138            [
     139                'result'      => $compatibility_result,
     140                'result_type' => $result_type,
     141                'options'     => $this->get_options(),
     142            ]
     143        );
     144    }
     145
     146    /**
     147     * Get compatability result
     148     *
     149     * @param object $result API Result.
     150     * @param int    $advanced Advanced Result.
     151     * @return array
     152     */
     153    private function get_compatibility_result( $result, $advanced ) {
    133154
    134155        $compatibility_result = [];
     
    156177        }
    157178
    158         return $this->render(
    159             'result/nakshatra-porutham',
    160             [
    161                 'result'      => $compatibility_result,
    162                 'result_type' => $result_type,
    163                 'options'     => $this->get_options(),
    164             ]
    165         );
     179        return $compatibility_result;
    166180    }
    167181}
  • astrology/trunk/src/Front/Report/PanchangController.php

    r2513947 r2659372  
    9393        $method   = new Panchang( $client );
    9494        $method->setAyanamsa( $this->get_input_ayanamsa() );
     95        $method->setTimeZone( $tz );
    9596        $result = $method->process( $location, $datetime, $advanced );
    9697
  • astrology/trunk/src/Front/Report/PoruthamController.php

    r2513947 r2659372  
    105105        $result = $method->process( $girl_profile, $boy_profile, $system, $advanced );
    106106
     107        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     108
     109        return $this->render(
     110            'result/porutham',
     111            [
     112                'result'      => $compatibility_result,
     113                'result_type' => $result_type,
     114                'girl_dob'    => $girl_dob,
     115                'boy_dob'     => $boy_dob,
     116                'options'     => $this->get_options(),
     117            ]
     118        );
     119    }
     120
     121    /**
     122     * Get compatability result
     123     *
     124     * @param object $result API Result.
     125     * @param int    $advanced Advanced Result.
     126     * @return array
     127     */
     128    private function get_compatibility_result( $result, $advanced ) {
    107129        $compatibility_result = [];
    108         $girl_info            = $result->getGirlInfo();
    109         $girl_nakshatra       = $girl_info->getNakshatra();
    110         $girl_rasi            = $girl_info->getRasi();
    111 
    112         $boy_info      = $result->getBoyInfo();
    113         $boy_nakshatra = $boy_info->getNakshatra();
    114         $boy_rasi      = $boy_info->getRasi();
    115 
     130
     131        $girl_info           = $result->getGirlInfo();
     132        $girl_nakshatra      = $girl_info->getNakshatra();
     133        $girl_rasi           = $girl_info->getRasi();
    116134        $girl_nakshatra_lord = $girl_nakshatra->getLord();
    117         $boy_nakshatra_lord  = $boy_nakshatra->getLord();
    118 
    119         $girl_rasi_lord = $girl_rasi->getLord();
    120         $boy_rasi_lord  = $boy_rasi->getLord();
     135        $girl_rasi_lord      = $girl_rasi->getLord();
    121136
    122137        $compatibility_result['girlInfo'] = [
     
    142157        ];
    143158
    144         $compatibility_result['boyInfo']       = [
     159        $boy_info           = $result->getBoyInfo();
     160        $boy_nakshatra      = $boy_info->getNakshatra();
     161        $boy_rasi           = $boy_info->getRasi();
     162        $boy_nakshatra_lord = $boy_nakshatra->getLord();
     163        $boy_rasi_lord      = $boy_rasi->getLord();
     164
     165        $compatibility_result['boyInfo'] = [
    145166            'nakshatra' => [
    146167                'id'   => $boy_nakshatra->getId(),
     
    163184            ],
    164185        ];
     186
    165187        $compatibility_result['maximumPoints'] = $result->getMaximumPoints();
    166188        $compatibility_result['totalPoints']   = $result->getTotalPoints();
     
    187209        }
    188210
    189         return $this->render(
    190             'result/porutham',
    191             [
    192                 'result'      => $compatibility_result,
    193                 'result_type' => $result_type,
    194                 'girl_dob'    => $girl_dob,
    195                 'boy_dob'     => $boy_dob,
    196                 'options'     => $this->get_options(),
    197             ]
    198         );
     211        return $compatibility_result;
    199212    }
    200213}
  • astrology/trunk/src/Front/Report/SadeSatiController.php

    r2513947 r2659372  
    9393        $method   = new SadeSati( $client );
    9494        $method->setAyanamsa( $this->get_input_ayanamsa() );
     95        $method->setTimeZone( $tz );
    9596        $result = $method->process( $location, $datetime, $advanced );
    9697
  • astrology/trunk/src/Front/Report/ThirumanaPoruthamController.php

    r2513947 r2659372  
    115115     * @return string
    116116     */
    117     public function process( $options = [] ) {
     117    public function process( $options = [] ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
    118118        $client = $this->get_api_client();
    119119
     
    132132        $method = new ThirumanaPorutham( $client );
    133133        $result = $method->process( $girl_profile, $boy_profile, $advanced );
     134
     135        $compatibility_result = $this->get_compatibility_result( $result, $advanced );
     136
     137        return $this->render(
     138            'result/thirumana-porutham',
     139            [
     140                'result'      => $compatibility_result,
     141                'result_type' => $result_type,
     142                'options'     => $this->get_options(),
     143            ]
     144        );
     145    }
     146
     147
     148    /**
     149     * Get compatability result
     150     *
     151     * @param object $result API Result.
     152     * @param int    $advanced Advanced Result.
     153     * @return array
     154     */
     155    private function get_compatibility_result( $result, $advanced ) {
    134156
    135157        $compatibility_result                  = [];
     
    155177        }
    156178
    157         return $this->render(
    158             'result/thirumana-porutham',
    159             [
    160                 'result'      => $compatibility_result,
    161                 'result_type' => $result_type,
    162                 'options'     => $this->get_options(),
    163             ]
    164         );
     179        return $compatibility_result;
    165180    }
    166181}
  • astrology/trunk/src/vendor/autoload.php

    r2612561 r2659372  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa::getLoader();
     7return ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d::getLoader();
  • astrology/trunk/src/vendor/composer/autoload_real.php

    r2612561 r2659372  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa
     5class ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Prokerala_WP_Astrology_Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit6a88b6845a58df8520cf6b713d0a8bfa', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitb0ae5ced78786f966cfb7da5a0828a2d', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa::getInitializer($loader));
     33            call_user_func(\Prokerala_WP_Astrology_Composer\Autoload\ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d::getInitializer($loader));
    3434        } else {
    3535            $classMap = require __DIR__ . '/autoload_classmap.php';
  • astrology/trunk/src/vendor/composer/autoload_static.php

    r2612561 r2659372  
    55namespace Prokerala_WP_Astrology_Composer\Autoload;
    66
    7 class ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa
     7class ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d
    88{
    99    public static $classMap = array (
     
    4141    {
    4242        return \Closure::bind(function () use ($loader) {
    43             $loader->classMap = ComposerStaticInit6a88b6845a58df8520cf6b713d0a8bfa::$classMap;
     43            $loader->classMap = ComposerStaticInitb0ae5ced78786f966cfb7da5a0828a2d::$classMap;
    4444
    4545        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.