jaxon-php /
jaxon-mono
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | use Jaxon\App\FuncComponent; |
||||||
| 4 | use Jaxon\App\NodeComponent; |
||||||
| 5 | |||||||
| 6 | class HelloText extends NodeComponent |
||||||
| 7 | { |
||||||
| 8 | public function html(): string |
||||||
| 9 | { |
||||||
| 10 | return $this->stash()->get('is_caps') ? 'HELLO WORLD!' : 'Hello World!'; |
||||||
| 11 | } |
||||||
| 12 | } |
||||||
| 13 | |||||||
| 14 | class HelloWorld extends FuncComponent |
||||||
| 15 | { |
||||||
| 16 | public function sayHello(bool $isCaps) |
||||||
| 17 | { |
||||||
| 18 | $this->stash()->set('is_caps', $isCaps); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 19 | |||||||
| 20 | $this->response->bind('div2', rq(HelloText::class)); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 21 | $this->cl(HelloText::class)->render(); |
||||||
|
0 ignored issues
–
show
The method
cl() does not exist on HelloWorld.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 22 | } |
||||||
| 23 | |||||||
| 24 | public function setColor(string $sColor) |
||||||
| 25 | { |
||||||
| 26 | $this->response->assign('div2', 'style.color', $sColor); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 27 | } |
||||||
| 28 | } |
||||||
| 29 | |||||||
| 30 | // Register object |
||||||
| 31 | $jaxon = jaxon(); |
||||||
| 32 | |||||||
| 33 | $jaxon->app()->setup(configFile('class.php')); |
||||||
| 34 | // Js options |
||||||
| 35 | $jaxon->setOptions(['lib' => ['uri' => '/js'], 'app' => ['minify' => false]], 'js'); |
||||||
| 36 | $jaxon->register(Jaxon\Jaxon::CALLABLE_CLASS, HelloText::class); |
||||||
| 37 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.