src/SecurityDefinitions.php
public function generateSwaggerApi(Collection $documentation, array $securityConfig)
    {
        $securityDefinitions = collect();
        if ($documentation->has('securityDefinitions')) {
            $securityDefinitions = collect($documentation->get('securityDefinitions'));
        }

        foreach ($securityConfig as $key => $cfg) {
            $securityDefinitions->offsetSet($key, self::arrayToObject($cfg));
        }

        $documentation->offsetSet('securityDefinitions', $securityDefinitions);

        return $documentation;
    }
public function generateSwaggerApi(Collection $documentation, array $securityConfig)
    {
        $securityDefinitions = collect();
        if ($documentation->has('securityDefinitions')) {
            $securityDefinitions = collect($documentation->get('securityDefinitions'));
        }

        foreach ($securityConfig as $key => $cfg) {
            $securityDefinitions->offsetSet($key, self::arrayToObject($cfg));
        }

        $documentation->offsetSet('securityDefinitions', $securityDefinitions);

        return $documentation;
    }
public function generateSwaggerApi ( Collection $ documentation , array $ securityConfig ) { $ securityDefinitions = collect ( ) ; if ( $ documentation -> has ( 'securityDefinitions' ) ) { $ securityDefinitions = collect ( $ documentation -> get ( 'securityDefinitions' ) ) ; } foreach ( $ securityConfig as $ key => $ cfg ) { $ securityDefinitions -> offsetSet ( $ key , self :: arrayToObject ( $ cfg ) ) ; } $ documentation -> offsetSet ( 'securityDefinitions' , $ securityDefinitions ) ; return $ documentation ; }
Inject security settings for Swagger 1 & 2.

@param Collection $documentation The parse json
@param array $securityConfig The security settings from l5-swagger

@return Collection
Inject security settings for Swagger 1 & 2 .