Return an inverse yes-no select list

@param   bool $includeNull   Indicate whether or not a null value is to be included in the result list
@return array
327525
protected function getInverseBooleanSelectList($includeNull = false)
    {
        $results = array();
        if( $includeNull ) {
            $results[ '' ] = Translate::recursive('common.both');
        }

        $results[ 0 ] = Translate::recursive('common.yes');
        $results[ 1 ] = Translate::recursive('common.no');

        return $results;
    }
261713
@SuppressFBWarnings(value = "NP_BOOLEAN_RETURN_NULL", justification = "That's the point (but dubious)")
    public static Boolean falseToNull(Boolean bool) {
        if (bool != null && bool) {
            return true;
        }
        return null;
    }
57340
public function whereNull($column, $boolean = 'and', $not = false)
    {
        $type = $not ? 'NotNull' : 'Null';

        $this->wheres[] = compact('type', 'column', 'boolean');

        return $this;
    }
1198184
public function getChain(bool $includeOptions = true): string
    {
        $chain = [];
        foreach ($this->chain as $validatorName => $validatorObj) {
            if ($includeOptions === true) {
                $options = [];
                $tmpOptions = $validatorObj->getOptions();
                foreach ($tmpOptions as $optionName => $optionVal) {
                    $options[] = \sprintf('\'%s\'=>%s', $optionName, $this->parseOptionValue($optionVal));
                }
                $chain[] = \sprintf('%s [%s]', $validatorName, \implode(', ', $options));
            } else {
                $chain[] = $validatorName;
            }
        }
        return \implode(",\n", $chain);
    }
1291660
protected function checkIsNull($input) {
		$isNull = $this->isNull;
		if($isNull)
			return $isNull($input);
		else
			return $input === null || $input === '';
	}
