@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * @param Entity $object |
41 | 41 | * |
42 | - * @return bool|ManagerInterface |
|
42 | + * @return Entity |
|
43 | 43 | */ |
44 | 44 | public function getSupport(Entity $object) |
45 | 45 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * Adds a mandatory requirement in form of a php.ini configuration. |
224 | 224 | * |
225 | 225 | * @param string $cfgName The configuration name used for ini_get() |
226 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
226 | + * @param boolean|string $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
227 | 227 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
228 | 228 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
229 | 229 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * Adds an optional recommendation in form of a php.ini configuration. |
242 | 242 | * |
243 | 243 | * @param string $cfgName The configuration name used for ini_get() |
244 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
244 | + * @param string|false $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
245 | 245 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
246 | 246 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
247 | 247 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -33,6 +33,10 @@ discard block |
||
33 | 33 | return $this; |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param string[] $search |
|
38 | + * @param string[] $replace |
|
39 | + */ |
|
36 | 40 | protected function traiterLesFichiers($bundle, $parameters, $search, $replace) |
37 | 41 | { |
38 | 42 | foreach ($this->getFichiers() as $template) { |
@@ -52,6 +56,9 @@ discard block |
||
52 | 56 | |
53 | 57 | public abstract function getFichiers(); |
54 | 58 | |
59 | + /** |
|
60 | + * @param string $target |
|
61 | + */ |
|
55 | 62 | public function traiterLeFichier($fichier, $target, $parameters) |
56 | 63 | { |
57 | 64 | if (file_exists($target) && explode('.', basename($target))[1] == 'yml') { |
@@ -100,6 +107,9 @@ discard block |
||
100 | 107 | return true; |
101 | 108 | } |
102 | 109 | |
110 | + /** |
|
111 | + * @param string $clef |
|
112 | + */ |
|
103 | 113 | protected function genererParameters($clef, $controller) |
104 | 114 | { |
105 | 115 | $controller = explode(':', $controller); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * Retourne l'entity manager de la connexion defaut. |
17 | 17 | * |
18 | - * @return \Doctrine\Common\Persistence\ObjectManager|object |
|
18 | + * @return \Doctrine\Common\Persistence\ObjectManager |
|
19 | 19 | */ |
20 | 20 | protected function getEntityManager() |
21 | 21 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * Retourne les messages d'erreur issu d'un formulaire. |
27 | 27 | * |
28 | - * @param $form |
|
28 | + * @param \Symfony\Component\Form\Form $form |
|
29 | 29 | * |
30 | 30 | * @return array |
31 | 31 | */ |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Permet de traduire un message. |
51 | 51 | * |
52 | - * @param $id |
|
53 | - * @param null $domain |
|
52 | + * @param string $id |
|
53 | + * @param string $domain |
|
54 | 54 | * @param array $parameters |
55 | 55 | * |
56 | 56 | * @return string |
@@ -144,6 +144,9 @@ discard block |
||
144 | 144 | return explode(",", $fields); |
145 | 145 | } |
146 | 146 | |
147 | + /** |
|
148 | + * @param \Symfony\Component\EventDispatcher\GenericEvent $entite |
|
149 | + */ |
|
147 | 150 | protected function dispatch($libelle, $entite) |
148 | 151 | { |
149 | 152 | $event = new Event(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | class LeadController extends StructureController |
16 | 16 | { |
17 | - /** |
|
17 | + /** |
|
18 | 18 | * @ApiDoc( |
19 | 19 | * resource=true, |
20 | 20 | * description="Liste les leads.", |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | |
79 | - /** |
|
79 | + /** |
|
80 | 80 | * @ApiDoc( |
81 | 81 | * resource=true, |
82 | 82 | * description="Affiche un lead.", |
83 | 83 | * section="starkerxp_lead.lead", |
84 | - * requirements={ |
|
84 | + * requirements={ |
|
85 | 85 | * { |
86 | 86 | * "name"="lead_id", |
87 | 87 | * "dataType"="integer", |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $manager = $this->get("starkerxp_lead.manager.lead"); |
107 | 107 | try { |
108 | 108 | $options = $this->resolveParams()->resolve($request->query->all()); |
109 | - if (!$entite = $manager->findOneBy(['id' => $request->get('lead_id')])) { |
|
109 | + if (!$entite = $manager->findOneBy(['id' => $request->get('lead_id')])) { |
|
110 | 110 | return new JsonResponse(["payload" => $this->translate("entity.not_found", "lead")], 404); |
111 | 111 | } |
112 | 112 | } catch (\Exception $e) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return new JsonResponse($retour); |
119 | 119 | } |
120 | 120 | |
121 | - /** |
|
121 | + /** |
|
122 | 122 | * @ApiDoc( |
123 | 123 | * resource=true, |
124 | 124 | * description="Ajoute un lead.", |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if ($form->isValid()) { |
137 | 137 | $lead = $form->getData(); |
138 | 138 | $manager->insert($lead); |
139 | - $this->dispatch(Events::LEAD_CREATED, new GenericEvent($entite)); |
|
139 | + $this->dispatch(Events::LEAD_CREATED, new GenericEvent($entite)); |
|
140 | 140 | return new JsonResponse(["payload" => $this->translate("lead.entity.created", "lead")], 201); |
141 | 141 | } |
142 | 142 | } catch (\Exception $e) { |
@@ -11,6 +11,9 @@ |
||
11 | 11 | return $contenu; |
12 | 12 | } |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $contenu |
|
16 | + */ |
|
14 | 17 | public function remplacerLesCaracteresSpeciaux($contenu) |
15 | 18 | { |
16 | 19 | // Gestion des accents. |
@@ -33,6 +33,9 @@ discard block |
||
33 | 33 | return $contenuReplace; |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $type |
|
38 | + */ |
|
36 | 39 | private function renderLien($type, $contenu) |
37 | 40 | { |
38 | 41 | $arrayContenu = []; |
@@ -49,6 +52,11 @@ discard block |
||
49 | 52 | |
50 | 53 | } |
51 | 54 | |
55 | + /** |
|
56 | + * @param string $lien |
|
57 | + * @param string $texte |
|
58 | + * @param string $style |
|
59 | + */ |
|
52 | 60 | protected function retournerLaChaine($type, $lien, $texte, $style = null) |
53 | 61 | { |
54 | 62 | if ($type == "unsub") { |
@@ -64,6 +64,9 @@ |
||
64 | 64 | return true; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @return \Starkerxp\StructureBundle\Entity\UserInterface |
|
69 | + */ |
|
67 | 70 | protected function getUser() |
68 | 71 | { |
69 | 72 | if (!$token = $this->user->getToken()) { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function load(array $configs, ContainerBuilder $container) |
21 | 21 | { |
22 | 22 | $configuration = new Configuration(); |
23 | - $this->processConfiguration($configuration, $configs); |
|
23 | + $this->processConfiguration($configuration, $configs); |
|
24 | 24 | |
25 | 25 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
26 | 26 | $loader->load('services.yml'); |