3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MCC\SocialCare\Component\User\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Criteria; use FOS\UserBundle\Model\GroupInterface; use FOS\UserBundle\Model\User as BaseUser; use Knp\DoctrineBehaviors\Model as ORMBehaviors; use MCC\SocialCare\Component\ServiceUserCase\Entity\ServiceUserCase; use MCC\SocialCare\Component\Team\Entity\Team; use MCC\SocialCare\Component\Notification\Entity\NotificationMessage; /** * @ORM\Entity * @ORM\Table(name="user") */ class User extends BaseUser implements UserInterface { use ORMBehaviors\Timestampable\Timestampable; /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") * @var int */ protected $id; /** * @ORM\Column(name="first_name", type="string", nullable=true) * @var string */ protected $firstName; /** * @ORM\Column(name="last_name", type="string", nullable=true) * @var string */ protected $lastName; /** * @ORM\ManyToMany(targetEntity="Role", inversedBy="users", cascade={"persist"}, fetch="EAGER") * @ORM\JoinTable(name="user_roles") * * @var Role[]|Collection */ protected $roles; /** * @ORM\ManyToMany(targetEntity="Group", inversedBy="users", cascade={"persist"}, fetch="EAGER") * @ORM\JoinTable(name="user_groups") * * @var Group[]|Collection */ protected $groups; /** * @ORM\ManyToMany(targetEntity="MCC\SocialCare\Component\Team\Entity\Team", mappedBy="users") * * @var Team[]|Collection */ protected $teams; /** * @ORM\OneToMany(targetEntity="MCC\SocialCare\Component\Team\Entity\Team", mappedBy="manager") * * @var Team[]|Collection */ protected $managedTeams; /** * The cases in which the user is a key worker on. * * @ORM\OneToMany( * targetEntity="MCC\SocialCare\Component\ServiceUserCase\Entity\ServiceUserCase", * mappedBy="keyWorker" * ) * * @var ServiceUserCase[]|Collection */ protected $keyCases; /** * The cases the user is simply involved with. * * @ORM\ManyToMany(targetEntity="MCC\SocialCare\Component\ServiceUserCase\Entity\ServiceUserCase", mappedBy="users") * * @var Team[]|Collection */ protected $cases; /** * The users notifications. * * @ORM\OneToMany( * targetEntity="MCC\SocialCare\Component\Notification\Entity\NotificationMessage", * mappedBy="recipient", * cascade={"persist"} * ) * * @var NotificationMessage[]|Collection */ protected $notifications; public function __construct() { parent::__construct(); $this->roles = new ArrayCollection(); $this->groups = new ArrayCollection(); $this->teams = new ArrayCollection(); $this->managedTeams = new ArrayCollection(); $this->keyCases = new ArrayCollection(); $this->cases = new ArrayCollection(); $this->notifications = new ArrayCollection(); } /** * @return string */ public function getFullName() { return $this->firstName.' '.$this->lastName; } /** * {@inheritdoc} */ public function setFirstName($firstName) { $this->firstName = $firstName; return $this; } /** * {@inheritdoc} */ public function getFirstName() { return $this->firstName; } /** * {@inheritdoc} */ public function setLastName($lastName) { $this->lastName = $lastName; return $this; } /** * {@inheritdoc} */ public function getLastName() { return $this->lastName; } /** * @param string|Role $role * @return User */ public function addRole($role) { if (!$role instanceof Role) { $role = (new Role)->setRole($role); } if (!$this->hasRole($role)) { $this->roles->add($role); } return $this; } /** * @param string|Role $role * @return User */ public function removeRole($role) { if ($role instanceof Role) { $this->roles->removeElement($role); return $this; } foreach ($this->roles as $r) { if ($r->getRole() === $role) { $this->roles->removeElement($r); } } return $this; } /** * @param string|Role $role * @return bool */ public function hasRole($role) { if ($role instanceof Role) { $role = $role->getRole(); } return $this->roles->exists(function ($key, Role $element) use ($role) { return $role === $element->getRole(); }); } /** * @return Role[] */ public function getRoles() { $roles = $this->roles->toArray(); foreach ($this->getGroups() as $group) { $roles = array_merge($roles, $group->getRoles()); } return $roles; } /** * @param GroupInterface $group * @return User */ public function addGroup(GroupInterface $group) { if (!$this->hasGroup($group)) { $this->groups[] = $group; } return $this; } /** * @param GroupInterface $group * @return User */ public function removeGroup(GroupInterface $group) { $this->groups->removeElement($group); return $this; } /** * @param string|GroupInterface $group * @return bool */ public function hasGroup($group) { if ($group instanceof GroupInterface) { return $this->groups->contains($group); } return $this->groups->exists(function ($key, GroupInterface $element) use ($group) { return $group === $element->getName(); }); } /** * @return Collection|Group[] */ public function getGroups() { return $this->groups; } /** * @param Team $team * @return $this */ public function addTeam(Team $team) { if (!$this->hasTeam($team)) { $this->teams->add($team); $team->addUser($this); } return $this; } /** * @param Team $team * @return $this */ public function removeTeam(Team $team) { if ($this->hasTeam($team)) { $this->teams->removeElement($team); $team->removeUser($this); } return $this; } /** * @param Team $team * @return bool */ public function hasTeam(Team $team) { return $this->teams->contains($team); } /** * @return Collection|Team[] */ public function getTeams() { return $this->teams; } /** * @param Team $team * @return $this */ public function addManagedTeam(Team $team) { if (!$this->hasManagedTeam($team)) { $this->managedTeams->add($team); $team->setManager($this); } return $this; } /** * @param Team $team * @return $this */ public function removeManagedTeam(Team $team) { if ($this->hasManagedTeam($team)) { $this->managedTeams->removeElement($team); $team->setManager(null); } return $this; } /** * @param Team $team * @return bool */ public function hasManagedTeam(Team $team) { return $this->managedTeams->contains($team); } /** * @return Collection|Team[] */ public function getManagedTeams() { return $this->managedTeams; } /** * @param ServiceUserCase $keyCase * @return $this */ public function addKeyCase(ServiceUserCase $keyCase) { if (!$this->hasKeyCase($keyCase)) { $this->keyCases->add($keyCase); $keyCase->setKeyWorker($this); } return $this; } /** * @param ServiceUserCase $keyCase * @return $this */ public function removeKeyCase(ServiceUserCase $keyCase) { if ($this->hasKeyCase($keyCase)) { $this->keyCases->removeElement($keyCase); $keyCase->setKeyWorker(null); } return $this; } /** * @param ServiceUserCase $keyCase * @return bool */ public function hasKeyCase(ServiceUserCase $keyCase) { return $this->keyCases->contains($keyCase); } /** * @return Collection|ServiceUserCase[] */ public function getKeyCases() { return $this->keyCases; } /** * @param ServiceUserCase $case * @return $this */ public function addCase(ServiceUserCase $case) { if (!$this->hasCase($case)) { $this->cases->add($case); $case->addUser($this); } return $this; } /** * @param ServiceUserCase $case * @return $this */ public function removeCase(ServiceUserCase $case) { if ($this->hasCase($case)) { $this->cases->removeElement($case); $case->removeUser($this); } return $this; } /** * @param ServiceUserCase $case * @return bool */ public function hasCase(ServiceUserCase $case) { return $this->cases->contains($case); } /** * @return Collection|ServiceUserCase[] */ public function getCases() { return $this->cases; } /** * @param NotificationMessage $message * @return $this */ public function addNotification(NotificationMessage $message) { if (!$this->hasNotification($message)) { $message->setRecipient($this); $this->notifications->add($message); } return $this; } /** * @param NotificationMessage $message * @return $this */ public function removeNotfication(NotificationMessage $message) { if ($this->hasNotification($message)) { $this->notifications->removeElement($message); $message->setRecipient(null); } return $this; } /** * @param NotificationMessage $message * @return bool */ public function hasNotification(NotificationMessage $message) { return $this->notifications->contains($message); } /** * @return Collection|NotificationMessage[] */ public function getNotifications() { return $this->notifications; } /** * Get unread notification messages * * @return Collection|NotificationMessage[] */ public function getUnreadNotifications() { $criteria = Criteria::create() ->where(Criteria::expr()->eq('read', false)); return $this->notifications->matching($criteria); } } var_dump( unserialize('a:4:{i:0;C:41:"MCC\SocialCare\Component\User\Entity\User":206:{a:9:{i:0;s:60:"$2y$15$2m55uqgw1dc0488k0k44kuj5jlsY5zHjNX/WlJ75iKn1NgPX6rcMS";i:1;s:31:"2m55uqgw1dc0488k0k44k0co8wk8csw";i:2;s:10:"superadmin";i:3;s:10:"superadmin";i:4;b:0;i:5;b:0;i:6;b:0;i:7;b:1;i:8;i:12;}}i:1;b:1;i:2;a:2:{i:0;C:41:"MCC\SocialCare\Component\User\Entity\Role":42:{a:2:{i:0;i:3;i:1;s:16:"ROLE_SUPER_ADMIN";}}i:1;r:16;}i:3;a:0:{}}') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5Cuser', 'fos%5Cuserbundle%5Cmodel%5Cuser'
  517     1        INIT_NS_FCALL_BY_NAME                                    'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5Cvar_dump'
          2        INIT_NS_FCALL_BY_NAME                                    'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5Cunserialize'
          3        SEND_VAL_EX                                              'a%3A4%3A%7Bi%3A0%3BC%3A41%3A%22MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CUser%22%3A206%3A%7Ba%3A9%3A%7Bi%3A0%3Bs%3A60%3A%22%242y%2415%242m55uqgw1dc0488k0k44kuj5jlsY5zHjNX%2FWlJ75iKn1NgPX6rcMS%22%3Bi%3A1%3Bs%3A31%3A%222m55uqgw1dc0488k0k44k0co8wk8csw%22%3Bi%3A2%3Bs%3A10%3A%22superadmin%22%3Bi%3A3%3Bs%3A10%3A%22superadmin%22%3Bi%3A4%3Bb%3A0%3Bi%3A5%3Bb%3A0%3Bi%3A6%3Bb%3A0%3Bi%3A7%3Bb%3A1%3Bi%3A8%3Bi%3A12%3B%7D%7Di%3A1%3Bb%3A1%3Bi%3A2%3Ba%3A2%3A%7Bi%3A0%3BC%3A41%3A%22MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CRole%22%3A42%3A%7Ba%3A2%3A%7Bi%3A0%3Bi%3A3%3Bi%3A1%3Bs%3A16%3A%22ROLE_SUPER_ADMIN%22%3B%7D%7Di%3A1%3Br%3A16%3B%7Di%3A3%3Ba%3A0%3A%7B%7D%7D'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR_NO_REF_EX                                       $0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function %00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A212%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  MCC\SocialCare\Component\User\Entity\{closure}
number of ops:  8
compiled vars:  !0 = $key, !1 = $element, !2 = $role
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  212     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
  213     3        INIT_METHOD_CALL                                         !1, 'getRole'
          4        DO_FCALL                                      0  $3      
          5        IS_IDENTICAL                                     ~4      !2, $3
          6      > RETURN                                                   ~4
  214     7*     > RETURN                                                   null

End of function %00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A212%240

Function %00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A265%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  MCC\SocialCare\Component\User\Entity\{closure}
number of ops:  8
compiled vars:  !0 = $key, !1 = $element, !2 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  265     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
  266     3        INIT_METHOD_CALL                                         !1, 'getName'
          4        DO_FCALL                                      0  $3      
          5        IS_IDENTICAL                                     ~4      !2, $3
          6      > RETURN                                                   ~4
  267     7*     > RETURN                                                   null

End of function %00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A265%241

Class MCC\SocialCare\Component\User\Entity\User:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  __construct
number of ops:  31
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  110     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
  111     2        NEW                                              $2      'Doctrine%5CCommon%5CCollections%5CArrayCollection'
          3        DO_FCALL                                      0          
          4        ASSIGN_OBJ                                               'roles'
          5        OP_DATA                                                  $2
  112     6        NEW                                              $5      'Doctrine%5CCommon%5CCollections%5CArrayCollection'
          7        DO_FCALL                                      0          
          8        ASSIGN_OBJ                                               'groups'
          9        OP_DATA                                                  $5
  113    10        NEW                                              $8      'Doctrine%5CCommon%5CCollections%5CArrayCollection'
         11        DO_FCALL                                      0          
         12        ASSIGN_OBJ                                               'teams'
         13        OP_DATA                                                  $8
  114    14        NEW                                              $11     'Doctrine%5CCommon%5CCollections%5CArrayCollection'
         15        DO_FCALL                                      0          
         16        ASSIGN_OBJ                                               'managedTeams'
         17        OP_DATA                                                  $11
  115    18        NEW                                              $14     'Doctrine%5CCommon%5CCollections%5CArrayCollection'
         19        DO_FCALL                                      0          
         20        ASSIGN_OBJ                                               'keyCases'
         21        OP_DATA                                                  $14
  116    22        NEW                                              $17     'Doctrine%5CCommon%5CCollections%5CArrayCollection'
         23        DO_FCALL                                      0          
         24        ASSIGN_OBJ                                               'cases'
         25        OP_DATA                                                  $17
  117    26        NEW                                              $20     'Doctrine%5CCommon%5CCollections%5CArrayCollection'
         27        DO_FCALL                                      0          
         28        ASSIGN_OBJ                                               'notifications'
         29        OP_DATA                                                  $20
  118    30      > RETURN                                                   null

End of function __construct

Function getfullname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  getFullName
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  125     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1        CONCAT                                           ~1      ~0, '+'
          2        FETCH_OBJ_R                                      ~2      'lastName'
          3        CONCAT                                           ~3      ~1, ~2
          4      > RETURN                                                   ~3
  126     5*     > RETURN                                                   null

End of function getfullname

Function setfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  setFirstName
number of ops:  6
compiled vars:  !0 = $firstName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  131     0  E >   RECV                                             !0      
  133     1        ASSIGN_OBJ                                               'firstName'
          2        OP_DATA                                                  !0
  135     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  136     5*     > RETURN                                                   null

End of function setfirstname

Function getfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  getFirstName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  143     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1      > RETURN                                                   ~0
  144     2*     > RETURN                                                   null

End of function getfirstname

Function setlastname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  setLastName
number of ops:  6
compiled vars:  !0 = $lastName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  149     0  E >   RECV                                             !0      
  151     1        ASSIGN_OBJ                                               'lastName'
          2        OP_DATA                                                  !0
  153     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  154     5*     > RETURN                                                   null

End of function setlastname

Function getlastname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  getLastName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  161     0  E >   FETCH_OBJ_R                                      ~0      'lastName'
          1      > RETURN                                                   ~0
  162     2*     > RETURN                                                   null

End of function getlastname

Function addrole:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 10
filename:       /in/CHfcC
function name:  addRole
number of ops:  22
compiled vars:  !0 = $role
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  168     0  E >   RECV                                             !0      
  170     1        INSTANCEOF                                       ~1      !0, 'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CRole'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->10
  171     4    >   NEW                                              $3      'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CRole'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $3, 'setRole'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $5      
          9        ASSIGN                                                   !0, $5
  174    10    >   INIT_METHOD_CALL                                         'hasRole'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $7      
         13        BOOL_NOT                                         ~8      $7
         14      > JMPZ                                                     ~8, ->19
  175    15    >   FETCH_OBJ_R                                      ~9      'roles'
         16        INIT_METHOD_CALL                                         ~9, 'add'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
  178    19    >   FETCH_THIS                                       ~11     
         20      > RETURN                                                   ~11
  179    21*     > RETURN                                                   null

End of function addrole

Function removerole:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/CHfcC
function name:  removeRole
number of ops:  25
compiled vars:  !0 = $role, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  185     0  E >   RECV                                             !0      
  187     1        INSTANCEOF                                               !0, 'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CRole'
          2      > JMPZ                                                     ~2, ->9
  188     3    >   FETCH_OBJ_R                                      ~3      'roles'
          4        INIT_METHOD_CALL                                         ~3, 'removeElement'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
  190     7        FETCH_THIS                                       ~5      
          8      > RETURN                                                   ~5
  193     9    >   FETCH_OBJ_R                                      ~6      'roles'
         10      > FE_RESET_R                                       $7      ~6, ->21
         11    > > FE_FETCH_R                                               $7, !1, ->21
  194    12    >   INIT_METHOD_CALL                                         !1, 'getRole'
         13        DO_FCALL                                      0  $8      
         14        IS_IDENTICAL                                             !0, $8
         15      > JMPZ                                                     ~9, ->20
  195    16    >   FETCH_OBJ_R                                      ~10     'roles'
         17        INIT_METHOD_CALL                                         ~10, 'removeElement'
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0          
  193    20    > > JMP                                                      ->11
         21    >   FE_FREE                                                  $7
  199    22        FETCH_THIS                                       ~12     
         23      > RETURN                                                   ~12
  200    24*     > RETURN                                                   null

End of function removerole

Function hasrole:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/CHfcC
function name:  hasRole
number of ops:  14
compiled vars:  !0 = $role
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  206     0  E >   RECV                                             !0      
  208     1        INSTANCEOF                                               !0, 'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5CRole'
          2      > JMPZ                                                     ~1, ->6
  209     3    >   INIT_METHOD_CALL                                         !0, 'getRole'
          4        DO_FCALL                                      0  $2      
          5        ASSIGN                                                   !0, $2
  212     6    >   FETCH_OBJ_R                                      ~4      'roles'
          7        INIT_METHOD_CALL                                         ~4, 'exists'
          8        DECLARE_LAMBDA_FUNCTION                                  '%00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A212%240'
          9        BIND_LEXICAL                                             ~5, !0
  214    10        SEND_VAL_EX                                              ~5
         11        DO_FCALL                                      0  $6      
         12      > RETURN                                                   $6
  215    13*     > RETURN                                                   null

End of function hasrole

Function getroles:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/CHfcC
function name:  getRoles
number of ops:  19
compiled vars:  !0 = $roles, !1 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  222     0  E >   FETCH_OBJ_R                                      ~2      'roles'
          1        INIT_METHOD_CALL                                         ~2, 'toArray'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
  224     4        INIT_METHOD_CALL                                         'getGroups'
          5        DO_FCALL                                      0  $5      
          6      > FE_RESET_R                                       $6      $5, ->16
          7    > > FE_FETCH_R                                               $6, !1, ->16
  225     8    >   INIT_NS_FCALL_BY_NAME                                    'MCC%5CSocialCare%5CComponent%5CUser%5CEntity%5Carray_merge'
          9        SEND_VAR_EX                                              !0
         10        INIT_METHOD_CALL                                         !1, 'getRoles'
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0  $8      
         14        ASSIGN                                                   !0, $8
  224    15      > JMP                                                      ->7
         16    >   FE_FREE                                                  $6
  228    17      > RETURN                                                   !0
  229    18*     > RETURN                                                   null

End of function getroles

Function addgroup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/CHfcC
function name:  addGroup
number of ops:  12
compiled vars:  !0 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  235     0  E >   RECV                                             !0      
  237     1        INIT_METHOD_CALL                                         'hasGroup'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->9
  238     6    >   FETCH_OBJ_W                                      $3      'groups'
          7        ASSIGN_DIM                                               $3
          8        OP_DATA                                                  !0
  241     9    >   FETCH_THIS                                       ~5      
         10      > RETURN                                                   ~5
  242    11*     > RETURN                                                   null

End of function addgroup

Function removegroup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  removeGroup
number of ops:  8
compiled vars:  !0 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  248     0  E >   RECV                                             !0      
  250     1        FETCH_OBJ_R                                      ~1      'groups'
          2        INIT_METHOD_CALL                                         ~1, 'removeElement'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
  252     5        FETCH_THIS                                       ~3      
          6      > RETURN                                                   ~3
  253     7*     > RETURN                                                   null

End of function removegroup

Function hasgroup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  hasGroup
number of ops:  16
compiled vars:  !0 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  259     0  E >   RECV                                             !0      
  261     1        INSTANCEOF                                               !0, 'FOS%5CUserBundle%5CModel%5CGroupInterface'
          2      > JMPZ                                                     ~1, ->8
  262     3    >   FETCH_OBJ_R                                      ~2      'groups'
          4        INIT_METHOD_CALL                                         ~2, 'contains'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
  265     8    >   FETCH_OBJ_R                                      ~4      'groups'
          9        INIT_METHOD_CALL                                         ~4, 'exists'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00mcc%5Csocialcare%5Ccomponent%5Cuser%5Centity%5C%7Bclosure%7D%2Fin%2FCHfcC%3A265%241'
         11        BIND_LEXICAL                                             ~5, !0
  267    12        SEND_VAL_EX                                              ~5
         13        DO_FCALL                                      0  $6      
         14      > RETURN                                                   $6
  268    15*     > RETURN                                                   null

End of function hasgroup

Function getgroups:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  getGroups
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  275     0  E >   FETCH_OBJ_R                                      ~0      'groups'
          1      > RETURN                                                   ~0
  276     2*     > RETURN                                                   null

End of function getgroups

Function addteam:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/CHfcC
function name:  addTeam
number of ops:  17
compiled vars:  !0 = $team
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  282     0  E >   RECV                                             !0      
  284     1        INIT_METHOD_CALL                                         'hasTeam'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->14
  285     6    >   FETCH_OBJ_R                                      ~3      'teams'
          7        INIT_METHOD_CALL                                         ~3, 'add'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
  286    10        INIT_METHOD_CALL                                         !0, 'addUser'
         11        FETCH_THIS                                       $5      
         12        SEND_VAR_EX                                              $5
         13        DO_FCALL                                      0          
  289    14    >   FETCH_THIS                                       ~7      
         15      > RETURN                                                   ~7
  290    16*     > RETURN                                                   null

End of function addteam

Function removeteam:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/CHfcC
function name:  removeTeam
number of ops:  16
compiled vars:  !0 = $team
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  296     0  E >   RECV                                             !0      
  298     1        INIT_METHOD_CALL                                         'hasTeam'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->13
  299     5    >   FETCH_OBJ_R                                      ~2      'teams'
          6        INIT_METHOD_CALL                                         ~2, 'removeElement'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
  300     9        INIT_METHOD_CALL                                         !0, 'removeUser'
         10        FETCH_THIS                                       $4      
         11        SEND_VAR_EX                                              $4
         12        DO_FCALL                                      0          
  303    13    >   FETCH_THIS                                       ~6      
         14      > RETURN                                                   ~6
  304    15*     > RETURN                                                   null

End of function removeteam

Function hasteam:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  hasTeam
number of ops:  7
compiled vars:  !0 = $team
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  310     0  E >   RECV                                             !0      
  312     1        FETCH_OBJ_R                                      ~1      'teams'
          2        INIT_METHOD_CALL                                         ~1, 'contains'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
  313     6*     > RETURN                                                   null

End of function hasteam

Function getteams:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHfcC
function name:  getTeams
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  320     0  E >   FETCH_OBJ_R                                      ~0      'teams'
          1      > RETURN                                                   ~0
  321     2*     > RETURN                                                   null

End of function getteams

Function addmanagedteam:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/CHfcC
function name:  addManagedTeam
number of ops:  17
compiled vars:  !0 = $team
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  327     0  E >   RECV                                             !0      
  329     1        INIT_METHOD_CALL           

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
266.13 ms | 1428 KiB | 20 Q