for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link http://www.newicon.net/neon
* @copyright Copyright (c) 2016 Newicon Ltd
* @license http://www.newicon.net/neon/license
*/
namespace neon\core\form\fields;
use neon\core\form\fields\Field;
use neon\core\helpers\Html;
* Class Text
* @package neon\core\form
class Ide extends Field
{
* @inheritdoc
public $ddsDataType = 'textlong';
* Array (js object) of editor config options
* @see https://github.com/ajaxorg/ace/wiki/Configuring-Ace
* @var array
public $editorOptions = [];
public function getProperties()
return array_merge(parent::getProperties(), ["editorOptions"]);
}
public function getValue()
// return sanitised data only
return $this->getUnsafeValue();
$this->getUnsafeValue()
neon\core\form\fields\Field::getUnsafeValue()
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.
* Register scripts
* @param \neon\core\web\View $view
public function registerScripts($view)
$view->registerJsFile("//cdnjs.cloudflare.com/ajax/libs/ace/1.2.8/ace.js", ['concatenate' => 'false']);
public function getComponentDetails()
return [
'icon' => 'fa fa-paragraph',
'group' => 'Formatted Text',
'order' => 240,
'label' => 'IDE',
];
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.