for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* FlexiPeeHP - Objekt Žurnálu.
*
* @author Vítězslav Dvořák <[email protected]>
* @copyright (C) 2017 Spoje.Net
*/
namespace FlexiPeeHP;
* Žurnál změn
* Journal of Changes
* @link https://demo.flexibee.eu/c/demo/adresar/properties položky evidence
class Zurnal extends FlexiBeeRO
{
* Evidence užitá objektem.
* @var string
public $evidence = 'zurnal';
* @var type
public static $evidenceToDb = ['faktura-vydana' => 'ddoklfak'];
* obtain all record changes array
* @param FlexiBeeRO $object
* @return array changes history
public function getAllChanges($object)
$changesArray = [];
$evidence = $object->getEvidence();
if (array_key_exists($evidence, self::$evidenceToDb)) {
$dbTable = self::$evidenceToDb[$evidence];
$changes = $this->getColumnsFromFlexibee('*',
'*'
string
array<integer,string>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
['tabulka' => $dbTable, 'idZaznamu' => $object->getMyKey()]);
foreach ($changes as $change) {
$changesArray[$change['datCas']][$change['sloupec']] = $change;
}
return $changesArray;
* obtain last change array
* @return array Old/New values pairs
public function getLastChange($object)
$lastChange = null;
$allChanges = $this->getAllChanges($object);
if (count($allChanges)) {
$lastChange = end($allChanges);
return $lastChange;
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: