Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/cartforge.co/vendor/phpmd/phpmd/src/main/php/PHPMD/Baseline/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/vendor/phpmd/phpmd/src/main/php/PHPMD/Baseline/ViolationBaseline.php
<?php

namespace PHPMD\Baseline;

class ViolationBaseline
{
    /** @var string */
    private $ruleName;

    /** @var string */
    private $fileName;

    /** @var int */
    private $fileNameLength;

    /** @var string|null */
    private $methodName;

    /**
     * @param string      $ruleName
     * @param string      $fileName
     * @param string|null $methodName
     */
    public function __construct($ruleName, $fileName, $methodName)
    {
        $this->ruleName       = $ruleName;
        $this->fileName       = $fileName;
        $this->methodName     = $methodName;
        $this->fileNameLength = strlen($fileName);
    }

    /**
     * @return string
     */
    public function getRuleName()
    {
        return $this->ruleName;
    }

    /**
     * Test if the given filepath and method matches the baseline
     *
     * @param string      $filepath   the full filepath to match against
     * @param string|null $methodName the name of the method of the method, if any
     *
     * @return bool
     */
    public function matches($filepath, $methodName)
    {
        return $this->methodName === $methodName && substr($filepath, -$this->fileNameLength) === $this->fileName;
    }
}

Spamworldpro Mini