for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/** @formatter:off
* ******************************************************************
* Created by Marko Kungla on Jun 21, 2016 - 3:40:17 AM
* Contact [email protected]
* @copyright 2016 Marko Kungla - https://github.com/mkungla
* @license The MIT License (MIT)
*
* @category AframeVR
* @package aframe-php
* Lang PHP (php version >= 7)
* Encoding UTF-8
* File InvalidComponentMethodException.php
* Code format PSR-2 and 12
* @link https://github.com/mkungla/aframe-php
* @issues https://github.com/mkungla/aframe-php/issues
* ********************************************************************
* Contributors:
* @author Marko Kungla <[email protected]>
* Comments:
* @formatter:on */
namespace AframeVR\Core\Exceptions;
final class InvalidShaderMethodException extends \BadMethodCallException
{
/**
* InvalidComponentMethodException
* @param string $message
* @param string $component_method
$component_method
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
*/
public function __construct(string $message = 'null', string $shader_method = 'unknown')
$this->message = sprintf(
"Called invalid method (%s) for %s!\nFile: %s on line: %s",
$message,
$shader_method,
$this->getFile(),
$this->getLine()
);
}
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.