• ErrorException

    Something went wrong!

    • ErrorException
      tests/Fixtures/Code/TestClass.php:20
      use DateTime;
      use ErrorException;
      use LogicException;
      use stdClass;
       
      class TestClass
      {
          /** @var stdClass */
          private $parameter;
       
          private static function bar(TestClass $object, array $countries = [])
          {
              assert(is_object($object));
              assert(is_array($countries));
       
              throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
          }
       
          private static function createPreviousException()
          {
              return new LogicException();
          }
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\Code\TestClass::bar(Object[SlashTrace\Tests\Fixtures\Code\TestClass], array[3])
      tests/Fixtures/Code/TestClass.php:48
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      TestClass {#10
        -parameter: null
      }
      
      #1
      array:3 [
        0 => "Finland"
        1 => "Denmark"
        2 => "Sweden"
      ]
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->foo(Object[SlashTrace\Tests\Fixtures\Code\TestClass], array[3])
      tests/Fixtures/Code/TestClass.php:42
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      TestClass {#10
        -parameter: null
      }
      
      #1
      array:3 [
        0 => "Finland"
        1 => "Denmark"
        2 => "Sweden"
      ]
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->doSomething(DateTime[2018-12-18T20:52:10+00:00])
      tests/Fixtures/Code/test_functions.php:14
      <?php
       
      namespace SlashTrace\Tests\Fixtures\Code;
       
      use DateTime;
      use stdClass;
       
      function do_something(stdClass $person, $a, $b)
      {
          assert($a);
          assert(!$b);
       
          $testClass = new TestClass($person);
          $testClass->doSomething(new DateTime());
      }
       
      function create_person()
      {
          $person = new stdClass();
       
          $person->name = "John Doe";
          $person->email = "john.doe@example.com";
          $person->spokenLanguages = ["English", "Swahili"];
          $person->preferences = ["name" => "value"];
       
          $address = new stdClass();
          $address->country = "Romania";
          $address->city = "Bucharest";
       

      Arguments

      #0
      DateTime @1545166330 {#9
        date: 2018-12-18 20:52:10.0 UTC (+00:00)
      }
      
    • SlashTrace\Tests\Fixtures\Code\do_something(Object[stdClass], true, false)
      tests/Fixtures/Code/test_file.php:7
      <?php
       
      namespace SlashTrace\Tests\Fixtures\Code;
       
      require_once __DIR__ . "/test_functions.php";
       
      do_something(create_person(), true, false);

      Arguments

      #0
      {#5
        +"name": "John Doe"
        +"email": "john.doe@example.com"
        +"spokenLanguages": array:2 [
          0 => "English"
          1 => "Swahili"
        ]
        +"preferences": array:1 [
          "name" => "value"
        ]
        +"address": {#6
          +"country": "Romania"
          +"city": "Bucharest"
        }
        +"date": DateTime @1545166330 {#7
          date: 2018-12-18 20:52:10.0 UTC (+00:00)
        }
      }
      
      #1
      true
      
      #2
      false
      
    • include("/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php")
      tests/Fixtures/Code/TestClass.php:35
              throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
          }
       
          private static function createPreviousException()
          {
              return new LogicException();
          }
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      "/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php"
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->initialize()
      tests/Fixtures/EventProvider.php:46
       
              $event->setContext($this->createEventContext());
       
              return $event;
          }
       
          /**
           * @return ExceptionData[]
           */
          private function createExceptions()
          {
              $exceptions = [];
       
              try {
                  $testObject = new TestClass();
                  $testObject->initialize();
       
              } catch (Exception $exception) {
                  $inspector = new ExceptionInspector();
                  $inspector->setStackTraceInspector(new MaxDepthStackTraceInspector(10));
       
                  do {
                      $exceptions[] = $inspector->inspect($exception);
                  } while ($exception = $exception->getPrevious());
              }
       
              return $exceptions;
          }
       
          /**
           * @return EventContext

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\EventProvider->createExceptions()
      tests/Fixtures/EventProvider.php:28
      use SlashTrace\Tests\Fixtures\Code\TestClass;
      use DateTime;
      use Exception;
       
      class EventProvider
      {
          /**
           * @return Event
           * @throws Exception
           */
          public function createEvent()
          {
              $event = new Event();
              $event->setLevel(Level::ERROR);
       
              foreach ($this->createExceptions() as $exception) {
                  $event->addException($exception);
              }
       
              $event->setContext($this->createEventContext());
       
              return $event;
          }
       
          /**
           * @return ExceptionData[]
           */
          private function createExceptions()
          {
              $exceptions = [];
       

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\EventProvider->createEvent()
      /home/vizuina/slashtrace.com/demo.php:10
      <?php
       
      use SlashTrace\DebugRenderer\DebugWebRenderer;
      use SlashTrace\EventHandler\DebugHandler;
      use SlashTrace\Tests\Fixtures\EventProvider;
       
      require_once __DIR__ . "/vendor/autoload.php";
       
      $eventProvider = new EventProvider();
      $event = $eventProvider->createEvent();
       
      $handler = new DebugHandler();
      $handler->setRenderer(new DebugWebRenderer());
       
      $handler->handleEvent($event);
       

      Arguments

      No arguments.

  • Previous exception:

    LogicException

    • LogicException
      tests/Fixtures/Code/TestClass.php:25
      class TestClass
      {
          /** @var stdClass */
          private $parameter;
       
          private static function bar(TestClass $object, array $countries = [])
          {
              assert(is_object($object));
              assert(is_array($countries));
       
              throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
          }
       
          private static function createPreviousException()
          {
              return new LogicException();
          }
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\Code\TestClass::createPreviousException()
      tests/Fixtures/Code/TestClass.php:20
      use DateTime;
      use ErrorException;
      use LogicException;
      use stdClass;
       
      class TestClass
      {
          /** @var stdClass */
          private $parameter;
       
          private static function bar(TestClass $object, array $countries = [])
          {
              assert(is_object($object));
              assert(is_array($countries));
       
              throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
          }
       
          private static function createPreviousException()
          {
              return new LogicException();
          }
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\Code\TestClass::bar(Object[SlashTrace\Tests\Fixtures\Code\TestClass], array[3])
      tests/Fixtures/Code/TestClass.php:48
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      TestClass {#10
        -parameter: null
      }
      
      #1
      array:3 [
        0 => "Finland"
        1 => "Denmark"
        2 => "Sweden"
      ]
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->foo(Object[SlashTrace\Tests\Fixtures\Code\TestClass], array[3])
      tests/Fixtures/Code/TestClass.php:42
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      TestClass {#10
        -parameter: null
      }
      
      #1
      array:3 [
        0 => "Finland"
        1 => "Denmark"
        2 => "Sweden"
      ]
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->doSomething(DateTime[2018-12-18T20:52:10+00:00])
      tests/Fixtures/Code/test_functions.php:14
      <?php
       
      namespace SlashTrace\Tests\Fixtures\Code;
       
      use DateTime;
      use stdClass;
       
      function do_something(stdClass $person, $a, $b)
      {
          assert($a);
          assert(!$b);
       
          $testClass = new TestClass($person);
          $testClass->doSomething(new DateTime());
      }
       
      function create_person()
      {
          $person = new stdClass();
       
          $person->name = "John Doe";
          $person->email = "john.doe@example.com";
          $person->spokenLanguages = ["English", "Swahili"];
          $person->preferences = ["name" => "value"];
       
          $address = new stdClass();
          $address->country = "Romania";
          $address->city = "Bucharest";
       

      Arguments

      #0
      DateTime @1545166330 {#9
        date: 2018-12-18 20:52:10.0 UTC (+00:00)
      }
      
    • SlashTrace\Tests\Fixtures\Code\do_something(Object[stdClass], true, false)
      tests/Fixtures/Code/test_file.php:7
      <?php
       
      namespace SlashTrace\Tests\Fixtures\Code;
       
      require_once __DIR__ . "/test_functions.php";
       
      do_something(create_person(), true, false);

      Arguments

      #0
      {#5
        +"name": "John Doe"
        +"email": "john.doe@example.com"
        +"spokenLanguages": array:2 [
          0 => "English"
          1 => "Swahili"
        ]
        +"preferences": array:1 [
          "name" => "value"
        ]
        +"address": {#6
          +"country": "Romania"
          +"city": "Bucharest"
        }
        +"date": DateTime @1545166330 {#7
          date: 2018-12-18 20:52:10.0 UTC (+00:00)
        }
      }
      
      #1
      true
      
      #2
      false
      
    • include("/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php")
      tests/Fixtures/Code/TestClass.php:35
              throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
          }
       
          private static function createPreviousException()
          {
              return new LogicException();
          }
       
          public function __construct(stdClass $parameter = null)
          {
              $this->parameter = $parameter;
          }
       
          public function initialize()
          {
              include __DIR__ . "/test_file.php";
          }
       
          public function doSomething(DateTime $when)
          {
              assert($when instanceof DateTime);
              $this->foo(new self, [
                  "Finland", "Denmark", "Sweden"
              ]);
          }
       
          private function foo(TestClass $object, array $countries = [])
          {
              self::bar($object, $countries);
          }
      }

      Arguments

      #0
      "/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php"
      
    • SlashTrace\Tests\Fixtures\Code\TestClass->initialize()
      tests/Fixtures/EventProvider.php:46
       
              $event->setContext($this->createEventContext());
       
              return $event;
          }
       
          /**
           * @return ExceptionData[]
           */
          private function createExceptions()
          {
              $exceptions = [];
       
              try {
                  $testObject = new TestClass();
                  $testObject->initialize();
       
              } catch (Exception $exception) {
                  $inspector = new ExceptionInspector();
                  $inspector->setStackTraceInspector(new MaxDepthStackTraceInspector(10));
       
                  do {
                      $exceptions[] = $inspector->inspect($exception);
                  } while ($exception = $exception->getPrevious());
              }
       
              return $exceptions;
          }
       
          /**
           * @return EventContext

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\EventProvider->createExceptions()
      tests/Fixtures/EventProvider.php:28
      use SlashTrace\Tests\Fixtures\Code\TestClass;
      use DateTime;
      use Exception;
       
      class EventProvider
      {
          /**
           * @return Event
           * @throws Exception
           */
          public function createEvent()
          {
              $event = new Event();
              $event->setLevel(Level::ERROR);
       
              foreach ($this->createExceptions() as $exception) {
                  $event->addException($exception);
              }
       
              $event->setContext($this->createEventContext());
       
              return $event;
          }
       
          /**
           * @return ExceptionData[]
           */
          private function createExceptions()
          {
              $exceptions = [];
       

      Arguments

      No arguments.

    • SlashTrace\Tests\Fixtures\EventProvider->createEvent()
      /home/vizuina/slashtrace.com/demo.php:10
      <?php
       
      use SlashTrace\DebugRenderer\DebugWebRenderer;
      use SlashTrace\EventHandler\DebugHandler;
      use SlashTrace\Tests\Fixtures\EventProvider;
       
      require_once __DIR__ . "/vendor/autoload.php";
       
      $eventProvider = new EventProvider();
      $event = $eventProvider->createEvent();
       
      $handler = new DebugHandler();
      $handler->setRenderer(new DebugWebRenderer());
       
      $handler->handleEvent($event);
       

      Arguments

      No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

use DateTime;
use ErrorException;
use LogicException;
use stdClass;
 
class TestClass
{
    /** @var stdClass */
    private $parameter;
 
    private static function bar(TestClass $object, array $countries = [])
    {
        assert(is_object($object));
        assert(is_array($countries));
 
        throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
    }
 
    private static function createPreviousException()
    {
        return new LogicException();
    }
 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
TestClass {#10
  -parameter: null
}
#1
array:3 [
  0 => "Finland"
  1 => "Denmark"
  2 => "Sweden"
]

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
TestClass {#10
  -parameter: null
}
#1
array:3 [
  0 => "Finland"
  1 => "Denmark"
  2 => "Sweden"
]

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_functions.php

<?php
 
namespace SlashTrace\Tests\Fixtures\Code;
 
use DateTime;
use stdClass;
 
function do_something(stdClass $person, $a, $b)
{
    assert($a);
    assert(!$b);
 
    $testClass = new TestClass($person);
    $testClass->doSomething(new DateTime());
}
 
function create_person()
{
    $person = new stdClass();
 
    $person->name = "John Doe";
    $person->email = "john.doe@example.com";
    $person->spokenLanguages = ["English", "Swahili"];
    $person->preferences = ["name" => "value"];
 
    $address = new stdClass();
    $address->country = "Romania";
    $address->city = "Bucharest";
 

Arguments

#0
DateTime @1545166330 {#9
  date: 2018-12-18 20:52:10.0 UTC (+00:00)
}

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php

<?php
 
namespace SlashTrace\Tests\Fixtures\Code;
 
require_once __DIR__ . "/test_functions.php";
 
do_something(create_person(), true, false);

Arguments

#0
{#5
  +"name": "John Doe"
  +"email": "john.doe@example.com"
  +"spokenLanguages": array:2 [
    0 => "English"
    1 => "Swahili"
  ]
  +"preferences": array:1 [
    "name" => "value"
  ]
  +"address": {#6
    +"country": "Romania"
    +"city": "Bucharest"
  }
  +"date": DateTime @1545166330 {#7
    date: 2018-12-18 20:52:10.0 UTC (+00:00)
  }
}
#1
true
#2
false

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

        throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
    }
 
    private static function createPreviousException()
    {
        return new LogicException();
    }
 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
"/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php"

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/EventProvider.php

 
        $event->setContext($this->createEventContext());
 
        return $event;
    }
 
    /**
     * @return ExceptionData[]
     */
    private function createExceptions()
    {
        $exceptions = [];
 
        try {
            $testObject = new TestClass();
            $testObject->initialize();
 
        } catch (Exception $exception) {
            $inspector = new ExceptionInspector();
            $inspector->setStackTraceInspector(new MaxDepthStackTraceInspector(10));
 
            do {
                $exceptions[] = $inspector->inspect($exception);
            } while ($exception = $exception->getPrevious());
        }
 
        return $exceptions;
    }
 
    /**
     * @return EventContext

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/EventProvider.php

use SlashTrace\Tests\Fixtures\Code\TestClass;
use DateTime;
use Exception;
 
class EventProvider
{
    /**
     * @return Event
     * @throws Exception
     */
    public function createEvent()
    {
        $event = new Event();
        $event->setLevel(Level::ERROR);
 
        foreach ($this->createExceptions() as $exception) {
            $event->addException($exception);
        }
 
        $event->setContext($this->createEventContext());
 
        return $event;
    }
 
    /**
     * @return ExceptionData[]
     */
    private function createExceptions()
    {
        $exceptions = [];
 

Arguments

No arguments.

/home/vizuina/slashtrace.com/demo.php

<?php
 
use SlashTrace\DebugRenderer\DebugWebRenderer;
use SlashTrace\EventHandler\DebugHandler;
use SlashTrace\Tests\Fixtures\EventProvider;
 
require_once __DIR__ . "/vendor/autoload.php";
 
$eventProvider = new EventProvider();
$event = $eventProvider->createEvent();
 
$handler = new DebugHandler();
$handler->setRenderer(new DebugWebRenderer());
 
$handler->handleEvent($event);
 

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

class TestClass
{
    /** @var stdClass */
    private $parameter;
 
    private static function bar(TestClass $object, array $countries = [])
    {
        assert(is_object($object));
        assert(is_array($countries));
 
        throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
    }
 
    private static function createPreviousException()
    {
        return new LogicException();
    }
 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

use DateTime;
use ErrorException;
use LogicException;
use stdClass;
 
class TestClass
{
    /** @var stdClass */
    private $parameter;
 
    private static function bar(TestClass $object, array $countries = [])
    {
        assert(is_object($object));
        assert(is_array($countries));
 
        throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
    }
 
    private static function createPreviousException()
    {
        return new LogicException();
    }
 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
TestClass {#10
  -parameter: null
}
#1
array:3 [
  0 => "Finland"
  1 => "Denmark"
  2 => "Sweden"
]

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
TestClass {#10
  -parameter: null
}
#1
array:3 [
  0 => "Finland"
  1 => "Denmark"
  2 => "Sweden"
]

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_functions.php

<?php
 
namespace SlashTrace\Tests\Fixtures\Code;
 
use DateTime;
use stdClass;
 
function do_something(stdClass $person, $a, $b)
{
    assert($a);
    assert(!$b);
 
    $testClass = new TestClass($person);
    $testClass->doSomething(new DateTime());
}
 
function create_person()
{
    $person = new stdClass();
 
    $person->name = "John Doe";
    $person->email = "john.doe@example.com";
    $person->spokenLanguages = ["English", "Swahili"];
    $person->preferences = ["name" => "value"];
 
    $address = new stdClass();
    $address->country = "Romania";
    $address->city = "Bucharest";
 

Arguments

#0
DateTime @1545166330 {#9
  date: 2018-12-18 20:52:10.0 UTC (+00:00)
}

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php

<?php
 
namespace SlashTrace\Tests\Fixtures\Code;
 
require_once __DIR__ . "/test_functions.php";
 
do_something(create_person(), true, false);

Arguments

#0
{#5
  +"name": "John Doe"
  +"email": "john.doe@example.com"
  +"spokenLanguages": array:2 [
    0 => "English"
    1 => "Swahili"
  ]
  +"preferences": array:1 [
    "name" => "value"
  ]
  +"address": {#6
    +"country": "Romania"
    +"city": "Bucharest"
  }
  +"date": DateTime @1545166330 {#7
    date: 2018-12-18 20:52:10.0 UTC (+00:00)
  }
}
#1
true
#2
false

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/TestClass.php

        throw new ErrorException("Something went wrong!", 1234, E_USER_ERROR, __FILE__, __LINE__, self::createPreviousException());
    }
 
    private static function createPreviousException()
    {
        return new LogicException();
    }
 
    public function __construct(stdClass $parameter = null)
    {
        $this->parameter = $parameter;
    }
 
    public function initialize()
    {
        include __DIR__ . "/test_file.php";
    }
 
    public function doSomething(DateTime $when)
    {
        assert($when instanceof DateTime);
        $this->foo(new self, [
            "Finland", "Denmark", "Sweden"
        ]);
    }
 
    private function foo(TestClass $object, array $countries = [])
    {
        self::bar($object, $countries);
    }
}

Arguments

#0
"/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/Code/test_file.php"

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/EventProvider.php

 
        $event->setContext($this->createEventContext());
 
        return $event;
    }
 
    /**
     * @return ExceptionData[]
     */
    private function createExceptions()
    {
        $exceptions = [];
 
        try {
            $testObject = new TestClass();
            $testObject->initialize();
 
        } catch (Exception $exception) {
            $inspector = new ExceptionInspector();
            $inspector->setStackTraceInspector(new MaxDepthStackTraceInspector(10));
 
            do {
                $exceptions[] = $inspector->inspect($exception);
            } while ($exception = $exception->getPrevious());
        }
 
        return $exceptions;
    }
 
    /**
     * @return EventContext

Arguments

No arguments.

/home/vizuina/slashtrace.com/vendor/slashtrace/slashtrace/tests/Fixtures/EventProvider.php

use SlashTrace\Tests\Fixtures\Code\TestClass;
use DateTime;
use Exception;
 
class EventProvider
{
    /**
     * @return Event
     * @throws Exception
     */
    public function createEvent()
    {
        $event = new Event();
        $event->setLevel(Level::ERROR);
 
        foreach ($this->createExceptions() as $exception) {
            $event->addException($exception);
        }
 
        $event->setContext($this->createEventContext());
 
        return $event;
    }
 
    /**
     * @return ExceptionData[]
     */
    private function createExceptions()
    {
        $exceptions = [];
 

Arguments

No arguments.

/home/vizuina/slashtrace.com/demo.php

<?php
 
use SlashTrace\DebugRenderer\DebugWebRenderer;
use SlashTrace\EventHandler\DebugHandler;
use SlashTrace\Tests\Fixtures\EventProvider;
 
require_once __DIR__ . "/vendor/autoload.php";
 
$eventProvider = new EventProvider();
$event = $eventProvider->createEvent();
 
$handler = new DebugHandler();
$handler->setRenderer(new DebugWebRenderer());
 
$handler->handleEvent($event);
 

Arguments

No arguments.

GET

array:3 [
  "controller" => "test"
  "action" => "demo"
  "category_id" => 100
]

POST

No data


Cookies

PHPSESSID 4i5kreh906u63dmefo5imiueo5
language en_US

Headers

Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cache-Control max-age=0
Cookie G_ENABLED_IDPS=google
Connection keep-alive
Host example.com
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Upgrade-Insecure-Requests 1
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Dnt 1
SCRIPT_NAME /lorem/ipsum/index.php
REQUEST_URI /lorem/ipsum/index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 60894
SCRIPT_FILENAME /var/www/lorem/ipsum/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /var/www
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /var/www
REMOTE_ADDR 192.168.100.1
SERVER_PORT 80
SERVER_ADDR 192.168.100.100
SERVER_NAME example.com
SERVER_SOFTWARE Apache/2.4.23 (Ubuntu)
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_CACHE_CONTROL no-cache
HTTP_PRAGMA no-cache
HTTP_CONNECTION keep-alive
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
HTTP_HOST example.com
HTTP_AUTHORIZATION
FCGI_ROLE RESPONDER
PHP_SELF /var/www/lorem/ipsum/index.php
argv
array:2 [
  0 => "foo"
  1 => "bar"
]

Affected user

User ID 5
Email john.doe@example.com
Name John Doe

Breadcrumbs