Passed
Push — master ( e6f96c...800f87 )
by Jeferson
01:33
created
Example/call-structure-log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     require 'Developers/Log.php';
13 13
 
14
-    $datas = ["usuario" => "Jeferson Souza", "email" => "[email protected]", "perfil"=> "Admin","sessao"=>"Logado"];
14
+    $datas = ["usuario" => "Jeferson Souza", "email" => "[email protected]", "perfil"=> "Admin", "sessao"=>"Logado"];
15 15
 
16 16
     $log = new \Developers\Log();
17 17
     $log->LogCreate("Login", "success", $datas);
Please login to merge, or discard this patch.
Example/call-manual-log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     $Name = "Acesso Simultâneo";
16 16
     $data = "
17
-        URL: ".__DIR__."
17
+        URL: ".__DIR__ . "
18 18
         IP: {$_SERVER['REMOTE_ADDR']}
19 19
         NAVEGADOR: {$_SERVER['HTTP_USER_AGENT']}
20 20
         PORTA: {$_SERVER['REMOTE_PORT']}
Please login to merge, or discard this patch.
Developers/Log.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
                 mkdir($Folder, 0755);
39 39
             }
40 40
 
41
-           if (!is_dir($Folder . '/' . date('Y')) && !file_exists($Folder . '/' . date('Y'))) {
41
+            if (!is_dir($Folder . '/' . date('Y')) && !file_exists($Folder . '/' . date('Y'))) {
42 42
                 mkdir($Folder . '/' . date('Y'), 0755);
43 43
             }
44 44
 
45
-             if (!is_dir($Folder . '/' . date('Y') . '/' . date('m'))
45
+                if (!is_dir($Folder . '/' . date('Y') . '/' . date('m'))
46 46
                 && !file_exists($Folder . '/' . date('Y') . '/' . date('m'))) {
47 47
                 mkdir($Folder . '/' . date('Y') . '/' . date('m'), 0755);
48 48
             }
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 
68 68
         //Predefined and standard text
69 69
         //Texto pré-definido e padrão
70
-        $this->text = "[LOG - ". date("d/m/Y H:i:s")."]
70
+        $this->text = "[LOG - " . date("d/m/Y H:i:s") . "]
71 71
         
72
-       URL: ".__DIR__."
73
-       IP: ".$_SERVER['REMOTE_ADDR']."
74
-       NAVEGADOR: ".$_SERVER['HTTP_USER_AGENT']."
75
-       PORTA: ".$_SERVER['REMOTE_PORT']."";
72
+       URL: ".__DIR__ . "
73
+       IP: ".$_SERVER['REMOTE_ADDR'] . "
74
+       NAVEGADOR: ".$_SERVER['HTTP_USER_AGENT'] . "
75
+       PORTA: ".$_SERVER['REMOTE_PORT'] . "";
76 76
 
77 77
         //We retrieve the data reported through the array
78 78
         //Resgatamos os dados informados através do array
@@ -94,18 +94,18 @@  discard block
 block discarded – undo
94 94
      * @param $folderDir
95 95
      * @param $text
96 96
      */
97
-    public function CreateFile($FolderDir, $text){
97
+    public function CreateFile($FolderDir, $text) {
98 98
 
99 99
         $this->CreateText();
100 100
 
101
-        $this->$FolderDir =  $FolderDir;
102
-        $this->text =  $text;
101
+        $this->$FolderDir = $FolderDir;
102
+        $this->text = $text;
103 103
 
104 104
         $dir = $this->$FolderDir;
105 105
 
106 106
         //Log File Creation
107 107
         //Criação de Arquivo para o Log
108
-        $file = $this->Name.'-' . date('Y-m-d') . '-'.time() .'.txt';
108
+        $file = $this->Name . '-' . date('Y-m-d') . '-' . time() . '.txt';
109 109
 
110 110
         //We generate the file name and the content that will be printed on the file.
111 111
         //Geramos o nome do arquivo e o conteúdo do mesmo.
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
      * @param $Data
125 125
      * @return bool
126 126
      */
127
-    public function LogCreate($Name, $Status, $Data){
127
+    public function LogCreate($Name, $Status, $Data) {
128 128
         $this->Data = $Data;
129
-        $this->Status= $Status;
130
-        $this->Name= $Name;
129
+        $this->Status = $Status;
130
+        $this->Name = $Name;
131 131
 
132 132
         //We call the method to create the Log folder and subfolder, if it was not generated
133 133
         //Chamamos o método para criar a pasta Log e subpasta, se não foi gerado
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
 
145 145
     }
146 146
 
147
-    public function CreateManual($FolderDir, $text){
147
+    public function CreateManual($FolderDir, $text) {
148 148
 
149
-        $this->$FolderDir =  $FolderDir;
150
-        $this->text =  $text;
149
+        $this->$FolderDir = $FolderDir;
150
+        $this->text = $text;
151 151
 
152 152
         $dir = $this->$FolderDir;
153 153
 
154 154
         //Log File Creation
155 155
         //Criação de Arquivo para o Log
156
-        $file = $this->Name.'-' . date('Y-m-d') . '-'.time() .'.txt';
156
+        $file = $this->Name . '-' . date('Y-m-d') . '-' . time() . '.txt';
157 157
 
158 158
         //We generate the file name and the content that will be printed on the file.
159 159
         //Geramos o nome do arquivo e o conteúdo do mesmo.
@@ -162,19 +162,19 @@  discard block
 block discarded – undo
162 162
         fclose($fopen);
163 163
     }
164 164
 
165
-    public function LogManual($Name, $Data){
166
-        $this->Data= $Data;
167
-        $this->Name= $Name;
165
+    public function LogManual($Name, $Data) {
166
+        $this->Data = $Data;
167
+        $this->Name = $Name;
168 168
 
169 169
         //We call the method to create the Log folder and subfolder, if it was not generated
170 170
         //Chamamos o método para criar a pasta Log e subpasta, se não foi gerado
171 171
         $this->CreateFolder();
172 172
 
173 173
         //Texto Pré-definido
174
-        $this->content = "[LOG - ". date("d/m/Y H:i:s")."]";
174
+        $this->content = "[LOG - " . date("d/m/Y H:i:s") . "]";
175 175
 
176 176
         //Texto personalizado e encaminhado via parâmetro.
177
-        $this->content.= "{$this->Data}";
177
+        $this->content .= "{$this->Data}";
178 178
 
179 179
         //We define the name of the folder and its subfolders.
180 180
         //Definimos o nome da pasta e suas subpastas.
Please login to merge, or discard this patch.