for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the jquery-datatables-bundle package.
*
* (c) 2022 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Renderer\Strings;
use WBW\Bundle\JQuery\DataTablesBundle\Tests\AbstractTestCase;
use WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Renderer\Strings\TestBoldTextRendererTrait;
/**
* Bold text renderer trait test.
* @author webeweb <https://github.com/webeweb>
* @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Renderer\Strings
class BoldTextRendererTraitTest extends AbstractTestCase {
* Test renderBoldText()
* @return void
public function testRenderBoldText(): void {
$obj = new TestBoldTextRendererTrait();
$this->assertNull($obj->renderBoldText(null));
$obj->renderBoldText(null)
WBW\Bundle\JQuery\DataTa...Trait::renderBoldText()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
$this->assertNull($obj->renderBoldText(""));
$obj->renderBoldText('')
$this->assertEquals('<strong>content</strong>', $obj->renderBoldText("content"));
}
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.