567686
public function getList(array $options = array())
    {
        $result = null;
        $this->hook->attach('sku.list.before', $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $sql = 'SELECT ps.*, p.title, p.currency';

        if (!empty($options['count'])) {
            $sql = 'SELECT COUNT(ps.product_sku_id)';
        }

        $sql .= ' FROM product_sku ps LEFT JOIN product p ON(ps.product_id = p.product_id)';

        $conditions = array();

        if (isset($options['product_sku_id'])) {
            $sql .= ' WHERE ps.product_sku_id = ?';
            $conditions[] = $options['product_sku_id'];
        } else {
            $sql .= ' WHERE ps.product_sku_id IS NOT NULL';
        }

        if (isset($options['sku'])) {
            $sql .= ' AND ps.sku=?';
            $conditions[] = $options['sku'];
        }

        if (isset($options['store_id'])) {
            $sql .= ' AND p.store_id=?';
            $conditions[] = $options['store_id'];
        }

        if (isset($options['title_sku'])) {
            $sql .= ' AND (p.title LIKE ? OR ps.sku LIKE ?)';
            $conditions[] = "%{$options['title_sku']}%";
            $conditions[] = "%{$options['title_sku']}%";
        }

        if (isset($options['product_id'])) {
            $sql .= ' AND ps.product_id=?';
            $conditions[] = $options['product_id'];
        }

        if (isset($options['combination_id'])) {
            $sql .= ' AND ps.combination_id=?';
            $conditions[] = $options['combination_id'];
        }

        if (isset($options['status'])) {
            $sql .= ' AND ps.status=?';
            $conditions[] = (int) $options['status'];
        }

        $sql .= " ORDER BY ps.sku ASC";

        if (!empty($options['limit'])) {
            $sql .= ' LIMIT ' . implode(',', array_map('intval', $options['limit']));
        }

        if (empty($options['count'])) {
            $list = $this->db->fetchAll($sql, $conditions, array('index' => 'product_sku_id'));
            $result = $this->prepareList($list);
        } else {
            $result = (int) $this->db->fetchColumn($sql, $conditions);
        }

        $this->hook->attach('sku.list.after', $options, $result, $this);
        return $result;
    }
886210
public static function getDataForSelect($refetch = false, $contentQueryCallback = null)
    {
        if ($refetch === false && static::$_selectData) {
            return static::$_selectData;
        }

        static::$_selectData = [];

        if ($cmsContentTypes = CmsContentType::find()->orderBy("priority ASC")->all()) {
            /**
             * @var $cmsContentType CmsContentType
             */
            foreach ($cmsContentTypes as $cmsContentType) {
                $query = $cmsContentType->getCmsContents();
                if ($contentQueryCallback && is_callable($contentQueryCallback)) {
                    $contentQueryCallback($query);
                }

                static::$_selectData[$cmsContentType->name] = ArrayHelper::map($query->all(), 'id', 'name');
            }
        }

        return static::$_selectData;
    }
1240198
public function getListEmployees($includeBlock = true) {
		$fields = [
			$this->alias . '.id',
			$this->alias . '.' . $this->displayField,
		];
		$conditions = [];
		$blockExists = $this->hasField('block');
		if (!$includeBlock && $blockExists) {
			$conditions[$this->alias . '.block'] = false;
		}
		$order = $this->getOrderFiled();
		$this->recursive = -1;

		return $this->find('list', compact('fields', 'conditions', 'order'));
	}
1347282
public function isEnabled($bool = null)
    {
        if ($bool === true || $bool === false) {
            $this->isEnabled = $bool;
        }

        return $this->isEnabled;
    }
766894
public function getNotNullColumns ($table_name, $forced_obtain = false) {
		if ($forced_obtain || !Arrays::KeyExists($this->_notNullColumns, $table_name)) {
			$this->_updateNotNullColumns($table_name);
		}
		return $this->_notNullColumns[$table_name];
	}
324759
public function RecallDaftNestedObjectTreeWithObject(
        DaftNestedObject $root,
        bool $includeRoot,
        ? int $limit
    ) : array {
        $left = $root->GetIntNestedLeft();
        $right = $root->GetIntNestedRight();
        $limit = is_int($limit) ? ($root->GetIntNestedLevel() + $limit) : null;

        $leaves = $this->RecallDaftNestedObjectFullTree();

        if (is_int($limit)) {
            $leaves = array_filter($leaves, function (DaftNestedObject $e) use ($limit) : bool {
                return $e->GetIntNestedLevel() <= $limit;
            });
        }

        return array_values(array_filter(
            $leaves,
            /**
            * @psalm-param T $e
            */
            function (DaftNestedObject $e) use ($includeRoot, $left, $right) : bool {
                return $this->FilterLeaf($includeRoot, $left, $right, $e);
            }
        ));
    }
387857
public function toBool()
    {
        return (!is_null($this->returnValue)) &&
            (!empty($this->returnValue)) &&
            (!in_array(strtolower($this->returnValue), $this->falseStrings));
    }
123287
public function f ($query, $includeInactiveFields = false)
    {
        $minLength = -1;
        $match     = null;
        foreach ($this->getFields($includeInactiveFields) as $field)
            /* @var $field Field */
            if (preg_match("/^(.*)" . preg_quote($query) . "$/", $field->getGlobalSlug(), $matches)) {
                $l = strlen($matches[1]);
                if ($l < $minLength || $minLength == -1) {
                    $minLength = $l;
                    $match     = $field;
                }
            }
        return $match;
    }
168472
public static function getStringOperands($includeSelector = false)
    {
        $values = array(
            self::STRING_STARTS,
            self::STRING_ENDS,
            self::STRING_EQUALS,
            self::STRING_CONTAINS,
        );

        if ($includeSelector) {
            $values[] = self::OPERAND_SELECTOR;
        }

        return $values;
    }
692851
public function ignoreMemzero($bool = null)
    {
        if ($bool === null) {
            return $this->ignoreMemzero;
        }

        $this->ignoreMemzero = (bool) $bool;

        return $this;
    }
492210
function select($column0=null, $_=null){
        $obj = new SelectRule(new Context($this->connection));
        if($column0 == null){
            $args = ['*'];
        }elseif(is_array($column0)){
            $args = $column0;
        }else{
            $args = func_get_args();
        }
        foreach ($args as &$arg){
            $arg = DB::wrap($arg);
            if($arg == '*'){
                continue;
            }
        }
        return $obj->select(implode(',', $args));
    }
1186204
public function usePickDate($bool = null)
    {
        if (isset($bool)) {

            $this->option_pick_date = (bool) $bool;
            $this->set_options['pick_date'] = 'pickDate';

            return $this;
        }
        else {

            return $this->option_pick_date;
        }
    }