private function loadBehaviors($composerLock)
    {
        $behaviors = [];

        if (null === $composerLock) {
            return $behaviors;
        }

        $json = json_decode($composerLock->getContents(), true);

        if (isset($json['packages'])) {
            foreach ($json['packages'] as $package) {
                $behavior = $this->loadBehavior($package);

                if (null !== $behavior) {
                    $behaviors[$behavior['name']] = $behavior;
                }
            }
        }

        return $behaviors;
    }
private function loadBehaviors($composerLock)
    {
        $behaviors = [];

        if (null === $composerLock) {
            return $behaviors;
        }

        $json = json_decode($composerLock->getContents(), true);

        if (isset($json['packages'])) {
            foreach ($json['packages'] as $package) {
                $behavior = $this->loadBehavior($package);

                if (null !== $behavior) {
                    $behaviors[$behavior['name']] = $behavior;
                }
            }
        }

        return $behaviors;
    }
private function loadBehaviors ( $ composerLock ) { $ behaviors = [ ] ; if ( null === $ composerLock ) { return $ behaviors ; } $ json = json_decode ( $ composerLock -> getContents ( ) , true ) ; if ( isset ( $ json [ 'packages' ] ) ) { foreach ( $ json [ 'packages' ] as $ package ) { $ behavior = $ this -> loadBehavior ( $ package ) ; if ( null !== $ behavior ) { $ behaviors [ $ behavior [ 'name' ] ] = $ behavior ; } } } return $ behaviors ; }
Finds all behaviors by parsing composer.lock file

@param SplFileInfo $composerLock
Finds all behaviors by parsing composer . lock file